-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve usability of command line UI #30
Comments
👍 Maybe we should add some instructions from README.md to this command help screen, so that people would know that Ideally I see 2 more modes for
The Travis CI gem (https://github.com/travis-ci/travis.rb) does completion installation too. It added following to my
Currently it's not easy to start because a hook needs to be generated and added to |
@stecman if you support plan from #30 (comment), then please specify what folder we can use to store generated hooks. |
The intended use is to put the generate-hook call in your shell profile rather than generating a hook and saving the output in the shell profile, so this doesn't really need a folder. Having the hook generated on profile load only adds a small overhead and means that the hook is always up to date. Thus, an "installed" hook might look something like: [ -f /usr/bin/foobar ] && source <(foobar _completion --generate-hook) |
So my suggestion in #30 (comment) is completely off I guess. Then what's needed is:
[ -f /absolute/path/to/app ] && source <(/absolute/path/to/app _completion --generate-hook --program app)
|
We should also replace |
@stecman , ping. |
@aik099, your list of things needed is good, except for:
It makes sense for that file existence check to be included during a scripted install process (eg.
I see the file check to be mostly of value where a user hasn't directly set up the completion themselves and an error like |
I'm confused. In #30 (comment) you said that you preffer real-time hook generation vs generating hook once and installing it. So what is it?
I guess we need to note, that |
And we go with |
Real-time. Perhaps our interpretations of
When I say "scripted install" / My point was that adding |
Having
CompletionCommand::execute
attempt completion by default is a pretty poor user experience, especially if you're not sure what the command is for since it gives an error immediately that references the library internals:Ideally this would be changed so that:
myapp _completion
prints use instructions or help.--run-completion
is required to attempt completion.The text was updated successfully, but these errors were encountered: