From 839f0b20e8e4982da6a152bd6d702b699d352324 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 19 Jul 2012 18:43:33 +0200 Subject: autogeneration of ponythink shell completions from ponysay completions --- completion/fish-completion.fish | 24 ++++++++++++++++++++++++ completion/fish_ponysay.fish | 24 ------------------------ completion/fish_ponythink.fish | 24 ------------------------ 3 files changed, 24 insertions(+), 48 deletions(-) create mode 100644 completion/fish-completion.fish delete mode 100644 completion/fish_ponysay.fish delete mode 100644 completion/fish_ponythink.fish (limited to 'completion') diff --git a/completion/fish-completion.fish b/completion/fish-completion.fish new file mode 100644 index 0000000..ea98382 --- /dev/null +++ b/completion/fish-completion.fish @@ -0,0 +1,24 @@ + +# Completions for ponysay & ponythink +# https://github.com/erkin/ponysay/ +# +# Author: Elis Axelsson + + +if test -d /usr/share/ponysay/ponies/ + set -g systemponies (ls --color=no /usr/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from \/usr\/share\/ponysay\/ponies\//') +end + +if test -d ~/.local/share/ponysay/ponies/ + set -g homeponies (ls --color=no ~/.local/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from ~\/.local\/share\/ponysay\/ponies\//') +end + +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 f -a "$systemponies $homeponies" --description "Select a pony, either a filename or pony name" +complete -c ponysay -s W -a "Integer" --description "The screen column where the message should be wrapped" + +set -e systemponies +set -e homeponies + diff --git a/completion/fish_ponysay.fish b/completion/fish_ponysay.fish deleted file mode 100644 index ea98382..0000000 --- a/completion/fish_ponysay.fish +++ /dev/null @@ -1,24 +0,0 @@ - -# Completions for ponysay & ponythink -# https://github.com/erkin/ponysay/ -# -# Author: Elis Axelsson - - -if test -d /usr/share/ponysay/ponies/ - set -g systemponies (ls --color=no /usr/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from \/usr\/share\/ponysay\/ponies\//') -end - -if test -d ~/.local/share/ponysay/ponies/ - set -g homeponies (ls --color=no ~/.local/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from ~\/.local\/share\/ponysay\/ponies\//') -end - -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 f -a "$systemponies $homeponies" --description "Select a pony, either a filename or pony name" -complete -c ponysay -s W -a "Integer" --description "The screen column where the message should be wrapped" - -set -e systemponies -set -e homeponies - diff --git a/completion/fish_ponythink.fish b/completion/fish_ponythink.fish deleted file mode 100644 index 24391ce..0000000 --- a/completion/fish_ponythink.fish +++ /dev/null @@ -1,24 +0,0 @@ - -# Completions for ponysay & ponythink -# https://github.com/erkin/ponysay/ -# -# Author: Elis Axelsson - - -if test -d /usr/share/ponysay/ponies/ - set -g systemponies (ls --color=no /usr/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from \/usr\/share\/ponysay\/ponies\//') -end - -if test -d ~/.local/share/ponysay/ponies/ - set -g homeponies (ls --color=no ~/.local/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from ~\/.local\/share\/ponysay\/ponies\//') -end - -complete -c ponythink -s h --description "Help of ponythink" -complete -c ponythink -s v --description "Version of ponythink" -complete -c ponythink -s l --description "List pony files" -complete -c ponythink -s f -a "$systemponies $homeponies" --description "Select a pony, either a filename or pony name" -complete -c ponythink -s W -a "Integer" --description "The screen column where the message should be wrapped" - -set -e systemponies -set -e homeponies - -- cgit