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

Add completion for help command #1136

Merged
merged 2 commits into from Jun 16, 2020

Conversation

marckhouzam
Copy link
Collaborator

@marckhouzam marckhouzam commented Jun 14, 2020

Supersedes #1065.
Fixes #1000

This PR does two things:

  1. adds completion of the help command so that
<program> [tab][tab]

will include help in the completion choices. This is done by the first commit provided by @voithos taken from #1065.

  1. adds completion for the help command using ValidArgsFunction so that
<program> help [tab][tab]

will show all sub-commands (including help since <program> help help is a valid command), and

<program> help <subCmd1> [tab][tab]

will show all sub-commands of <subCmd1>. And so forth down the command tree.

voithos and others added 2 commits Jun 9, 2020
1- Show 'help' as a possible completion
2- Provide completions for the help command itself

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
@marckhouzam marckhouzam changed the title Feat/complete help Add completion for help command Jun 14, 2020
@jharshman jharshman added the area/shell-completion All shell completions label Jun 15, 2020
Copy link
Collaborator

@jharshman jharshman left a comment

Just tested this out and it works great. 👍

@jharshman jharshman merged commit 0431872 into spf13:master Jun 16, 2020
2 checks passed
@marckhouzam marckhouzam deleted the feat/completeHelp branch Jun 16, 2020
@marckhouzam
Copy link
Collaborator Author

marckhouzam commented Jun 16, 2020

Thanks @jharshman!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/shell-completion All shell completions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bash completions shouldn't exclude help command
3 participants