daniele77 / cli

A library for interactive command line interfaces in modern C++
Boost Software License 1.0
1.23k stars 140 forks source link

Alias a command? #228

Open pkbehera opened 8 months ago

pkbehera commented 8 months ago

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!

daniele77 commented 8 months ago

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: