mirror of
https://github.com/erkin/ponysay.git
synced 2025-02-16 17:44:23 +01:00
environment variable PONYSAY_TRUNCATE_HEIGHT
This commit is contained in:
parent
4a39ef4230
commit
348c0084a8
2 changed files with 4 additions and 1 deletions
|
@ -70,6 +70,9 @@ than the screen.
|
||||||
.B PONYSAY_FULL_WIDTH
|
.B PONYSAY_FULL_WIDTH
|
||||||
You can export \fBPONYSAY_FULL_WIDTH\fP with the value \fIno\fP, \fIn\fP or \fI0\fP, if you
|
You can export \fBPONYSAY_FULL_WIDTH\fP with the value \fIno\fP, \fIn\fP or \fI0\fP, if you
|
||||||
do not want the output to be truncated on the width to fit the terminal.
|
do not want the output to be truncated on the width to fit the terminal.
|
||||||
|
.B PONYSAY_TRUNCATE_HEIGHT
|
||||||
|
Export \fBPONYSAY_TRUNCATE_HEIGHT\fP with the value \fIyes\fP, \fIy\fP or \fI1\fP, if you
|
||||||
|
want to truncate the output on the height even if you are not running \fIponysay\fP under TTY.
|
||||||
.SH BUG
|
.SH BUG
|
||||||
Bugs can be reported in <\fBhttps://github.com/erkin/ponysay/issues\fP>.
|
Bugs can be reported in <\fBhttps://github.com/erkin/ponysay/issues\fP>.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|
2
ponysay
2
ponysay
|
@ -81,7 +81,7 @@ say() {
|
||||||
head --lines=$(( $(stty size <&2 | cut -d ' ' -f 1) - $PONYSAY_SHELL_LINES ))
|
head --lines=$(( $(stty size <&2 | cut -d ' ' -f 1) - $PONYSAY_SHELL_LINES ))
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$TERM" = "linux" ]; then
|
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
|
if [ "$PONYSAY_BOTTOM" = 'yes' ] || [ "$PONYSAY_BOTTOM" = 'y' ] || [ "$PONYSAY_BOTTOM" = '1' ]; then
|
||||||
exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc | tac | htrunc | tac
|
exec "$cmd" -f "$pony" "${wrap:+-W$wrap}" | wtrunc | tac | htrunc | tac
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue