summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2022-05-16 23:13:17 +0200
committerGitHub <noreply@github.com>2022-05-16 22:13:17 +0100
commitab294cde3460665dfa78514f0e20da00984e3943 (patch)
treef65fd3acd060d3f2ed7e45767b3b37cc9784e32c
parent14b30606a5b2e127f5490f184c8af9ffab780095 (diff)
Don't pollute shell environment - remove 'id' variable (#408)
-rw-r--r--src/shell/atuin.bash2
-rw-r--r--src/shell/atuin.zsh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shell/atuin.bash b/src/shell/atuin.bash
index e47e3c98..6295a4e4 100644
--- a/src/shell/atuin.bash
+++ b/src/shell/atuin.bash
@@ -2,7 +2,7 @@ ATUIN_SESSION=$(atuin uuid)
export ATUIN_SESSION
_atuin_preexec() {
- id=$(atuin history start "$1")
+ local id; id=$(atuin history start "$1")
export ATUIN_HISTORY_ID="$id"
}
diff --git a/src/shell/atuin.zsh b/src/shell/atuin.zsh
index 32cbe6a1..e35e16e0 100644
--- a/src/shell/atuin.zsh
+++ b/src/shell/atuin.zsh
@@ -13,7 +13,7 @@ export ATUIN_SESSION=$(atuin uuid)
export ATUIN_HISTORY="atuin history list"
_atuin_preexec(){
- id=$(atuin history start "$1")
+ local id; id=$(atuin history start "$1")
export ATUIN_HISTORY_ID="$id"
}