mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-26 06:07:59 +01:00
shell completion update
This commit is contained in:
parent
bb5e26b8d8
commit
30dfacb70b
2 changed files with 3 additions and 2 deletions
|
@ -5,7 +5,8 @@ _ponysay()
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
_init_completion -n = || return
|
_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" ) )
|
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||||
|
|
||||||
if [ $prev = "-f" ] || [ $prev = "--pony" ] || [ $prev = "--file" ]; then
|
if [ $prev = "-f" ] || [ $prev = "--pony" ] || [ $prev = "--file" ]; then
|
||||||
|
|
|
@ -9,7 +9,7 @@ set -g quoters ('/usr/bin/ponysay' --quoters)
|
||||||
set -g balloons ('/usr/bin/ponysay' --balloonlist)
|
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 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 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 list --description 'list pony names'
|
||||||
|
|
Loading…
Reference in a new issue