mirror of https://github.com/jenv/jenv.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
383 B
15 lines
383 B
_jenv() { |
|
COMPREPLY=() |
|
local word="${COMP_WORDS[COMP_CWORD]}" |
|
|
|
if [ "$COMP_CWORD" -eq 1 ]; then |
|
COMPREPLY=( $(compgen -W "$(jenv commands)" -- "$word") ) |
|
else |
|
local words=("${COMP_WORDS[@]}") |
|
unset words[0] |
|
local completions=$(jenv completions "${words[@]}") |
|
COMPREPLY=( $(compgen -W "$completions" -- "$word") ) |
|
fi |
|
} |
|
|
|
complete -o nospace -F _jenv jenv
|
|
|