shell completion update

This commit is contained in:
Mattias Andrée 2012-10-11 22:47:39 +02:00
parent bb5e26b8d8
commit 30dfacb70b
2 changed files with 3 additions and 2 deletions

View file

@ -5,7 +5,8 @@ _ponysay()
local cur prev words cword
_init_completion -n = || return
options='--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon --file ++file ++pony ++list ++altlist'
options="--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon --file ++file ++pony ++list ++altlist --all ++all"
options="$options --256-colours --tty-colours --kms-colours"
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
if [ $prev = "-f" ] || [ $prev = "--pony" ] || [ $prev = "--file" ]; then

View file

@ -9,7 +9,7 @@ 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
## TODO: update with options [see info manual]: +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'