I\'ve a question on how to tell which shell the user is using. Suppose a script that if the user is using zsh, then put PATH to his .zshrc and if using bash sho
.zshrc
Myself having a similar problem, settled for:
_shell="$(ps -p $$ --no-headers -o comm=)" if [[ $_shell == "zsh" ]]; then read -q -s "?Do it?: " fi elif [[ $_shell == "bash" || $_shell == "sh" ]]; then read -n 1 -s -p "Do it [y/n] " fi