How can we preview colorized help text? #1306
|
I was excited to see the release notes for v6.3.0:
I updated and gave it a try and I'm not seeing anything different: usage bash ./my-script-with-usage-comments.sh --helpI tried setting an explicit # [USAGE] help_template "{$heading}My tool{/$}\n\n{{usage}}\n\n{$cyan}{{flags}}{/$}"... and set various I'm particularly interested in getting my mise tasks to show colorized help text, but I'm assuming that will require mise to be updated to use the latest version of usage-lib. Just interested in getting a preview. |
Replies: 1 comment 1 reply
|
Thanks for reporting this — you found an implementation gap. The v6.3 colour support was active in the compiled usage-argv/usage-rs renderer, while I opened #1309 to add a terminal-aware usage-lib renderer and use it for Once that is merged and released, the command in this discussion will provide the preview you expected. Mise will also need to switch its task-help call to the new This comment was generated by Codex. |
Thanks for reporting this — you found an implementation gap. The v6.3 colour support was active in the compiled usage-argv/usage-rs renderer, while
usage bashand mise task help go through the plain usage-lib renderer. KDL style tags were validated there but then deliberately stripped, so neither TTY detection norCLICOLOR_FORCE=1could enable them. (CLICOLORitself is not read; the supported overrides areCLICOLOR_FORCEandNO_COLOR.)I opened #1309 to add a terminal-aware usage-lib renderer and use it for
usage bash,usage exec, and the usage CLI own help. It keeps the existing plain API unchanged for generated docs and snapshots and adds parity tests against the compiled renderer.Once…