From 3f0b4d38ffcdf534eb362d86d6e415305868e632 Mon Sep 17 00:00:00 2001 From: Nahor Date: Fri, 13 Mar 2026 09:33:42 -0700 Subject: [PATCH] set_color: use only on/off for boolean options This is done partly for consistency `underline` where we still need `off` but where true/false doesn't make sense, and partly to simplify user choices and the code. See #12507 Closes #12541 --- doc_src/cmds/set_color.rst | 6 +++--- src/text_face.rs | 4 ++-- tests/checks/set_color.fish | 24 ------------------------ 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/doc_src/cmds/set_color.rst b/doc_src/cmds/set_color.rst index 826ed819e..25823df6c 100644 --- a/doc_src/cmds/set_color.rst +++ b/doc_src/cmds/set_color.rst @@ -55,13 +55,13 @@ The following options are available: Sets dim mode. **-i** or **--italics**, or **-iSTATE** or **--italics=STATE** - Sets italics mode. The state can be **on** / **true** (default), or **off** / **false** + Sets italics mode. The state can be **on** (default), or **off**. **-r** or **--reverse**, or **-iSTATE** or **--reverse=STATE** - Sets reverse mode. The state can be **on** / **true** (default), or **off** / **false** + Sets reverse mode. The state can be **on** (default), or **off**. **-s** or **--strikethrough**, or **-sSTATE** or **--strikethrough=STATE** - Sets strikethrough mode. The state can be **on** / **true** (default), or **off** / **false** + Sets strikethrough mode. The state can be **on** (default), or **off**. **-u** or **--underline**, or **-uSTYLE** or **--underline=STYLE** Set the underline mode; supported styles are **single** (default), **double**, **curly**, **dotted**, **dashed** and **off**. diff --git a/src/text_face.rs b/src/text_face.rs index 003d3d497..51bbad26d 100644 --- a/src/text_face.rs +++ b/src/text_face.rs @@ -247,9 +247,9 @@ fn parse_resettable_style<'a>(w: &WGetopter<'_, 'a, '_>) -> Result