Mise Setup borks zshrc
Hey there!
I was following the developer setup guide and ran into an issue on step 3.3
In my experience when I used this command to "hook mise into my shell" it caused a parse error. I tried this with my existing .zshrc
and a new blank .zshrc
.
echo 'eval "$('$(which mise)' activate zsh)"' >> ~/.zshrc
That command then produced the following.
➜ ~ cat ~/.zshrc
eval "$(mise () { local command command="${1:-}" if [ "$#" = 0 ] then command /Users/tony/.local/bin/mise return fi shift case "$command" in (deactivate | s | shell) if [[ ! " $@ " =~ " --help " ]] && [[ ! " $@ " =~ " -h " ]] then eval "$(command /Users/tony/.local/bin/mise "$command" "$@")" return $? fi ;; esac command /Users/tony/.local/bin/mise "$command" "$@" } activate zsh)"
➜ ~ source ~/.zshrc
/Users/tony/.zshrc.new:1: parse error near `then'
/Users/tony/.zshrc.new:2: unmatched "
Edited by Tony Ganga