-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
Implement option for printing custom formats #1043
Conversation
Thank you very much for taking a stab at this! I didn't have time to properly review it, but I think I am in favor of integrating this new option! That is, unless it leads to a performance penalty for the default case (without Something that I thought about in a different context, but seems fitting here: I'm not a huge fan of the |
I like the more verbose names too. |
👍. We can also do this in a follow up PR though. |
Regardless of the short/long syntax discussion, I'd like to see this being integrated to @tmccombs Are you still interested in finishing this? It would probably be best to focus on the benchmarks first, to make sure that we don't run into performance regressions. |
794865b
to
f66d1ae
Compare
Sorry it took me so long to get back to this. I am interested in finishing this. Though I wouldn't mind some help with benchmarking it. |
It would be great to pick this up again. Anything I can do? I can definitely take care of the benchmarks. I could also take a look at fixing the merge conflicts (?). |
f66d1ae
to
f0e7bc8
Compare
I fixed the merge conflicts. One question I have is if we would rather have a --printf option with more format optiions, such as access and modified times, owning user and group, etc. Certainly not as extensive as find, but more than just variants of the path. Although, I really don't love the idea of having two different format syntaxes. |
I would personally like if we extend the |
That sounds good to me. |
f0e7bc8
to
985f2b1
Compare
b3a82e6
to
1d8ad3d
Compare
004ca65
to
b04d800
Compare
long, | ||
value_name = "fmt", | ||
help = "Print results according to template", | ||
conflicts_with = "list_details" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much and sorry for the late review!
I've run a few benchmarks with hyperfine, and haven't noticed a significant difference in performance. |
This is mostly a proof of concept before merging there is still some work that needs to be done for:
Also, this doesn't currently support colorized output when using format string. I think that for an initial implementation that is probably fine.