From 4dbdca4e85e04fffad598df589fd2114ae267be5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 19 Jul 2012 23:39:21 +0200 Subject: adding support for customise cowsay with UCS use, but removing support for cowsay replacers not written in perl; I will provide a screenshot and an environment variable for this.. --- ponysay | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ponysay') diff --git a/ponysay b/ponysay index d7fb068..bacf1eb 100755 --- a/ponysay +++ b/ponysay @@ -210,12 +210,12 @@ say() { if [ "$TERM" = "linux" ] || [ "$PONYSAY_TRUNCATE_HEIGHT" = 'yes' ] || [ "$PONYSAY_TRUNCATE_HEIGHT" = 'y' ] || [ "$PONYSAY_TRUNCATE_HEIGHT" = '1' ]; then if [ "$PONYSAY_BOTTOM" = 'yes' ] || [ "$PONYSAY_BOTTOM" = 'y' ] || [ "$PONYSAY_BOTTOM" = '1' ]; then - exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunctail + perl <(cat <(echo -e '#!/usr/bin/perl\nuse utf8;') $(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)) -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunctail else - exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunchead + perl <(cat <(echo -e '#!/usr/bin/perl\nuse utf8;') $(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)) -f "$pony" "${wrap:+-W$wrap}" | wtrunc | htrunchead fi else - exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc + perl <(cat <(echo -e '#!/usr/bin/perl\nuse utf8;') $(for c in $(echo $PATH":" | sed -e 's/:/\/'"$cmd"' /g'); do if [[ -f $c ]]; then echo $c; break; fi done)) -f "$pony" "${wrap:+-W$wrap}" | wtrunc fi } -- cgit