zsh-users
 help / color / mirror / code / Atom feed
* The best way to know it is in zsh or bash
@ 2019-09-06 14:41 Peng Yu
  2019-09-06 15:11 ` René Wilhelm
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Peng Yu @ 2019-09-06 14:41 UTC (permalink / raw)
  To: zsh-users

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-07  0:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CABrM6w=5V8VnJcX0SNj0s8+EpyJWFqN7EYTYc51rNpTYQ_p9vw__33715.8397933067$1567780959$gmane$org@mail.gmail.com>
2019-09-06 19:02 ` The best way to know it is in zsh or bash Stephane Chazelas
2019-09-06 14:41 Peng Yu
2019-09-06 15:11 ` René Wilhelm
2019-09-06 15:38   ` Peng Yu
2019-09-06 15:51     ` gi1242+zsh
2019-09-06 15:16 ` Mikael Magnusson
2019-09-06 17:41 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).