Re: [Libguestfs] [libguestfs-common PATCH 2/3] Tools_utils.wrap: only wrap text for TTYs

2022-02-12 Thread Richard W.M. Jones
On Fri, Feb 11, 2022 at 04:32:24PM +0100, Laszlo Ersek wrote: > Whenever stdout and/or stderr is redirected (usually to a regular file), > users mostly do that to capture logs, for later searching. Wrapping > interferes with grep though, so make "wrap" just print the string when the > output channe

[Libguestfs] [libguestfs-common PATCH 2/3] Tools_utils.wrap: only wrap text for TTYs

2022-02-11 Thread Laszlo Ersek
Whenever stdout and/or stderr is redirected (usually to a regular file), users mostly do that to capture logs, for later searching. Wrapping interferes with grep though, so make "wrap" just print the string when the output channel is not a TTY. The requested indentation is honored though. Bugzilla