BurntSushi / xsv

A fast CSV command line toolkit written in Rust.
The Unlicense
10.29k stars 317 forks source link

xsv table does not handle Tabs well #289

Open giganteous opened 2 years ago

giganteous commented 2 years ago

Hello,

I discovered a funny artifact when a csv contains tabs in a field; somehow the tab in a column makes the rest of the field display under the next column. I have attached a very small test file testset.csv .

It displays as this:

containstabs  changedvalue
foo           bar
"b            a   z"  baz
notabs        notabs
"one          tab"  one tab

Browsing at TabWriter I see that the delimiter is set to a tab. Since xsv table is not meant to be consumed by a process, I'd propose to replace any tabs with a space (or 2).

Small nuisance in a great tool! thanks for writing it.