-
Notifications
You must be signed in to change notification settings - Fork 94
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
Tweak terminal colour handling. #4568
Conversation
Note, it's kind of annoying that we have to treat command help separately for color switching (because it is printed by the option parser during option parsing) but I don't think it matters much. (There are more important things to think about right now). |
(Assigned reviewers from the precursor PR) |
3728f4e
to
219782f
Compare
@oliver-sanders - I've gone with a hybrid approach: a help formatter that uses my crude This is not really any different than what I had before, except that the help formatter is formally nicer than overriding |
That didn't make a lick of sense to me since the CLI args have to be parsed in order for the parser to activate the help formatter. I think I've found the problem, if the I think this change should fix the problem making args available to the help formatter. diff --git a/cylc/flow/scripts/cylc.py b/cylc/flow/scripts/cylc.py
index 036cf4c05..6fa753315 100644
--- a/cylc/flow/scripts/cylc.py
+++ b/cylc/flow/scripts/cylc.py
@@ -532,7 +532,7 @@ def main():
# check if this is a command abbreviation or exit
command = match_command(command)
if opts.help_:
- execute_cmd(command, "--help")
+ execute_cmd(command, *cmd_args, "--help")
else:
if opts.version:
cmd_args.append("--version") MB! |
OK, brilliant, well done 👍 |
Over-confident declaration of rightness retracted on Element chat! |
f39dbe5
to
7ce3e31
Compare
I came back to this late in the day (out of time) |
7ce3e31
to
6620182
Compare
Tests timed out, poking them to see if it is reproducible. |
... verily verily, not sure why. |
Lets see if a merge sorts things out... |
b9ec819
to
46bb26a
Compare
Minor tweak, should be good to go now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌈
(maybe squash) |
Follow-up to #4562
cylc scan --help
)Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.