using truncater if found

This commit is contained in:
Mattias Andrée 2012-05-07 02:05:57 +02:00
parent 986d158bfe
commit 518058c3e5

View file

@ -44,7 +44,7 @@ say() {
# Ponies use UTF-8 drawing characters. Prevent a Perl warning.
export PERL_UNICODE=S
exec "$cmd" -f "$pony" "${wrap:+-W$wrap}"
exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | (ponysaytruncater `tput cols || echo 0` 2>/dev/null || ./ponysaytruncater `tput cols || echo 0` 2>/dev/null || cat)
}
while getopts f:W:lhv OPT