zsh-users
 help / color / mirror / code / Atom feed
From: Corwin <czech@sonic.net>
To: zsh-users@zsh.org
Subject: Re: Best Way to Test an Environment Variable
Date: Thu, 15 Oct 2015 10:34:42 -0700	[thread overview]
Message-ID: <8d5cf11ed768516e8ccc6671c2483d46@sonic.net> (raw)
In-Reply-To: <20151015094616.GT3670@isis.sigpipe.cz>

Hi Roman -

Thanks for the pointer to zshexpn. I will refrain from replying to a 
different topic with a new topic.

Regards,



Corwin

On 2015-10-15 02:46, Roman Neuhauser wrote:
> # czech@sonic.net / 2015-10-14 23:32:40 -0700:
>> I probably should have clarified - the objective of the test is to see 
>> if
>> the environment variable is set or not. -z $ENV_VAR seems to return 1 
>> if
>> the environment variable is not set or is set to null (zero bytes).
> 
> zshexpn(1):
> 
>   ${+name}
>       If name is the name of a set parameter `1' is substituted,
>       otherwise `0' is substituted.
> 
> ps your first email is a reply to an email with a completely unrelated
> topic.  don't do that.
> 
>   891     Oct 14 jagmeet bali    (  49) ZSH feature request if not 
> present
>   892     Oct 14 ZyX             (  53) |->
>   893     Oct 14 Peter Stephenso ( 120) | `->
>   894     Oct 14 czech@sonic.net (  60) `->Best Way to Test an
> Environment Variable
>   895     Oct 14 czech@sonic.net (  73)   `->


      reply	other threads:[~2015-10-15 17:46 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 ` Best Way to Test an Environment Variable czech
2015-10-15  6:32   ` czech
2015-10-15  9:46     ` Roman Neuhauser
2015-10-15 17:34       ` Corwin [this message]

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=8d5cf11ed768516e8ccc6671c2483d46@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).