Closed drzraf closed 2 months ago
I will see what I can do to bypass truncation when using --logfile
to write output to file.
I have added a --no-truncate
option that bypasses availableWidth()
. You should be able to make use of it in conjunction with redirection or the --logfile
option. Let me know if it works for you.
Thanks!
--logfile
option. I didn't tested it since I stayed concentrated on --ouput
.--no-truncate
works perfectly.Thank you!
Great! Glad to hear it. Thanks for the feedback!
Current code for
prettyPrint
handles table-output (and fields truncation). For this anavailableWidth
function does the followingioctl(STDOUT_FILENO, TIOCGWINSZ, &ts)
what doesn't work in the case of output redirection. As a consequence, width is restricted what triggers truncation mechanisms thus generating an unusable file (what is bad if it goes unnoticed by the user)
Either
output
should work as intended (and bypass the truncation mechanism) (see #218), either the user must be able to opt-out truncation. Could be looking forCOLUMNS
environment variable or MySQL-like--raw
flag, ...BTW I failed to find a way to workaround this (other than copy/pasting the output). No bash-fd-redirection-tweak-syntax-foo would help me duplicating stdout without
TIOCGWINSZ
being triggered.