-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
autocomplete for subcommands #716
Comments
Commander does not support command line completion itself. I use tabtab, which has an implementation pattern inspired by npm. (Of some interest, commander-completion is an older project to add commander completions automatically. I didn't get it working with current commander, but did look to the code for inspiration for parsing commander for commands and options. However, for your two subcommands I suggest it is easier to add them explicitly yourself than to generalise.) |
Thanks |
For anyone seeking a solution, I’ve developed @gutenye/commander-completion-carapace using Carapace. It's fast, works well, and supports numerous shells like Bash, Zsh, Fish, Nushell, and others. |
Hi,
awesome tool, I have built some kind of cli with two subcommands "deploy" & "undeploy" and was wondering if there's a way to have the terminal autocomplete the subcommands when pressing "tab".. Is this supported via commander? if not any alternatives or ideas to implement this would be appreciated
Thanks
The text was updated successfully, but these errors were encountered: