summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/tty.lua9
-rw-r--r--xmake/scripts/profile-unix.fish3
2 files changed, 4 insertions, 8 deletions
diff --git a/xmake/core/base/tty.lua b/xmake/core/base/tty.lua
index 842d5474b..26da74ecf 100644
--- a/xmake/core/base/tty.lua
+++ b/xmake/core/base/tty.lua
@@ -166,9 +166,7 @@ function tty.shell()
end
end
else
- if not shell and os.getenv("FISH_VERSION") then
- shell = "fish"
- end
+ shell = os.getenv("XMAKE_SHELL")
if not shell then
shell = os.getenv("SHELL")
if shell then
@@ -180,11 +178,6 @@ function tty.shell()
end
end
end
- if not shell then
- if os.getenv("BASH_VERSION") then
- shell = "bash"
- end
- end
end
tty._SHELL = shell or "sh"
end
diff --git a/xmake/scripts/profile-unix.fish b/xmake/scripts/profile-unix.fish
index 94c79e271..ea0f243de 100644
--- a/xmake/scripts/profile-unix.fish
+++ b/xmake/scripts/profile-unix.fish
@@ -18,6 +18,9 @@
# @homepage profile-unix.fish
#
+# register environments
+export XMAKE_SHELL=fish
+
# register completions
. "$XMAKE_PROGRAM_DIR/scripts/completions/register-completions.fish"