about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-08-17 11:01:40 +0000
committerAlyssa Ross <hi@alyssa.is>2020-08-17 11:03:46 +0000
commit2fd97ce6cca2ea40b7de526475b5b446bb624696 (patch)
treeb370c0b989238d152d80e4a6b7ab387ed00caf25 /modules
parent962104bb67bdab604f30433d98079bbe3a36cb97 (diff)
downloadnixlib-2fd97ce6cca2ea40b7de526475b5b446bb624696.tar
nixlib-2fd97ce6cca2ea40b7de526475b5b446bb624696.tar.gz
nixlib-2fd97ce6cca2ea40b7de526475b5b446bb624696.tar.bz2
nixlib-2fd97ce6cca2ea40b7de526475b5b446bb624696.tar.lz
nixlib-2fd97ce6cca2ea40b7de526475b5b446bb624696.tar.xz
nixlib-2fd97ce6cca2ea40b7de526475b5b446bb624696.tar.zst
nixlib-2fd97ce6cca2ea40b7de526475b5b446bb624696.zip
modules/zsh: mark variable local
There's no reason for this to be global.  Outside of this function
it's the same as $? anyway.
Diffstat (limited to 'modules')
-rw-r--r--modules/shell/zsh/zshrc.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/shell/zsh/zshrc.nix b/modules/shell/zsh/zshrc.nix
index 3cf9e2fe76a4..869e33e24e99 100644
--- a/modules/shell/zsh/zshrc.nix
+++ b/modules/shell/zsh/zshrc.nix
@@ -207,7 +207,7 @@ preexec() {
 }
 
 precmd() {
-    ex="$?"
+    local ex="$?"
     if [[ -n "$show_exit" && "$ex" -ne 0 ]]
     then echo -e "\r\e[33m[exit $ex]\e[0m"
     fi