diff options
| author | Jamie Quigley <jamie@quigley.xyz> | 2022-08-23 17:26:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-23 17:26:42 +0100 |
| commit | aa556fa0883d1a5c8f35960c9d6e8966e4307896 (patch) | |
| tree | 67f2db56ef1f8a4c109ad08f04db2b05504aa0f6 /src/shell/atuin.fish | |
| parent | Bump debian from bullseye-20220801-slim to bullseye-20220822-slim (#508) (diff) | |
| download | atuin-aa556fa0883d1a5c8f35960c9d6e8966e4307896.zip | |
Fix atuin crashing on commands that start with -- (#509)
The use of `--` in the shell scripts prevents clap attempting to parse
the command name as a flag, in the case that it starts with `--`.
Diffstat (limited to 'src/shell/atuin.fish')
| -rw-r--r-- | src/shell/atuin.fish | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shell/atuin.fish b/src/shell/atuin.fish index e2802544..359f7bfa 100644 --- a/src/shell/atuin.fish +++ b/src/shell/atuin.fish @@ -1,19 +1,19 @@ set -gx ATUIN_SESSION (atuin uuid) function _atuin_preexec --on-event fish_preexec - set -gx ATUIN_HISTORY_ID (atuin history start "$argv[1]") + set -gx ATUIN_HISTORY_ID (atuin history start -- "$argv[1]") end function _atuin_postexec --on-event fish_postexec set s $status if test -n "$ATUIN_HISTORY_ID" - RUST_LOG=error atuin history end $ATUIN_HISTORY_ID --exit $s & + RUST_LOG=error atuin history end --exit $s -- $ATUIN_HISTORY_ID & disown end end function _atuin_search - set h (RUST_LOG=error atuin search -i (commandline -b) 3>&1 1>&2 2>&3) + set h (RUST_LOG=error atuin search -i -- (commandline -b) 3>&1 1>&2 2>&3) commandline -f repaint if test -n "$h" commandline -r $h |
