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

diff: add option/flag --delimiter-output #1402

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

janriemer
Copy link

@janriemer janriemer commented Nov 5, 2023

This adds an option to specify, which delimiter to use for the resulting diff output. By default, it uses ',' as the delimiter.

Note: to be consistent with other commands in qsv, this also renames the option/flag --no-headers-result -> --no-headers-output

Closes #1396

Example

csv_left.csv

col1,col2,col3
1,foo,bar

csv_right.csv

col1,col2,col3
1,foo,baz
qsv diff --delimiter-output ';' csv_left.csv csv_right.csv

Output:

diffresult;col1;col2;col3
-;1;foo;bar
+;1;foo;baz

Jan Riemer added 3 commits November 5, 2023 16:27
We want to be consistent with the rest of qsv.
This adds an option to specify, which delimiter to use for the resulting
diff output. By default, it uses ',' as the delimiter.

Example:
csv_left.csv    col1,col2,col3
                1,foo,bar

csv_right.csv   col1,col2,col3
                1,foo,baz

qsv diff --delimiter-output ';' csv_left.csv csv_right.csv

Output:         diffresult;col1;col2;col3
                -;1;foo;bar
                +;1;foo;baz
@janriemer janriemer force-pushed the diff-flag-delimiter-output branch from 94d5913 to f934fb1 Compare November 5, 2023 16:34
@jqnatividad jqnatividad merged commit 7be69db into dathere:master Nov 6, 2023
11 checks passed
@janriemer janriemer deleted the diff-flag-delimiter-output branch November 6, 2023 07:29
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

Successfully merging this pull request may close these issues.

diff: Provide an option to set the delimiter for the output
2 participants