diff --git a/gen-rc-go.py b/gen-rc-go.py index 29de397af..13012f13a 100755 --- a/gen-rc-go.py +++ b/gen-rc-go.py @@ -17,7 +17,7 @@ def serialize_as_go_string(x: str) -> str: def build_go_code(name: str, cmd: RemoteCommand, opts: Any, template: str) -> str: - template = template[len('//go:build exclude'):] + template = '\n' + template[len('//go:build exclude'):] ans = template.replace('CMD_NAME', name).replace('__FILE__', __file__).replace('CLI_NAME', name.replace('_', '-')).replace( 'SHORT_DESC', serialize_as_go_string(cmd.short_desc)).replace('LONG_DESC', serialize_as_go_string(cmd.desc.strip())) return ans diff --git a/tools/cmd/at/main.go b/tools/cmd/at/main.go index 7aaca6eac..f3a81c553 100644 --- a/tools/cmd/at/main.go +++ b/tools/cmd/at/main.go @@ -121,6 +121,10 @@ func EntryPoint(tool_root *cobra.Command) *cobra.Command { c := reg_func(at_root_command) at_root_command.AddCommand(c) command_objects[cmd_name] = c + alias := *c + alias.Use = "@" + alias.Use + alias.Hidden = true + tool_root.AddCommand(&alias) } return at_root_command }