aboutsummaryrefslogtreecommitdiffstats
path: root/src/shell/atuin.bash
diff options
context:
space:
mode:
authorJamie Quigley <jamie@quigley.xyz>2022-08-23 17:26:42 +0100
committerGitHub <noreply@github.com>2022-08-23 17:26:42 +0100
commitaa556fa0883d1a5c8f35960c9d6e8966e4307896 (patch)
tree67f2db56ef1f8a4c109ad08f04db2b05504aa0f6 /src/shell/atuin.bash
parentBump debian from bullseye-20220801-slim to bullseye-20220822-slim (#508) (diff)
downloadatuin-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 '')
-rw-r--r--src/shell/atuin.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shell/atuin.bash b/src/shell/atuin.bash
index 3d86497b..4530e31e 100644
--- a/src/shell/atuin.bash
+++ b/src/shell/atuin.bash
@@ -2,7 +2,7 @@ ATUIN_SESSION=$(atuin uuid)
export ATUIN_SESSION
_atuin_preexec() {
- local id; id=$(atuin history start "$1")
+ local id; id=$(atuin history start -- "$1")
export ATUIN_HISTORY_ID="${id}"
}
@@ -11,13 +11,13 @@ _atuin_precmd() {
[[ -z "${ATUIN_HISTORY_ID}" ]] && return
- (RUST_LOG=error atuin history end "${ATUIN_HISTORY_ID}" --exit "${EXIT}" &) > /dev/null 2>&1
+ (RUST_LOG=error atuin history end --exit "${EXIT}" -- "${ATUIN_HISTORY_ID}" &) > /dev/null 2>&1
}
__atuin_history ()
{
tput rmkx
- HISTORY="$(RUST_LOG=error atuin search -i "${READLINE_LINE}" 3>&1 1>&2 2>&3)"
+ HISTORY="$(RUST_LOG=error atuin search -i -- "${READLINE_LINE}" 3>&1 1>&2 2>&3)"
tput smkx
READLINE_LINE=${HISTORY}