From ab294cde3460665dfa78514f0e20da00984e3943 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Mon, 16 May 2022 23:13:17 +0200 Subject: [PATCH] Don't pollute shell environment - remove 'id' variable (#408) --- src/shell/atuin.bash | 2 +- src/shell/atuin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/atuin.bash b/src/shell/atuin.bash index e47e3c9..6295a4e 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 32cbe6a..e35e16e 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" }