mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 20:38:00 +01:00
Merge branch 'master' of github.com:erkin/ponysay
This commit is contained in:
commit
7757e6e845
3 changed files with 7 additions and 3 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
2
ponysay
2
ponysay
|
@ -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" ;;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue