Default ZSH_VERSION to empty string. (#656)

This avoids borking when a user has `set -u` (a.k.a. the `nounset`
option) enabled.
This commit is contained in:
Paul 2020-02-14 16:50:11 +11:00 committed by GitHub
parent 4911678c5b
commit 18b07ecaa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ PATH="${ASDF_USER_SHIMS}:$PATH"
# Load the asdf wrapper function
. "${ASDF_DIR}/lib/asdf.sh"
if [ -n "$ZSH_VERSION" ]; then
if [ -n "${ZSH_VERSION:-}" ]; then
autoload -U bashcompinit
bashcompinit
fi