aboutsummaryrefslogtreecommitdiff
path: root/completion
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-21 17:52:18 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-21 17:52:18 +0200
commitac6b4ef166a158115e85dc9799c5465470263df5 (patch)
tree8e85adfa20ef6b9f32ecc0e65dd3563492b655c2 /completion
parentfabeee4d991998216158d73391500b52a39daeb5 (diff)
parent194ddff8fa50b493e822012c51c026de1f76ea2d (diff)
downloadponysay-ac6b4ef166a158115e85dc9799c5465470263df5.tar.gz
ponysay-ac6b4ef166a158115e85dc9799c5465470263df5.tar.bz2
ponysay-ac6b4ef166a158115e85dc9799c5465470263df5.zip
Merge branch 'develop'
Diffstat (limited to 'completion')
-rw-r--r--completion/bash-completion.sh6
-rw-r--r--completion/fish-completion.fish9
-rw-r--r--completion/zsh-completion.zsh8
3 files changed, 16 insertions, 7 deletions
diff --git a/completion/bash-completion.sh b/completion/bash-completion.sh
index d790786..72cafcb 100644
--- a/completion/bash-completion.sh
+++ b/completion/bash-completion.sh
@@ -5,7 +5,7 @@ _ponysay()
local cur prev words cword
_init_completion -n = || return
- options='--version --help --list --altlist --pony --wrap --quote'
+ options='--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon'
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
if [ $prev = "-f" ] || [ $prev = "--pony" ]; then
@@ -16,6 +16,10 @@ _ponysay()
quoters=$('/usr/bin/ponysay' --quoters)
COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) )
+ elif [ $prev = "-b" ] || [ $prev = "--balloon" ]; then
+ balloons=$('/usr/bin/ponysay' --balloonlist)
+ COMPREPLY=( $( compgen -W "$balloons" -- "$cur" ) )
+
elif [ $prev = "-W" ] || [ $prev = "--wrap" ]; then
cols=$(( `stty size | cut -d ' ' -f 2` - 10 ))
COMPREPLY=( $cols $(( $cols / 2 )) 100 60 )
diff --git a/completion/fish-completion.fish b/completion/fish-completion.fish
index 9233c67..ead664b 100644
--- a/completion/fish-completion.fish
+++ b/completion/fish-completion.fish
@@ -5,17 +5,20 @@
set -g ponies ('/usr/bin/ponysay' --onelist)
set -g quoters ('/usr/bin/ponysay' --quoters)
+set -g balloons ('/usr/bin/ponysay' --balloonlist)
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 files'
-complete --command ponysay --short-option L --long-option altlist --description 'list pony files with alternatives'
+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 q --long-option quote --arguments "$quoters" --no-files --description 'pony'
+complete --command ponysay --short-option b --long-option balloon --arguments "$balloons" --description 'balloon style'
complete --command ponysay --short-option W --long-option wrap --arguments 'Integer' --description 'specify the column when the message should be wrapped'
complete --command ponysay --arguments 'MESSAGE'
set -e ponies
set -e quoters
-
+set -e balloons
diff --git a/completion/zsh-completion.zsh b/completion/zsh-completion.zsh
index 2124380..c19604d 100644
--- a/completion/zsh-completion.zsh
+++ b/completion/zsh-completion.zsh
@@ -2,10 +2,12 @@
_shortopts=(
'-v[Show version and exit]'
'-h[Show this help and exit]'
- '-l[list ponyfiles]'
- '-L[list ponyfiles with alternatives]'
- '-f[Select a pony (either a filename or a ponyname]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"'
+ '-l[list pony names]'
+ '-L[list pony names with alternatives]'
+ '-B[list balloon style names]'
+ '-f[Select a pony (either a file name or a pony name]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"'
'-q[Select ponies for MLP:FiM quotes]'
+ '-b[Selecy a balloon style]'
'-W[The screen column where the message should be wrapped]'
)
_arguments -s : \