-
Notifications
You must be signed in to change notification settings - Fork 150
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
[author required] New Practice: Support shell completion #15
Comments
hey @jasonkarns do you have any good references or specific call-outs in the JS ecosystem of how to follow this one? |
Unfortunately, I don't. |
Gotcha. I think it's more of a shell thing than the CLI itself so I'll close for now. |
I don't think i'd go that far. In order to support shell completion, the CLI needs to do stuff. Most integrations require the CLI to accept a flag (like Other times, the completion can be a standalone script; but to be sure it keeps sync with the features of the CLI, it must be owned and maintained by the CLI team itself. (3rd-party completion scripts are perpetually out of date because the CLI evolves without regard to keeping the completion script current) Whether the CLI itself operates as the completion script (via a |
Ahh interesting! is that |
No, it's mostly just a convention. The CLI needs to either:
Many CLI utilities ship a companion script for completion (if you're a homebrew/linuxbrew user, have a look at ls -al /usr/local/etc/bash_completion.d/ to see the completion scripts that homebrew installs for you). But all those completion scripts essentially boil down to invoking the shell |
Yep, I think this is a pretty decent practice to have. Less like the fact that it isn't cross-platform in an easy manner (standardization). I've seen evidence of only a few packages that handle this well, maybe just one (tabtab) on npmjs that is useful. I'll re-open incase someone will want to pick it up. |
No description provided.
The text was updated successfully, but these errors were encountered: