Skip to content

Commit

Permalink
Merge branch 'master' of github.com:erkin/ponysay
Browse files Browse the repository at this point in the history
  • Loading branch information
maandree committed Jul 19, 2012
2 parents f5e3dac + 4c2b7c4 commit e120219
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions completion/fish-completion.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e120219

Please sign in to comment.