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

Colorize -printf output when using -color #62

Closed
bmundt6 opened this issue Sep 9, 2020 · 2 comments · Fixed by #79
Closed

Colorize -printf output when using -color #62

bmundt6 opened this issue Sep 9, 2020 · 2 comments · Fixed by #79

Comments

@bmundt6
Copy link
Contributor

bmundt6 commented Sep 9, 2020

It would be very handy, for instance, if bfs -type l -color -printf '%f\n' were to print colorized symlink names.

@tavianator
Copy link
Owner

Agreed! The main reason I haven't done this yet is that -printf supports directives like %.2f that color.c doesn't handle, and I don't really want to write an entire printf() implementation. But I can sidestep that just by formatting the name with sprintf() and then printing it with cfprintf(). Should be ready soon.

@tavianator
Copy link
Owner

The hard case is stuff like -printf '%10p' which adds leading padding. Haven't quite figured out what to do there.

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

Successfully merging a pull request may close this issue.

2 participants