Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

The best way to know it is in zsh or bash



Suppose that I start with bash default login shell, then I call zsh.

I'd like to determine whether I am in bash or zsh. I see ZSH_*
environment variables. Is ZSH_VERSION the most appropriate to be used
to test whether it is in zsh or not? Thanks.

$ declare -p BASH_VERSION
declare -- BASH_VERSION="5.0.0(1)-release"
$ declare -p ZSH_VERSION
typeset ZSH_VERSION=5.6.2

-- 
Regards,
Peng



Messages sorted by: Reverse Date, Date, Thread, Author