Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestions #10

Open
keverw opened this issue Oct 10, 2019 · 4 comments
Open

Feature suggestions #10

keverw opened this issue Oct 10, 2019 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@keverw
Copy link

keverw commented Oct 10, 2019

Been playing around with this for a CLI client before building a full on GUI. Had some ideas:

  1. Tab support - command name or if sub command is next suggest that instead
  2. Support single quotes for parameters - compute networkID 'a b c' currently gives a
    while compute networkID "a b c" gives an a b c
  3. Function to display help for a certain command. For example if I use compute for as a namespace, if I type compute without a sub command following it, then I could show a list of sub commands help as if I typed help compute

Also curious, is it's possible to type while writing out text? I was playing with a CLI a few years ago and ran into that problem, but thinking it's probably some limitation in general. https://youtu.be/Q_E7ZFtoKY4 - I guess if that's the case then you wouldn't want to write anything to the console unless responding to a command.

@drew-y
Copy link
Owner

drew-y commented Oct 11, 2019

All good suggestions! Pull requests are welcome. 2 would be an easy one to do. 3 I'll have to consider how I want that behavior to work. Might just add a cli.showHelp method that could be called from within the command action. 1 is a little extensive, it'll be awhile before I can tackle that myself.

As for your last point, you can actually do that now as it stands. From the command action you'd want to call cli.hide() and then use something like node's readline api. Just remember to call cli.show() when you're done collecting input.

@drew-y drew-y added enhancement New feature or request help wanted Extra attention is needed labels Oct 11, 2019
@keverw
Copy link
Author

keverw commented Oct 14, 2019

Yeah, one of my friends made a CLI a few years ago that had the tab thing. Readline has a completer method too. So basically would grab all the commands and subcommands combined and throw into an array I'd think. Then should be able to use the built-in completer maybe.

@mbwhite
Copy link
Contributor

mbwhite commented Jul 30, 2020

Hello - would you be open to updating the help command, so that the alias where shown on the same line as the full command?

EDIT: I mean would you be open if I made a PR for this :-)

@drew-y drew-y closed this as completed Aug 3, 2020
@drew-y drew-y reopened this Aug 3, 2020
@drew-y
Copy link
Owner

drew-y commented Aug 3, 2020

Oops. Did not mean to close this.

@mbwhite I would absolutely be open to a PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants