-
Notifications
You must be signed in to change notification settings - Fork 604
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
rush: bash completion? #2343
Comments
Bash completion should actually work if you add this snippet to your # bash parameter completion for the Rush CLI
_rush_bash_complete()
{
local word=${COMP_WORDS[COMP_CWORD]}
local completions
completions="$(rush tab-complete --position "${COMP_POINT}" --word "${COMP_LINE}" 2>/dev/null)"
if [ $? -ne 0 ]; then
completions=""
fi
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
}
complete -f -F _rush_bash_complete rush @sachinjoseph added shell completion in this PR: #2060 |
Nice! I couldn't find anything mentioned from --help or the docs, so I assumed it didn't exist. |
We should probably stick a page on the documentation website. @octogonz - opinion on where that should go? |
@octogonz I have created two PRs, please feel free to make any changes: |
I've merged both this PRs. I also made some content updates. It's live now, so we can close this issue. |
Please prefix the issue title with the project name i.e. [rush], [api-extractor] etc.
Is this a feature or a bug?
I've been using this script for bash completion for a while. It uses the
--help
arg to parse available commands and supported args. It would be nice if this were built in though.The text was updated successfully, but these errors were encountered: