From afcc9dc82981e6b334e5b4d8e79e19925ca9600e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 19 Aug 2012 03:30:11 +0200 Subject: info update + bash completion improvement (long options are suggested) --- completion/bash-completion.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'completion') diff --git a/completion/bash-completion.sh b/completion/bash-completion.sh index 11b99ea..ca6755e 100644 --- a/completion/bash-completion.sh +++ b/completion/bash-completion.sh @@ -8,15 +8,15 @@ _ponysay() options='-v -h -l -f -W -q' COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) - if [ $prev = "-f" ]; then + if [ $prev = "-f" ] || [ $prev = "--pony" ]; then ponies=$('/usr/bin/ponysay.py' --onelist) COMPREPLY=( $( compgen -W "$ponies" -- "$cur" ) ) - elif [ $prev = "-q" ]; then + elif [ $prev = "-q" ] || [ $prev = "--quote" ]; then quoters=$('/usr/bin/ponysay.py' --quoters) COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) ) - elif [ $prev = "-W" ]; then + elif [ $prev = "-W" ] || [ $prev = "--wrap" ]; then cols=$(( `stty size | cut -d ' ' -f 2` - 10 )) COMPREPLY=( $cols $(( $cols / 2 )) 100 60 ) -- cgit