New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
column -ts '<TAB>'
misaligns tab delimited files
#575
Comments
karelzak
added a commit
that referenced
this issue
Feb 12, 2018
Non-space separator: $ echo -e ",col1,col2\nrow,1,2" | column -t -s "," --table-columns A,B,C A B C col1 col2 row 1 2 Space-char (\t) separator: $ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')" --table-columns A,B,C A B C col1 col2 row 1 2 Fixed version: $ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')" --table-columns A,B,C A B C col1 col2 row 1 2 Addresses: #575 Signed-off-by: Karel Zak <kzak@redhat.com>
Yes, column(1) ignores space chars at the begin of the input line. Fixed. Let's hope it does not introduce any regression.
|
karelzak
added a commit
that referenced
this issue
Mar 27, 2018
The bug has been introduced during column(1) rewrite. The function read_input() need to skip leading space only temporary to detect empty lines, but the rest of the code has to use the original buffer (line). I've tried to fix one of the symptoms by 5c7b67f (alter), but this solution is unnecessary and too complex. Changes: * don't ignore leading space * remove unnecessary stuff introduced by 5c7b67f * fix regression test with incorrect separator Addresses: #575 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283 Signed-off-by: Karel Zak <kzak@redhat.com>
karelzak
added a commit
that referenced
this issue
Mar 27, 2018
The bug has been introduced during column(1) rewrite. The function read_input() need to skip leading space only temporary to detect empty lines, but the rest of the code has to use the original buffer (line). Addresses: #575 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283 Signed-off-by: Karel Zak <kzak@redhat.com>
karelzak
added a commit
that referenced
this issue
Jul 12, 2018
The bug has been introduced during column(1) rewrite. The function read_input() need to skip leading space only temporary to detect empty lines, but the rest of the code has to use the original buffer (line). I've tried to fix one of the symptoms by 5c7b67f (alter), but this solution is unnecessary and too complex. Changes: * don't ignore leading space * remove unnecessary stuff introduced by 5c7b67f * fix regression test with incorrect separator Addresses: #575 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283 Signed-off-by: Karel Zak <kzak@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where
<TAB>
is a literal TAB character introduced with Ctrl+v Tab, produces:instead of the correct:
which is produced if instead of a
<TAB>
a , is used:The cause seems to be that the
<TAB>
character is considered 'whitespace' and is stripped from the beginning of the line, causing the alignment shift.The text was updated successfully, but these errors were encountered: