]> git.bzium.org/ - embe/embe-profile-files.git/commitdiff
Uodpornienie na set -u
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Sun, 26 Jul 2015 20:25:54 +0000 (22:25 +0200)
committerMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Sun, 26 Jul 2015 20:25:54 +0000 (22:25 +0200)
prefix.sh

index 092a0a8098d687e6a798933af1bcc31d81d4b3f0..e5972b200b8d33a5bfc56fd5729bf9c39c771ec8 100644 (file)
--- a/prefix.sh
+++ b/prefix.sh
@@ -1,3 +1,3 @@
-[[ -z "$BASH_VERSION" ]] || shopt -q login_shell || return
-[[ -z "$ZSH_VERSION" ]] || [[ -o login ]] || return
+[[ -z "${BASH_VERSION+set}" ]] || shopt -q login_shell || return
+[[ -z "${ZSH_VERSION+set}" ]] || [[ -o login ]] || return
 [[ "$-" == *i* ]] || return
 [[ "$-" == *i* ]] || return