diff options
Diffstat (limited to 'scripts/qtchooser.bash')
-rw-r--r-- | scripts/qtchooser.bash | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/qtchooser.bash b/scripts/qtchooser.bash index 294e586..e890c99 100644 --- a/scripts/qtchooser.bash +++ b/scripts/qtchooser.bash @@ -56,3 +56,15 @@ function qt_env_removefrom() eval "$1=\"\${contents[*]}\"" } +# completion: +function _qt() +{ + COMPREPLY=() + if [ ${#COMP_WORDS[@]} -eq 2 ] && [ $COMP_CWORD -eq 1 ]; then + local cur opts + cur="${COMP_WORDS[COMP_CWORD]}" + opts=`qtchooser -list-versions` + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + fi +} +complete -F _qt qt |