mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-26 14:18:00 +01:00
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:
commit
ca0fffcd61
2 changed files with 5 additions and 1 deletions
2
ponysay
2
ponysay
|
@ -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" ;;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue