From 8a7d9551ffb9a74834d040b356d16dcaef965e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Sun, 28 Oct 2012 03:35:02 +0100 Subject: [PATCH] change shell completion accordingly --- completion/bash-completion.sh | 2 +- completion/fish-completion.fish | 4 ++-- completion/zsh-completion.zsh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/completion/bash-completion.sh b/completion/bash-completion.sh index ae6a7441..2df8a5da 100644 --- a/completion/bash-completion.sh +++ b/completion/bash-completion.sh @@ -13,7 +13,7 @@ _ponysay() ponies=$('/usr/bin/ponysay' --onelist) COMPREPLY=( $( compgen -W "$ponies" -- "$cur" ) ) - elif [ $prev = "-F" ] || [ $prev = "++pony" ] || [ $prev = "++file" ]; then + elif [ $prev = "+f" ] || [ $prev = "++pony" ] || [ $prev = "++file" ]; then extraponies=$('/usr/bin/ponysay' ++onelist) COMPREPLY=( $( compgen -W "$extraponies" -- "$cur" ) ) diff --git a/completion/fish-completion.fish b/completion/fish-completion.fish index 24e9b050..b111bc15 100644 --- a/completion/fish-completion.fish +++ b/completion/fish-completion.fish @@ -7,14 +7,14 @@ set -g quoters ('/usr/bin/ponysay' --quoters) set -g balloons ('/usr/bin/ponysay' --balloonlist) -## TODO: update with options [see info manual]: +l +L ++list ++altlist ++file --file ++pony {-A, +A, -V, -K, -X}(with alternative) +## TODO: update with options [see info manual]: +f +l +L ++list ++altlist ++file --file ++pony {-A, +A, -V, -K, -X}(with alternative) complete --command ponysay --short-option h --long-option help --description 'help of ponysay' complete --command ponysay --short-option v --long-option version --description 'version of ponysay' complete --command ponysay --short-option l --long-option list --description 'list pony names' complete --command ponysay --short-option L --long-option altlist --description 'list pony names with alternatives' complete --command ponysay --short-option B --long-option balloonlist --description 'list balloon style names' complete --command ponysay --short-option f --long-option pony --arguments "$ponies" --description 'pony' -complete --command ponysay --short-option F --arguments "$xponies" --description 'extra pony' +#complete --command ponysay --short-option F --arguments "$xponies" --desc#ription 'extra pony' complete --command ponysay --short-option q --long-option quote --arguments "$quoters" --no-files --description 'pony' complete --command ponysay --short-option b --long-option balloon --arguments "$balloons" --no-files --description 'balloon style' complete --command ponysay --short-option W --long-option wrap --arguments 'Integer' --description 'specify the column when the message should be wrapped' ## TODO arguments `none` and `inherit` should be suggested diff --git a/completion/zsh-completion.zsh b/completion/zsh-completion.zsh index ec005943..35c72d66 100644 --- a/completion/zsh-completion.zsh +++ b/completion/zsh-completion.zsh @@ -15,12 +15,12 @@ _opts=( _tty_select=( '(-q --quite)'{-q,--quote}'[Select ponies for MLP:FiM quotes]: :_path_files -W '/usr/share/ponysay/ttyponies' -g "*(\:r)"' '(-f --pony)'{-f,--pony}'[select pony]: :_path_files -W '/usr/share/ponysay/ttyponies/' -g "*(\:r)"' - '(-F ++pony)'{-F,++pony}'[Select a extra pony]: :_path_files -W '/usr/share/ponysay/extrattyponies' -g "*(\:r)"' + '(+f ++pony)'{+f,++pony}'[Select a extra pony]: :_path_files -W '/usr/share/ponysay/extrattyponies' -g "*(\:r)"' ) _select=( '(-q --quite)'{-q,--quote}'[Select ponies for MLP:FiM quotes]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"' '(-f --pony)'{-f,--pony}'[select pony]: :_path_files -W '/usr/share/ponysay/ponies/' -g "*(\:r)"' - '(-F ++pony)'{-F,++pony}'[Select a extra pony]: :_path_files -W '/usr/share/ponysay/extraponies' -g "*(\:r)"' + '(+f ++pony)'{+f,++pony}'[Select a extra pony]: :_path_files -W '/usr/share/ponysay/extraponies' -g "*(\:r)"' ) if [[ "${(f)"$(tty)"##*/}" == "tty*" ]]; then _arguments \