We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We want two types of auto complete:
The text was updated successfully, but these errors were encountered:
#/usr/bin/env bash _muxed_completions() { if [ "$COMP_CWORD" -eq 1 ]; then local commands="$(compgen -W "new edit snapshot" "${COMP_WORDS[1]}")" local projects="$(compgen -W "$(echo $(ls ~/.muxed/))" "${COMP_WORDS[1]}")" COMPREPLY=( $commands $projects ) elif [ "$COMP_CWORD" -eq 2 ]; then local projects="$(compgen -W "$(echo $(ls ~/.muxed/))" "${COMP_WORDS[2]}")" COMPREPLY=( $projects ) fi } complete -F _muxed_completions muxed
A simple first pass.
It'll auto complete subcommands, and projects available in the default directory only.
Expand it to autocomplete projects but stripping the .yml (extension) in the filename. Have it complete in custom directories.
.yml
Sorry, something went wrong.
With the ls subcommand this has gotten a bit simpler. Here is my current config
ls
#/usr/bin/env bash _muxed_completions() { if [ "$COMP_CWORD" -eq 1 ]; then local commands="$(compgen -W "new edit snapshot load" "${COMP_WORDS[1]}")" local projects="$(compgen -W "$(muxed ls)" "${COMP_WORDS[1]}")" COMPREPLY=( $commands $projects ) elif [ "$COMP_CWORD" -eq 2 ]; then local projects="$(compgen -W "$(muxed ls)" "${COMP_WORDS[2]}")" COMPREPLY=( $projects ) fi } complete -F _muxed_completions muxed
No branches or pull requests
We want two types of auto complete:
The text was updated successfully, but these errors were encountered: