cli icon indicating copy to clipboard operation
cli copied to clipboard

Alias a command?

Open pkbehera opened this issue 11 months ago • 1 comments

I want to add a command quit that does just what the built-in command exit does.

Users of my application complain that they get an error when they type quit!

pkbehera avatar Mar 15 '24 19:03 pkbehera

There's a slight complication with adding a "quit" command that mimics the behavior of "exit." Both "exit" and "help" are currently implemented as global commands, meaning they can be used within any submenu. Unfortunately, the library doesn't currently allow users to define their own global commands.

However, your request does highlight some valuable features that could be explored in the future:

  • User-defined Global Commands: This would allow library users to create custom global commands that function across all submenus.
  • Command Aliases: Users could define alternative names (aliases) for existing commands, both local and global.
  • Customizable Default Commands: This would provide flexibility for users to modify the default strings for commands like "exit," "help," and error messages (see issue #64).

daniele77 avatar Mar 26 '24 09:03 daniele77