diff options
| -rw-r--r-- | xmake/actions/update/main.lua | 1 | ||||
| -rw-r--r-- | xmake/core/base/tty.lua | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua index afaed9e18..4433d18d8 100644 --- a/xmake/actions/update/main.lua +++ b/xmake/actions/update/main.lua @@ -308,6 +308,7 @@ function _initialize_shell() if shell:endswith("bash") then target = (is_host("macosx") and "~/.bash_profile" or "~/.bashrc") elseif shell:endswith("zsh") then target = "~/.zshrc" elseif shell:endswith("ksh") then target = "~/.kshrc" + elseif shell:endswith("fish") then target = "~/.config/fish/config.fish" end command = "test -f \"$HOME/.xmake/profile\" && source \"$HOME/.xmake/profile\"" diff --git a/xmake/core/base/tty.lua b/xmake/core/base/tty.lua index 8fa00d494..f6fa0b622 100644 --- a/xmake/core/base/tty.lua +++ b/xmake/core/base/tty.lua @@ -175,6 +175,13 @@ function tty.shell() end end end + if not shell then + if os.getenv("BASH_VERSION") then + shell = "bash" + elseif os.getenv("FISH_VERSION") then + shell = "fish" + end + end end tty._SHELL = shell or "sh" end |
