diff options
| author | ruki <[email protected]> | 2023-03-03 22:55:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-03 22:55:12 +0800 |
| commit | 6c43a097157fe7f9e10e576aa637159503ff426a (patch) | |
| tree | 06dd6da40f16fb306880b9c00bacdcd778a34660 | |
| parent | 06ab760da4fa6ac649f617065cbee5024b82b575 (diff) | |
improve os.shell
| -rw-r--r-- | xmake/core/base/tty.lua | 9 | ||||
| -rw-r--r-- | xmake/scripts/profile-unix.fish | 3 |
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" |
