-
Notifications
You must be signed in to change notification settings - Fork 18
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
Output delimiter should be same as input #46
Comments
Hi! I would lean toward no because a regex can be used as the delimiter and the behavior in that scenario could be surprising. But I'll think about it a bit more and leave this issue open for now. The other bit of my reasoning is that while iterating on a one-liner, tabs are preferable to look at the outputs, then, once you've settled on the command, it's not too onerous to switch to a different output delimiter. |
@ghuls, as the only other active user of |
@sstadick I generally work with TAB delimited files and not often with files with other delimiters. I use it for processing of multi gigabyte files and not for small text files, so typing a few extra characters does not bother me. TABs by default make everything more readable imho. awk also uses The need to add a dolar sign before ' ❯ hck -d ':' -D $'\t' /etc/group | head
root x 0
bin x 1
daemon x 2
sys x 3
adm x 4
tty x 5
disk x 6
lp x 7
mem x 8
kmem x 9
❯ hck -d ':' -D '\t' /etc/group | head
root\tx\t0\t
bin\tx\t1\t
daemon\tx\t2\t
sys\tx\t3\t
adm\tx\t4\t
tty\tx\t5\t
disk\tx\t6\t
lp\tx\t7\t
mem\tx\t8\t
kmem\tx\t9\t
❯ hck -d ':' -D '\n' /etc/group | head
root\nx\n0\n
bin\nx\n1\n
daemon\nx\n2\n
sys\nx\n3\n
adm\nx\n4\n
tty\nx\n5\n
disk\nx\n6\n
lp\nx\n7\n
mem\nx\n8\n
kmem\nx\n9\n
/v/leuven-user/303/vsc30366 vsc30366 in r23i27n23 in /v/leuven-user/303/vsc30366 via 🐏 467GiB/756GiB 62%
❯ hck -d ':' -D $'\n' /etc/group | head
root
x
0
bin
x
1
daemon
x
|
That's a good point, the |
#47 will fix the unescaping for @mbhall88 I've compromised and added a |
@sstadick Thanks for fixing the unescaping. Works much more convenient now. |
Closing for now, please reopen if needed. |
cut
automatically uses the input delimiter as the output delimiter. I find it quite annoying to have to specify the delimiter twice. I wonder if you would consider changing the default behaviour to do so? I appreciate this is a breaking change, but might be better to do this before hitting v1?The text was updated successfully, but these errors were encountered: