aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Lezaeta <prflr88@gmail.com>2012-07-18 15:53:43 -0400
committerPablo Lezaeta <prflr88@gmail.com>2012-07-18 15:53:43 -0400
commit3e35bb7eac0ec440a2329e81ded9de4509828494 (patch)
tree20dd09e652b9e07679b2162d13ec5821a631bf30
parent998458131e5f5c59072558feb8d8b5c9fe137390 (diff)
parent4c2b7c49e79c9d1f17f560ad6a5149fc67514084 (diff)
downloadponysay-3e35bb7eac0ec440a2329e81ded9de4509828494.tar.gz
ponysay-3e35bb7eac0ec440a2329e81ded9de4509828494.tar.bz2
ponysay-3e35bb7eac0ec440a2329e81ded9de4509828494.zip
Merge remote-tracking branch 'upstream/master'
-rw-r--r--CREDITS2
-rw-r--r--completion/fish-completion.fish22
2 files changed, 18 insertions, 6 deletions
diff --git a/CREDITS b/CREDITS
index 4134678..aa46e41 100644
--- a/CREDITS
+++ b/CREDITS
@@ -4,12 +4,12 @@
Erkin Batu Altunbaş
Mattias Andrée
Sven-Hendrik Haase
+Pablo Lezaeta
Jan Alexander Steffens
# Patchers and other contributors
Elis Axelsson
Duane Bekaert
-Pablo Lezaeta
Kyah Rindlisbacher
James Ross-Gowan
Louis Taylor
diff --git a/completion/fish-completion.fish b/completion/fish-completion.fish
index ea98382..8d3c911 100644
--- a/completion/fish-completion.fish
+++ b/completion/fish-completion.fish
@@ -4,21 +4,33 @@
#
# 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
+
-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\//')
+if test -d $systempath
+ set -g systemponies (ls --color=no $systempath | sed 's/\.pony//')
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\//')
+if test -d $homepath
+ set -g homeponies (ls --color=no $homepath | sed 's/\.pony//')
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 f -a "$homeponies $systemponies" --description "Ponyfile"
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