fix on env var

This commit is contained in:
Mattias Andrée 2012-07-20 05:22:46 +02:00
parent 301197ff74
commit 122f1da602
3 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ of how many blank lines you want. Naturally this takes effect if the output is n
than the screen.
.TP
.B PONYSAY_FULL_WIDTH
You can export \fIPONYSAY_FULL_WIDTH\fP with the value \fIno\fP, \fIn\fP or \fI0\fP, if you
You can export \fIPONYSAY_FULL_WIDTH\fP with the value \fIyes\fP, \fIy\fP or \fI1\fP, if you
do not want the output to be truncated on the width to fit the terminal.
.TP
.B PONYSAY_TRUNCATE_HEIGHT

View file

@ -77,7 +77,7 @@ el valor de cuantas líneas blancas desea. Naturalmente esto solo tomará efecto
larga que la pantalla.
.TP
.B PONYSAY_FULL_WIDTH
Puede exportar \fIPONYSAY_FULL_WIDTH\fP con el valor \fIno\fP, \fIn\fP o \fI0\fP, si usted
Puede exportar \fIPONYSAY_FULL_WIDTH\fP con el valor \fIyes\fP, \fIy\fP o \fI1\fP, si usted
no desea que la salida sea truncada para que calce en la terminal.
.TP
.B PONYSAY_TRUNCATE_HEIGHT

View file

@ -194,7 +194,7 @@ say() {
function wtrunc
{
if [ "$PONYSAY_FULL_WIDTH" = 'no' ] || [ "$PONYSAY_FULL_WIDTH" = 'n' ] || [ "$PONYSAY_FULL_WIDTH" = '0' ]; then
if [ "$PONYSAY_FULL_WIDTH" = 'yes' ] || [ "$PONYSAY_FULL_WIDTH" = 'y' ] || [ "$PONYSAY_FULL_WIDTH" = '1' ]; then
cat
else
WIDTH=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2`