Merge branch 'master' of github.com:erkin/ponysay

This commit is contained in:
Mattias Andrée 2012-07-21 14:04:07 +02:00
commit 7757e6e845
3 changed files with 7 additions and 3 deletions

View file

@ -13,11 +13,11 @@ end
if test -d $systempath if test -d $systempath
set -g systemponies (ls --color=no $systempath | sed 's/\.pony//') set -g systemponies (ls --color=no $systempath | sed -e 's/\.pony//' -e 's/_.*//' | perl -pe 's/([a-z])([A-Z])/\1\\\ \2/' )
end end
if test -d $homepath if test -d $homepath
set -g homeponies (ls --color=no $homepath | sed 's/\.pony//') set -g homeponies (ls --color=no $systempath | sed -e 's/\.pony//' -e 's/_.*//' | perl -pe 's/([a-z])([A-Z])/\1\\\ \2/' )
end end

View file

@ -270,7 +270,7 @@ while getopts $opts OPT; do
case ${OPT} in case ${OPT} in
v) version; exit ;; v) version; exit ;;
h) usage; exit ;; h) usage; exit ;;
f) ponies+=( "$OPTARG" ) ;; f) ponies+=($(echo $OPTARG | sed -e 's/ //g')) ;;
l) list; exit ;; l) list; exit ;;
L) linklist; exit ;; L) linklist; exit ;;
W) wrap="$OPTARG" ;; W) wrap="$OPTARG" ;;

View file

@ -15,6 +15,10 @@ $maxw = 1;
foreach $arg (@ARGV) foreach $arg (@ARGV)
{ {
# Format names from ponyies names
$arg =~ s/([a-z])([A-Z])/\1 \2/;
$arg =~ s/_(.*)/\t(\1)/;
if ($first == 1) if ($first == 1)
{ $first = 0; { $first = 0;
$scrw = $arg; $scrw = $arg;