aboutsummaryrefslogtreecommitdiff
path: root/ponysay
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-18 01:56:08 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-18 01:56:08 +0200
commit532ab6c6ee1e529cc98e4d85cd27d5664d2752ac (patch)
tree5b442a4dff2df7f8dc765b3ca9dbe0970442c1d7 /ponysay
parent65409b446bcac6bb2a2a5dee3c146fb92e71ba31 (diff)
downloadponysay-532ab6c6ee1e529cc98e4d85cd27d5664d2752ac.tar.gz
ponysay-532ab6c6ee1e529cc98e4d85cd27d5664d2752ac.tar.bz2
ponysay-532ab6c6ee1e529cc98e4d85cd27d5664d2752ac.zip
but i wasn't prepared for this
Diffstat (limited to 'ponysay')
-rwxr-xr-xponysay14
1 files changed, 7 insertions, 7 deletions
diff --git a/ponysay b/ponysay
index b27905e..0d0beee 100755
--- a/ponysay
+++ b/ponysay
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-VERSION=1.4
+VERSION=1.4.1
@@ -90,7 +90,7 @@ _linklist() {
for file in $files; do
target=$(readlink $1"/"$file".pony")
- if [[ $target = "" ]]; then
+ if [ $target = "" ]; then
target=$file
else
target=$(echo $target | sed -e 's/^\.\///g' -e 's/\.pony$//g')
@@ -114,7 +114,7 @@ linklist() {
# Pony quotes
ponyquotes() {
[ "$TERM" = "-linux-" ] && TERM="linux"
- "$0" ${wrap:+-W$wrap} $("$quotecmd" "$*")
+ "$0" ${wrap:+-W$wrap} $("$quotecmd" $@)
}
# Usage help print function
@@ -146,7 +146,7 @@ say() {
export PERL_UNICODE=S
# Clear screen in TTY
- ( [ "$TERM" = "linux" ] || [ "$TERM" = "-linux-" ]) && echo -ne '\e[H\e[2J'
+ ( [ "$TERM" = "linux" ] || [ "$TERM" = "-linux-" ] ) && echo -ne '\e[H\e[2J'
# Set PONYSAY_SHELL_LINES to default if not specified
[ "$PONYSAY_SHELL_LINES" = "" ] && PONYSAY_SHELL_LINES=2
@@ -156,7 +156,7 @@ say() {
if [ "$PONYSAY_FULL_WIDTH" = 'yes' ] || [ "$PONYSAY_FULL_WIDTH" = 'y' ] || [ "$PONYSAY_FULL_WIDTH" = '1' ]; then
cat
else
- if [[ -f $truncatercmd ]]; then
+ if [ -f $truncatercmd ]; then
$truncatercmd $scrw
else
cat
@@ -220,7 +220,7 @@ say() {
# If no stdin and no arguments then print usage and exit
-if [ -t 0 && $# == 0 ]; then
+if [ -t 0 ] && [ $# == 0 ]; then
usage
exit
fi
@@ -236,7 +236,7 @@ while getopts "f:W:Llhvq" OPT; do
l) list; exit ;;
L) linklist; exit ;;
W) wrap="$OPTARG" ;;
- q) ponyquotes; exit ;;
+ q) shift $((OPTIND - 1)); ponyquotes "$*"; exit ;;
\?) usage >&2; exit 1 ;;
esac
done