aboutsummaryrefslogtreecommitdiff
path: root/completion/fish-completion.fish
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-07-19 18:43:33 +0200
committerMattias Andrée <maandree@operamail.com>2012-07-19 18:43:33 +0200
commit839f0b20e8e4982da6a152bd6d702b699d352324 (patch)
tree900bdac153e23e5c6272a4f762447954397e42ce /completion/fish-completion.fish
parent5f672bb9f76f0c37563202cfd9ed9755633a7050 (diff)
downloadponysay-839f0b20e8e4982da6a152bd6d702b699d352324.tar.gz
ponysay-839f0b20e8e4982da6a152bd6d702b699d352324.tar.bz2
ponysay-839f0b20e8e4982da6a152bd6d702b699d352324.zip
autogeneration of ponythink shell completions from ponysay completions
Diffstat (limited to 'completion/fish-completion.fish')
-rw-r--r--completion/fish-completion.fish24
1 files changed, 24 insertions, 0 deletions
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 <etu AT elis DOT nu>
+
+
+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
+