mirror of https://github.com/helix-editor/helix
docs: escape pipe in typeable command name (#13869)
parent
91dff9393d
commit
e5f9937c1d
|
@ -78,7 +78,7 @@
|
|||
| `:log-open` | Open the helix log file. |
|
||||
| `:insert-output` | Run shell command, inserting output before each selection. |
|
||||
| `:append-output` | Run shell command, appending output after each selection. |
|
||||
| `:pipe`, `:|` | Pipe each selection to the shell command. |
|
||||
| `:pipe`, `:\|` | Pipe each selection to the shell command. |
|
||||
| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
|
||||
| `:run-shell-command`, `:sh`, `:!` | Run a shell command |
|
||||
| `:reset-diff-change`, `:diffget`, `:diffg` | Reset the diff change at the cursor position. |
|
||||
|
|
|
@ -36,7 +36,8 @@ pub fn typable_commands() -> Result<String, DynError> {
|
|||
"Description".to_owned(),
|
||||
]));
|
||||
|
||||
let cmdify = |s: &str| format!("`:{}`", s);
|
||||
// escape | so it doesn't get rendered as a column separator
|
||||
let cmdify = |s: &str| format!("`:{}`", s.replace('|', "\\|"));
|
||||
|
||||
for cmd in TYPABLE_COMMAND_LIST {
|
||||
let names = std::iter::once(&cmd.name)
|
||||
|
|
Loading…
Reference in New Issue