workon: Bash completion.

This commit is contained in:
Julien Palard 2017-04-21 23:18:53 +02:00
parent 790435b0d3
commit 7f4ae3b60c
1 changed files with 7 additions and 0 deletions

View File

@ -254,3 +254,10 @@ function workon
[ -f "$VENVS/$1/bin/activate" ] || python3 -m venv "$VENVS/$1"
. "$VENVS/$1/bin/activate"
}
function _workon
{
COMPREPLY=( $( compgen -W '$( command ls "$HOME/.venvs" )' -- "${COMP_WORDS[COMP_CWORD]}") )
}
complete -F _workon workon