summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-07-04 10:43:56 +0800
committerGitHub <[email protected]>2023-07-04 10:43:56 +0800
commit92f26e98978d36475e49762114fd92c0a2324767 (patch)
treef73f01c62e4b03b8e417bc9f80c03224793b7120
parentd51436e3270669de347d04c7dface8e248a3bd0d (diff)
parent98f21908584df4ff5ef4f42beadc3cae1a0d5f63 (diff)
Merge pull request #3919 from vic1707/patch-1
change `$SHELL` with `$<SHELL>_VERSION`
-rw-r--r--xmake/scripts/profile-unix.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/scripts/profile-unix.sh b/xmake/scripts/profile-unix.sh
index c3e62a734..4741dfdce 100644
--- a/xmake/scripts/profile-unix.sh
+++ b/xmake/scripts/profile-unix.sh
@@ -19,9 +19,9 @@
#
# register completions
-if [[ "$SHELL" = */zsh ]]; then
+if [[ -n "$ZSH_VERSION" ]]; then
. "$XMAKE_PROGRAM_DIR/scripts/completions/register-completions.zsh"
-elif [[ "$SHELL" = */bash ]]; then
+elif [[ -n "$BASH_VERSION" ]]; then
. "$XMAKE_PROGRAM_DIR/scripts/completions/register-completions.bash"
fi