diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-13 17:04:35 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-13 17:04:35 -0500 |
commit | 895a88886525dd3e6d2d0db996cedb7e73455fbb (patch) | |
tree | eefe31eb84bd330b5bd18cf3dbf5bf5fa5096456 /lib/libalpm/util.h | |
parent | b0590400111c04e1c6a42052d3f03986b4ad31aa (diff) | |
download | pacman-895a88886525dd3e6d2d0db996cedb7e73455fbb.tar.xz |
Fix list_display on non-ttys and other output fixes
commit c1f742d7750a14 broke what was one of the tenants of out output-
if piping pacman output somewhere else, we shouldn't ever try to
line-wrap and indent print our output. This makes it easier for tools to
use output from pacman -Ss, -Qs, -Qi, etc. list_display() unfortunately
was given a default value of 80 rather than 0, so fix this.
Next, make some additional changes that ensure we don't insert an
unnecessary blank line if for some crazy reason the indent level (such
as on -Qi output) is greater than the number of columns. Accomplish this
by printing the first item unconditionally as we do in
list_display_linebreak().
Finally, teach indentprint to not wrap if the number of columns is less
than the indent level, this prevents some forms of ridiculous output
such as the following:
Install Date : Wed
08
Jun
2011
04:39:19
AM
CDT
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.h')
0 files changed, 0 insertions, 0 deletions