Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: The best way to know it is in zsh or bash
- X-seq: zsh-users 24219
- From: René Wilhelm <asdf@xxxxxxxxxxxxxx>
- To: Peng Yu <pengyu.ut@xxxxxxxxx>
- Subject: Re: The best way to know it is in zsh or bash
- Date: Fri, 6 Sep 2019 17:11:49 +0200
- Cc: zsh-users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=uni-koblenz.de; h=content-type:content-type:subject:subject:message-id:date :date:from:from:in-reply-to:references:mime-version:received :received:received:received; s=mail; t=1567782711; x=1569597112; bh=bf/rVidaCycZhkGvIXAisw4V8X/cSg5ovX66/vXri8Y=; b=drUnp1fduJuJ /PjRZhFvUiQdG+bUDgqPU/eW/5rH683tZk5in8Bw3qUbRIQUrsBnkG9gHRyrDBqg C4K1eay5t8mJNuCJFqn6BCl0z/KdfuvyrW/R6OGEHtlk6E54WBtN/KH6Ri8faffX VOfCsUnbwKX7RO5I+pEFjljP27Ht2aU=
- In-reply-to: <CABrM6w=5V8VnJcX0SNj0s8+EpyJWFqN7EYTYc51rNpTYQ_p9vw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABrM6w=5V8VnJcX0SNj0s8+EpyJWFqN7EYTYc51rNpTYQ_p9vw@mail.gmail.com>
basename $SHELL
On Fri, 6 Sep 2019 at 16:41, Peng Yu <pengyu.ut@xxxxxxxxx> wrote:
> 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