We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6529e01 commit 9bb3774Copy full SHA for 9bb3774
src/main/bash/sdkman-init.sh
@@ -58,9 +58,9 @@ esac
58
zsh_shell=false
59
bash_shell=false
60
61
-if [[ -n "$ZSH_VERSION" ]]; then
+if [[ -n "${ZSH_VERSION:-}" ]]; then
62
zsh_shell=true
63
-elif [[ -n "$BASH_VERSION" ]]; then
+elif [[ -n "${BASH_VERSION:-}" ]]; then
64
bash_shell=true
65
fi
66
@@ -166,7 +166,7 @@ if [[ "$sdkman_auto_env" == "true" ]]; then
166
167
export SDKMAN_OLD_PWD="$PWD"
168
}
169
-
+
170
trimmed_prompt_command="${PROMPT_COMMAND%"${PROMPT_COMMAND##*[![:space:]]}"}"
171
[[ -z "$trimmed_prompt_command" ]] && PROMPT_COMMAND="sdkman_auto_env" || PROMPT_COMMAND="${trimmed_prompt_command%\;};sdkman_auto_env"
172
0 commit comments