Comments (4)
Since the library uses the first token of the input to lookup a command list, I could add a default handler to manage the cases where the command is unknown or wrong. However, this would comprise also the errors in the types of command parameters.
I'm not quite sure this would constitute a useful feature, however.
from cli.
Yes, of course. It would also be conflict with some commands. e.g: command 1
in aforementioned example.
I think the Insert
of command std::string("")
should be disabled since it is never called.
BTW, it is somewhat weird when paste something to runtime cli
using ctrl-v
, the whole content would not echo until a next keyboard is triggered.
cli/include/cli/detail/linuxkeyboard.h
Line 79 in e649e95
should here be modified to echo pasted content?
from cli.
Ok, @EFS86340 .
So this issue should be actually split into three:
- custom default input handler
- do not allow the insertion of empty command in a menu (i.e., "")
- missing echo after ctrl-v paste of command
Can you open the issue 2) and 3) please? So that we can continue the discussion of each problem the in the appropriate place :-)
Thank you
from cli.
Sure, so I would close this issue now.
from cli.
Related Issues (20)
- Is there any way to add options aftrer input data
- How to add internal command used to enter system shell
- How to specify optional arguments for a CLI handler?
- Bad file descriptor on ARM build HOT 6
- Add SubMenu class HOT 1
- how to trap keypress inside a command?
- Custom handler for wrong commands HOT 1
- Default argument for commands HOT 1
- Alias a command? HOT 1
- Clear the screen (ctrl + L) HOT 1
- Help for individual commands not available HOT 1
- Option to store only successful commands in history? HOT 3
- Flags for commands? HOT 1
- [feature request ]move from submenu to parent menu functionality HOT 3
- Parent menus does not chain
- Option to view the command history? HOT 1
- integer overflow warning is detected by clang++ HOT 4
- standalone asio test is complied even if only CLI_UseBoostAsio=ON HOT 3
- Enable Keyboard Handling in Command Handlers on Linux Platform
- Sub menu example in README segmentation fault
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.