tldr-python-client icon indicating copy to clipboard operation
tldr-python-client copied to clipboard

Feature request: more color setup

Open EmilyGraceSeville7cf opened this issue 4 years ago • 3 comments

I suggest split TLDR_COLOR_COMMAND into the two variables:

Variable Meaning
TLDR_COLOR_COMMAND Color for only the first token in the code example
TLDR_COLOR_OPTION Color for only the long/old/short options and flags

and add envs to control braces and pipe symbol colors:

Variable Meaning
TLDR_COLOR_BRACE Color for the opening/closing braces
TLDR_COLOR_PIPE Color for only the pipe symbol

Maybe I can try to create PR for this issue. ;)

EmilyGraceSeville7cf avatar Dec 01 '21 17:12 EmilyGraceSeville7cf

Getting to be quite a lot of environment variables, and time to have a configuration file instead, especially on adding more specific theming stuff.

Might be good to look at interop with the tldr-node-client and move to having a .tldrrc file that you can use to configure settings, and follow what they have there for color options: https://github.com/tldr-pages/tldr-node-client#configuration

Could then add the brace and pipe on top of that, with a suggestion to add it there.

MasterOdin avatar Dec 01 '21 19:12 MasterOdin

Well, as I understood we have to use environment variables for basic customization and .tldrrc for advanced one. Right? What has more priority: environment variables or .tldrrc?

EmilyGraceSeville7cf avatar Dec 02 '21 03:12 EmilyGraceSeville7cf

Eh, for now, I'm fine with you just implementing these as new environment variables. I'll make a separate issue to track implementing .tldrrc.

What has more priority: environment variables or .tldrrc?

environment variables should have top priority, so that it allows doing TLDR_LANGUAGE=es in a given terminal session and just use that, without overwriting the default permanently.

MasterOdin avatar Dec 02 '21 03:12 MasterOdin