Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Checking if a variable is exported
- X-seq: zsh-users 22020
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Martijn Dekker <martijn@xxxxxxxx>
- Subject: Re: Checking if a variable is exported
- Date: Fri, 21 Oct 2016 23:12:22 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ecv7hZyNvXZMDVtppnXj4yNfvVczy6QuZkgJ0YRq4Ko=; b=NOV5/mt9SrgUbIBnIcb0kCeg0q+vOAlaHaQ9ashYKLw8sM8r/0W8YGwvCPFz9wYtPT d0KTfAVNUeJXNny7VBrPvsLiicDWr1XJvZdVOOqV6GlqxH6dNNWn4rRnVS7cdqLIuhpX s5RuRVSBR0zpBNYpgO4zrxyoylH2AIaFwyPY9g8gSB0Tj+F+CC7pdY8+NYxfq97Aj23q YQZWUR9m6GIflHQ3Y9FBVzkO9x99K19+sRbiN/ghKP35d4auwSApsSFxuUurhkkaYtB6 A+CHOduYvEdWmAgDWQJn6FbGt9vLnRRTL09jN9U9eTrb/k9jYCS/w9V2su9SUgjg400G SttA==
- In-reply-to: <032fd4ec-89c1-9dae-a729-c440048ff3ec@inlv.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <032fd4ec-89c1-9dae-a729-c440048ff3ec@inlv.org>
On Fri, Oct 21, 2016 at 10:27 PM, Martijn Dekker <martijn@xxxxxxxx> wrote:
> Hi all,
>
> Does zsh have a straightforward way for a script to check if a variable
> is exported? The closest-to-straightforward way I know of is to parse
> the output of 'typeset -p varname', which is hairy because the output
> might include various options to the command.
${(t)param} will contain "export".
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author