aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xponysay7
1 files changed, 3 insertions, 4 deletions
diff --git a/ponysay b/ponysay
index 42db27a..179a491 100755
--- a/ponysay
+++ b/ponysay
@@ -29,6 +29,9 @@ usage() {
}
say() {
+ # Ponies use UTF-8 drawing characters. Prevent a Perl warning.
+ export PERL_UNICODE=S
+
exec "$cmd" -f "$pony" "${wrap:+-W$wrap}"
}
@@ -60,10 +63,6 @@ if [[ ! -f $pony ]]; then
pony="${ponies[$RANDOM%${#ponies[@]}]}"
fi
-
-# Ponies use UTF-8 drawing characters. Prevent a Perl warning.
-export PERL_UNICODE=S
-
if [[ -n "$*" ]]; then
# Handle a message given via arguments
say <<<"$*"