]> arthur.barton.de Git - bup.git/commit
ftp/ls: columnate output attached to a tty, else don't
authorGabriel Filion <lelutin@gmail.com>
Mon, 16 May 2011 04:27:20 +0000 (00:27 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 29 May 2011 22:59:14 +0000 (18:59 -0400)
commit3b3869e931ae38a8d7db596a87fa1e50e63e6e55
treeea9911404c662b32a807e13f955fc9810601caa6
parent2870930d67c39283de24a3b889cff6d024fe4459
ftp/ls: columnate output attached to a tty, else don't

'bup ftp ls' and 'bup ls' currently behave in a different manner.

'bup ftp ls' always formats its output in columns regardless of whether
the program's stdout is a tty or not.

'bup ls' always prints one name on each line.

Make both of those commands behave the same. By using lib/bup/helpers'
istty1 variable, decide to format in columns when outputting to a tty,
and to output one file name per line when the output is not a tty.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
cmd/ftp-cmd.py
cmd/ls-cmd.py