Merge pull request #50 from etu/master

Updated ponysay to support names like "Apple Jack" and list.pl to format those names
This commit is contained in:
Mattias Andrée 2012-07-21 03:12:23 -07:00
commit ca0fffcd61
2 changed files with 5 additions and 1 deletions

View file

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

View file

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