Added correct quoting to completion

This commit is contained in:
ville rantanen
2013-09-03 09:55:19 +03:00
parent 8137e9d453
commit 2b286e1c86

View File

@@ -47,13 +47,14 @@ _qcd()
COMPREPLY=() COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]} cur=${COMP_WORDS[COMP_CWORD]}
if [[ "$cur" == -* ]]; then if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -h -l -L -m ' -- $cur ) ) COMPREPLY=( $( compgen -W "-a -i -h -l -L -m" -- $cur ) )
return 0 return 0
fi fi
COMPREPLY=( $( compgen -W "$( grep -h ^"$cur" ~/.qcd <( tac ~/.bash_cdhistory ) | cut -d: -f1 )" ) ) COMPREPLY=( $( compgen -W "$( grep -h ^"$cur" ~/.qcd <( tac ~/.bash_cdhistory ) | cut -d: -f1 )" ) )
} }
complete -F _qcd qcd complete -F _qcd qcd
' >> ~/.bash_completion ' >> ~/.bash_completion
. /etc/bash_completion
return return
;; ;;
L) L)