Open andelink opened 2 years ago
Hey @willmcgugan, do you have any thoughts on this? PR:
Seems reasonable. There are probably a few other env vars that could be added. Such as default theme.
I believe a default theme is already supported via RICH_THEME
:
There are a few more listed in the rich docs:
Rich respects some standard environment variables.
Setting the environment variable
TERM
to"dumb"
or"unknown"
will disable color/style and some features that require moving the cursor, such as progress bars.If the environment variable
NO_COLOR
is set, Rich will disable all color in the output.If
width
/height
arguments are not explicitly provided as arguments toConsole
then the environment variablesCOLUMNS
/LINES
can be used to set the console width/height.JUPYTER_COLUMNS
/JUPYTER_LINES
behave similarly and are used in Jupyter.
Hi team, I've just discovered Rich and this CLI and I'm a big fan. Thanks for making this such an awesome tool!
While using it, I quickly noticed a desire to set-and-forget the
--hyperlinks
flag so I would not need to pass it every time. So making this an official request and have opened a PR for your review:This is the only change:
https://github.com/Textualize/rich-cli/blob/bc4da55dbabf85a7c1328f3c84e9021da618e650/src/rich_cli/__main__.py#L378
Hopefully you can take a look when you have a chance. Thanks!