-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add --color
flag
#483
base: main
Are you sure you want to change the base?
Add --color
flag
#483
Conversation
closes #482 |
Nice addition, although using the color flag with
This isn't a great experience as each user will be used to having the output formatted in the way they have set it. Also, once this is sorted, it would be great if you could address the failing test (tesh) cases. Read through CONTRIBUTING.md for clarification on that. I think it's just to do with the standard output from the help menu. |
So to be clearer, the color force should hook in somewhere deeper, so that it will still be applied to commands run via aliases / modified config settings. |
ok, but where do you think should the flag be parsed? i think that adding the --color as a part of the alias make more sense. Are we on the same page? |
sure, i'll look into it once i complete the implementation 👍🏻 |
@tjex ,
The purpose of the --color flag is to display colored text, even if the ouput is not a tty (which usually happens when you are piping the output of zk to a pager or fzf). |
Flag `--color` forces colored output, even if stdout is not a terminal. Motivation - `grep --color=always` - `ls --color=always` Application - Allows colored text when piping to tools like fzf outside of `zk list --interactive`
Yep, I'm on the same page. This is why running So the question then is, do we want the This could be the simplest solution, to just add the so Thoughts? |
Yes. This actually makes more sense as none of the other commands use colored output (with the exception of |
TL;DR
Flag
--color
forces colored output, even if stdout is not a terminal.Motivation
grep --color=always
ls --color=always
Application
zk list --interactive