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

📚 document allowed colors #589

Closed
strazto opened this issue Mar 3, 2021 · 0 comments · Fixed by #590
Closed

📚 document allowed colors #589

strazto opened this issue Mar 3, 2021 · 0 comments · Fixed by #590

Comments

@strazto
Copy link
Contributor

strazto commented Mar 3, 2021

I wanted to colourize by calendars, and noticed, from a screenshot, that there was a way to do so:

--calendar="calendar name#color"

Yay!

So I started adding these to my rc file, but hit an error on #purple.

I looked up this in the issues and found that someone described something about using google's colour names for calendars.

I thought that sounded reasonable, so I started to edit my colours to match googles, before getting an error for doing so.

I tried to search the man page, but there was no indication. I didn't really want to guess about what would or wouldn't work.

Finally, since I knew that this was being thrown by the arg parser, I checked the code in argparse, followed that through to printer and got the following:

COLOR_NAMES = set(('default', 'black', 'red', 'green', 'yellow', 'blue',
'magenta', 'cyan', 'white', 'brightblack', 'brightred',
'brightgreen', 'brightyellow', 'brightblue',
'brightmagenta', 'brightcyan', 'brightwhite'))

I recognize that these are the ANSII escape colours, which I might have guessed, but I didn't know.

I know it sounds petty, but I'm disappointed to have gone through so much work to colourize my outputs. I would really like this option to be documented in the argparse output, so the error is less ambiguous.

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 a pull request may close this issue.

1 participant