-
Notifications
You must be signed in to change notification settings - Fork 74
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
: only show headers when there are differences
#1326
Comments
Hey @jqnatividad 👋 this definitely sounds like a useful feature to have! 👍 Thank you for bringing this up! I can imagine a use-case, where one can more easily check via a script if there is a diff or not, when there is no output, when files are identical. At first, I was a bit worried that this would make composing diff results together more difficult: Scenario: comparing files A and B and then comparing that result (let's call it AB) with C, where all files have headers - all in one command => It would be impossible to configure Suggested solutionAfter thinking about this a little more, though, I think we can generalize this feature to the following: => Let's provide an option that configures, whether the diff result should output headers or not (independent of whether both files are equal). The current behavior (without this option) is: use headers, when at least one file has headers. Remaining open questions (and possible solutions)Note: the names that are used for cli options here probably won't be the exact names in the final implementation.
Possible solutions:
What do you think about this? I'm glad, we can improve |
Hi @janriemer! 👋 Thanks for giving this feature request a lot of thought. Let's go with your preferred solution. The one thing I'd bring to your attention is how to For consistency, perhaps, https://github.com/jqnatividad/qsv/blob/master/src/cmd/rename.rs WDYT? |
Hi @jqnatividad, just want to let you know that I'm actively working on this. First tests seem promising! 🙂 Thank you also for the hint regarding I think we need to expose the number of columns somehow in Nothing, we can't solve, though. 😉 I'll probably give another update on Wednesday or next weekend. 🤞 |
Hi @jqnatividad 👋 another update: an MR for the crate
After the acceptance of the MR, I'll prepare a new release of Next steps
Some anecdote (not important, only if you're interested)Providing the above functionality in |
Thanks for the update @janriemer ! I look forward to merging the first non-beta powered And I can emphatize with your journey with it - I've gone down many dead-ends with qsv myself, and even ended up reverting some code several times and removing features (like auto-transcoding to utf-8). It's interesting you mention BTW, speaking of I do this in several commands in addition to qsv is meant to be used in pipelines as well, and having machine-readable JSON would be great! |
Hey @jqnatividad sorry for the late reply. 😳 The PR for this issue is ready at #1395! 🎉 Thank you for sharing your experience of your journey with qsv and the difficulties you've encountered along the way. qsv is a very complex project and I'm very impressed by what you've achieved so far! 🎩 Yeah, I can imagine Yes, thank you for the idea regarding JSON output. 👍 It is on my list of TODOs, but "unfortunately" this list gets longer and longer. 😄 I'd like to have some other things take priority right now, that are more kind of stabilizations, like:
But I'll see what I can do. 😉 With |
@janriemer , I think it'd be great if
qsv diff
behaves like the diff CLI command, which produces no output when files are identical.The text was updated successfully, but these errors were encountered: