feat: add ! alias for sh and | for pipe (#13263)

pull/13294/head
Jason Fuchs 2025-04-07 18:00:45 +02:00 committed by GitHub
parent 9cfb8afa99
commit 46f7cdb5a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -78,9 +78,9 @@
| `:log-open` | Open the helix log file. | | `:log-open` | Open the helix log file. |
| `:insert-output` | Run shell command, inserting output before each selection. | | `:insert-output` | Run shell command, inserting output before each selection. |
| `:append-output` | Run shell command, appending output after 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. | | `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
| `:run-shell-command`, `:sh` | Run a shell command | | `:run-shell-command`, `:sh`, `:!` | Run a shell command |
| `:reset-diff-change`, `:diffget`, `:diffg` | Reset the diff change at the cursor position. | | `:reset-diff-change`, `:diffget`, `:diffg` | Reset the diff change at the cursor position. |
| `:clear-register` | Clear given register. If no argument is provided, clear all registers. | | `:clear-register` | Clear given register. If no argument is provided, clear all registers. |
| `:redraw` | Clear and re-render the whole UI | | `:redraw` | Clear and re-render the whole UI |

View File

@ -3450,7 +3450,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
}, },
TypableCommand { TypableCommand {
name: "pipe", name: "pipe",
aliases: &[], aliases: &["|"],
doc: "Pipe each selection to the shell command.", doc: "Pipe each selection to the shell command.",
fun: pipe, fun: pipe,
completer: SHELL_COMPLETER, completer: SHELL_COMPLETER,
@ -3466,7 +3466,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
}, },
TypableCommand { TypableCommand {
name: "run-shell-command", name: "run-shell-command",
aliases: &["sh"], aliases: &["sh", "!"],
doc: "Run a shell command", doc: "Run a shell command",
fun: run_shell_command, fun: run_shell_command,
completer: SHELL_COMPLETER, completer: SHELL_COMPLETER,