Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
The best way to know it is in zsh or bash
- X-seq: zsh-users 24218
- From: Peng Yu <pengyu.ut@xxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxx>
- Subject: The best way to know it is in zsh or bash
- Date: Fri, 6 Sep 2019 09:41:22 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=XdiJgert4TI8c3bFagcNMZ1dIIbtVQOB86tlv+jXdgg=; b=GemGUzDuaAvGmy1B2OXTRljeoMKziYHRmP2OzMYCENMOGgwidM5qMsVOyckmK5SbRm U+xqWA1IgCSyK5SX0SVaPeWnK1RQ/jQpVFkJmeAdQ4CP6Kj04ROUnf8Zu/A0Ed8q2LuY NDHY7BHGvcaLbrUrzMQ1nWaDD3KythMrkfFSmTOT2D2VHN9dYZOQgvbg/m7AN3EXYphv 9IEGcHqa/mDJbwv+DarL+Tl279+U4dsR8WgM5cwLDo6MO4rX7SS/WCkhTmQJAMW2w06O dCIp3UhxqkHEY3VuR3tvJPU2/eBcKoPO/tS6SkvfWNdcDGqD3T3U/f1LgOKfPDJMGV3m l1Cg==
- 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
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