Skip to content

Commit 757723c

Browse files
committed
detect-shell
1 parent 1dce23a commit 757723c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

setup.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,19 @@ fi
1919

2020
echo "Activate Mise environment and install"
2121
~/.local/bin/mise trust .mise.toml
22-
eval "$(~/.local/bin/mise activate bash)"
22+
# Detect user shell for Mise activation
23+
if [ -n "${BASH_VERSION:-}" ]; then
24+
SHELL_TYPE="bash"
25+
elif [ -n "${ZSH_VERSION:-}" ]; then
26+
SHELL_TYPE="zsh"
27+
elif [ -n "${FISH_VERSION:-}" ]; then
28+
SHELL_TYPE="fish"
29+
else
30+
SHELL_TYPE="sh"
31+
fi
32+
33+
# Activate Mise environment for detected shell
34+
eval "$(~/.local/bin/mise activate "$SHELL_TYPE")"
2335
mise install
2436
echo $PATH
2537
ls -lah ~/.local/share/mise/installs

0 commit comments

Comments
 (0)