Skip to content
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

Auto-detect delimiter #294

Open
harrybiddle opened this issue Mar 18, 2022 · 0 comments
Open

Auto-detect delimiter #294

harrybiddle opened this issue Mar 18, 2022 · 0 comments

Comments

@harrybiddle
Copy link

harrybiddle commented Mar 18, 2022

Unfortunately, I am not in an environment where .csv files are always comma-separated and .tsv files are tab-separated. In my work I unfortunately frequently encounter semi-colon separated files.

It would be incredibly useful if xsv detected the delimiter for me. I tried to achieve this using a bash wrapper, but it was a bit fiddly because I need to do different things depending on whether xsv is being passed a file (in which case I sniff the file and then pass the delimiter to the xsv command) or a stream (in which case I sniff the stream, and then pass the amount I've already sniffed plus the rest of the stream to xsv).

My little hacky wrapper works (mostly!) but it would be much better implemented in xsv itself.

Possibly there could be an environment variable to set "auto-detect delimiter" as the default mode a-la #44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant