zsh-users
 help / color / Atom feed
From: "René Wilhelm" <asdf@uni-koblenz.de>
To: Peng Yu <pengyu.ut@gmail.com>
Cc: zsh-users <zsh-users@zsh.org>
Subject: Re: The best way to know it is in zsh or bash
Date: Fri, 6 Sep 2019 17:11:49 +0200
Message-ID: <CA+oFM6K18_NxRejkm1VADAENrtTbFjo0yWhA1=uEH8pxMPRz-w@mail.gmail.com> (raw)
In-Reply-To: <CABrM6w=5V8VnJcX0SNj0s8+EpyJWFqN7EYTYc51rNpTYQ_p9vw@mail.gmail.com>


[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

basename $SHELL

On Fri, 6 Sep 2019 at 16:41, Peng Yu <pengyu.ut@gmail.com> 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
>

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 14:41 Peng Yu
2019-09-06 15:11 ` René Wilhelm [this message]
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
     [not found] <CABrM6w=5V8VnJcX0SNj0s8+EpyJWFqN7EYTYc51rNpTYQ_p9vw__33715.8397933067$1567780959$gmane$org@mail.gmail.com>
2019-09-06 19:02 ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+oFM6K18_NxRejkm1VADAENrtTbFjo0yWhA1=uEH8pxMPRz-w@mail.gmail.com' \
    --to=asdf@uni-koblenz.de \
    --cc=pengyu.ut@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git