zsh-users
 help / color / mirror / code / Atom feed
From: czech@sonic.net
To: zsh-users@zsh.org
Subject: Best Way to Test an Environment Variable
Date: Wed, 14 Oct 2015 23:10:26 -0700	[thread overview]
Message-ID: <e1edacefa7810f717d82c35449f30080.squirrel@legacy-webmail.sonic.net> (raw)
In-Reply-To: <CAPTyOgfzxzWi83Y6hkbZAhgi9mCQDPV_Z-FR9egu1S7QkcJUSQ@mail.gmail.com>

Hi -

I've been using:

if [ -z $ENV_VAR ]; then

    <do stuff>
fi

To test environment variables. It seems to work.

But I'm curious - is there a better way in zsh to test an environment
variable?

Thanks,



Corwin


  parent reply	other threads:[~2015-10-15  6:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 14:50 ZSH feature request if not present jagmeet bali
2015-10-14 15:14 ` ZyX
2015-10-14 15:55   ` Peter Stephenson
2015-10-15  6:10 ` czech [this message]
2015-10-15  6:32   ` Best Way to Test an Environment Variable czech
2015-10-15  9:46     ` Roman Neuhauser
2015-10-15 17:34       ` Corwin

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=e1edacefa7810f717d82c35449f30080.squirrel@legacy-webmail.sonic.net \
    --to=czech@sonic.net \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).