aboutsummaryrefslogtreecommitdiff
path: root/completion
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-07-19 06:04:26 -0700
committerMattias Andrée <maandree@operamail.com>2012-07-19 06:04:26 -0700
commitecd2e9824281a56f9fca09fc2a408006bd44f2ea (patch)
treed7bb87941f28030bdaaa0089147d9a3260420257 /completion
parentd6c360277f04fce578447ca73437a30640dfe98e (diff)
parentbae75d95b6ce3af5ac16284a6079ba0feb65cf0b (diff)
downloadponysay-ecd2e9824281a56f9fca09fc2a408006bd44f2ea.tar.gz
ponysay-ecd2e9824281a56f9fca09fc2a408006bd44f2ea.tar.bz2
ponysay-ecd2e9824281a56f9fca09fc2a408006bd44f2ea.zip
Merge pull request #37 from etu/master
Added completions for the fish/fishfish-shell
Diffstat (limited to 'completion')
-rw-r--r--completion/fish_ponysay.fish24
-rw-r--r--completion/fish_ponythink.fish24
2 files changed, 48 insertions, 0 deletions
diff --git a/completion/fish_ponysay.fish b/completion/fish_ponysay.fish
new file mode 100644
index 0000000..f0c73a2
--- /dev/null
+++ b/completion/fish_ponysay.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 /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 ~/.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
new file mode 100644
index 0000000..928b72e
--- /dev/null
+++ b/completion/fish_ponythink.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 /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 ~/.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
+