diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-08-19 19:52:18 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-08-19 19:52:18 +0200 |
commit | 64b726770a07a0e04bcec3cf8ab23af4bcc2332f (patch) | |
tree | a2d2b4fb14895486c04262da022d4bdea7acd7d6 /completion/fish-completion.fish | |
parent | 41b2d257c71f654dd2fd9921d1f75f44b97a6592 (diff) | |
parent | 6dc632a155db800997e0eb2dec420a6233a2d141 (diff) | |
download | ponysay-64b726770a07a0e04bcec3cf8ab23af4bcc2332f.tar.gz ponysay-64b726770a07a0e04bcec3cf8ab23af4bcc2332f.tar.bz2 ponysay-64b726770a07a0e04bcec3cf8ab23af4bcc2332f.zip |
merge conflict resolved
Diffstat (limited to 'completion/fish-completion.fish')
-rw-r--r-- | completion/fish-completion.fish | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/completion/fish-completion.fish b/completion/fish-completion.fish index 89f7a19..6cd8b99 100644 --- a/completion/fish-completion.fish +++ b/completion/fish-completion.fish @@ -1,45 +1,21 @@ -# Completions for ponysay +# FISH completions for ponysay # https://github.com/erkin/ponysay/ # # Author: Elis Axelsson <etu AT elis DOT nu> -if test $TERM = "linux" - set -g systempath /usr/share/ponysay/ttyponies/ - set -g homepath ~/.local/share/ponysay/ttyponies/ -else - set -g systempath /usr/share/ponysay/ponies/ - set -g homepath ~/.local/share/ponysay/ponies/ -end +set -g ponies (/usr/bin/ponysay.py --onelist) +set -g quoters (/usr/bin/ponysay.py --quoters) -if test -d $systempath - set -g systemponies (ls --color=no $systempath | sed -e 's/\.pony//' -e 's/_.*//' | perl -pe 's/([a-z])([A-Z])/\1\\\ \2/' ) -end +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 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 W --long-option wrap --arguments 'Integer' --description 'specify the column when the message should be wrapped' +complete --command ponysay --arguments 'MESSAGE' -if test -d $homepath - set -g homeponies (ls --color=no $homepath | sed -e 's/\.pony//' -e 's/_.*//' | perl -pe 's/([a-z])([A-Z])/\1\\\ \2/' ) -end - - -set -g qcmd /usr/lib/ponysay/pq4ps -set -g quoters ($qcmd -l) - - -complete -c ponysay -s h --description "Help of ponysay" -complete -c ponysay -s v --description "Version of ponysay" -complete -c ponysay -s l --description "List pony files" -complete -c ponysay -s L --description "List pony files with alternatives" -complete -c ponysay -s f -a "$homeponies $systemponies" --description "Select a pony" -complete -c ponysay -s q -a "$quoters" --description "Select ponies for MLP:FiM quotes" -complete -c ponysay -s W -a "Integer" --description "The screen column where the message should be wrapped" - - -set -e systempath -set -e homepath - -set -e systemponies -set -e homeponies - -set -e qcmd +set -e ponies set -e quoters |