on master help sign in
Making the 'set-option' command help more descriptive. (#2365)
09a17e4Ben Lee-Cohen
book/src/generated/typable-cmd.md+1−1
@@ -55,7 +55,7 @@
55| `:tutor` | Open the tutorial. |
55| `:tutor` | Open the tutorial. |
56| `:goto`, `:g` | Go to line number. |
56| `:goto`, `:g` | Go to line number. |
57| `:set-language`, `:lang` | Set the language of current buffer. |
57| `:set-language`, `:lang` | Set the language of current buffer. |
58−| `:set-option`, `:set` | Set a config option at runtime. |
58+| `:set-option`, `:set` | Set a config option at runtime.<br>For example to disable smart case search, use `:set search.smart-case false`. |
59| `:get-option`, `:get` | Get the current value of a config option. |
59| `:get-option`, `:get` | Get the current value of a config option. |
60| `:sort` | Sort ranges in selection. |
60| `:sort` | Sort ranges in selection. |
61| `:rsort` | Sort ranges in selection in reverse order. |
61| `:rsort` | Sort ranges in selection in reverse order. |
helix-term/src/commands/typed.rs+1−1
@@ -1594,7 +1594,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
1594 TypableCommand {
1594 TypableCommand {
1595 name: "set-option",
1595 name: "set-option",
1596 aliases: &["set"],
1596 aliases: &["set"],
1597− doc: "Set a config option at runtime.",
1597+ doc: "Set a config option at runtime.\nFor example to disable smart case search, use `:set search.smart-case false`.",
1598 fun: set_option,
1598 fun: set_option,
1599 completer: Some(completers::setting),
1599 completer: Some(completers::setting),
1600 },
1600 },
xtask/src/main.rs+3−1
@@ -106,7 +106,9 @@ pub mod md_gen {
106 .collect::<Vec<_>>()
106 .collect::<Vec<_>>()
107 .join(", ");
107 .join(", ");
108
108
109+ let doc = cmd.doc.replace("\n", "<br>");
110+
109− md.push_str(&md_table_row(&[names.to_owned(), cmd.doc.to_owned()]));
111+ md.push_str(&md_table_row(&[names.to_owned(), doc.to_owned()]));
110 }
112 }
111
113
112 Ok(md)
114 Ok(md)