arcanis / clipanion

Type-safe CLI library / framework with no runtime dependencies
https://mael.dev/clipanion/
1.12k stars 66 forks source link

The "Options" section will always have rich formatting enabled #112

Closed sounisi5011 closed 2 years ago

sounisi5011 commented 2 years ago

I'm using clipanion@3.2.0-rc.4. In testing my CLI using clipanion, I tried to use the environment variables NO_COLOR and FORCE_COLOR to force disabling color output. However, only the "Options" section was not in text format.

スクリーンショット 2021-12-09 13 24 26 スクリーンショット 2021-12-09 13 24 10

The reason for this is that only the "Options" section uses the richFormat.header() method directly.

https://github.com/arcanis/clipanion/blob/488cfd0f1fe68f43a573d560e8382e53b7f0133a/sources/advanced/Cli.ts#L532-L535

I think this is a bug because all the other sections use the this.format(colored).header() method.