diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-07-21 14:04:07 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-07-21 14:04:07 +0200 |
commit | 7757e6e8454502335d3bd8a8b786d9043275c5db (patch) | |
tree | ccd1ecf839c42b2f5b7c3408b1f49d5d89f5283d | |
parent | 4ff170065c649a6f34da55c3e2a426f38259227a (diff) | |
parent | 232fd2461ab2d53a22524c2771e7d1d71d57c37f (diff) | |
download | ponysay-7757e6e8454502335d3bd8a8b786d9043275c5db.tar.gz ponysay-7757e6e8454502335d3bd8a8b786d9043275c5db.tar.bz2 ponysay-7757e6e8454502335d3bd8a8b786d9043275c5db.zip |
Merge branch 'master' of github.com:erkin/ponysay
-rw-r--r-- | completion/fish-completion.fish | 4 | ||||
-rwxr-xr-x | ponysay | 2 | ||||
-rwxr-xr-x | ponysaylist.pl | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/completion/fish-completion.fish b/completion/fish-completion.fish index 08b42c4..8299564 100644 --- a/completion/fish-completion.fish +++ b/completion/fish-completion.fish @@ -13,11 +13,11 @@ end 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 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 @@ -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')) ;; l) list; exit ;; L) linklist; exit ;; W) wrap="$OPTARG" ;; diff --git a/ponysaylist.pl b/ponysaylist.pl index 7a09376..72c0a92 100755 --- a/ponysaylist.pl +++ b/ponysaylist.pl @@ -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; |