Closed dwreeves closed 9 months ago
Also addressing #124 in this PR. cli.py
is now covered by tests 😄
I think this should be fine.
One minor change. I removed this:
if len(args) > 1:
if args[1] == "--":
del args[1]
If someone is doing something really weird, e.g. rich-click -- -- flask -- run
, then this could break backwards compatibility? However, the thing is, Click already handles e.g. rich-click -- flask -- run
just fine. And my unit-tests assert as much. So I believe that the manual removal of the --
was always unnecessary.
I am making a note here in the very off chance this does break someone's setup, but I do not think that will be an issue.
Resolves #155 and adds a new feature to the
rich-click
CLI:--rich-config [JSON]
, which allows the user to set a config for a command they're wrapping withrich-click
. Note that--rich-config
should also work not just for normal click commands but also rich-click commands.This is a work in progress, and needs a lot of testing.