From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11654 invoked by alias); 21 Oct 2016 20:33:30 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22017 Received: (qmail 25868 invoked from network); 21 Oct 2016 20:33:30 -0000 X-Qmail-Scanner-Diagnostics: from kahlil.inlv.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(37.59.109.123):SA:0(-0.3/5.0):. Processed in 0.447866 secs); 21 Oct 2016 20:33:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at inlv.org does not designate permitted sender hosts) To: zsh-users@zsh.org From: Martijn Dekker Subject: Checking if a variable is exported Message-ID: <032fd4ec-89c1-9dae-a729-c440048ff3ec@inlv.org> Date: Fri, 21 Oct 2016 22:27:20 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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. Thanks, - M.