Create hidden alias commands so kitty-tool @ls also works

This commit is contained in:
Kovid Goyal
2022-08-17 00:11:28 +05:30
parent d3bb69a0ac
commit bab914c497
2 changed files with 5 additions and 1 deletions

View File

@@ -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
}