Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
Message-ID: <56D74063.6020202@inlv.org>
Date: Wed, 02 Mar 2016 20:34:59 +0100
From: Martijn Dekker <martijn@inlv.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: zsh-workers@zsh.org
Subject: Re: ZSH_SCRIPT
References: <22221.59800.803540.618862@lwm.klanderman.net> <160224143153.ZM28994@torch.brasslantern.com> <20160225093344.0d2499d5@pwslap01u.europe.root.pri> <87r3g08ycp.fsf@lwm.klanderman.net> <160225150425.ZM14095@torch.brasslantern.com> <87lh6384y5.fsf@lwm.klanderman.net> <20160301092746.1472ae95@pwslap01u.europe.root.pri> <87fuwa8dpk.fsf@lwm.klanderman.net> <20160301150707.2ee18f01@pwslap01u.europe.root.pri>
In-Reply-To: <20160301150707.2ee18f01@pwslap01u.europe.root.pri>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Seq: zsh-workers 38069

Peter Stephenson schreef op 01-03-16 om 16:07:
> On Tue, 1 Mar 2016 09:39:19 -0500
> Greg Klanderman <gak@klanderman.net> wrote:
>> Should we explicitly document that ZSH_SCRIPT is empty rather than
>> unset when not invoked as a script?
> 
> That would probably be sensible.

Is there a particular reason why it should be empty rather than unset?
Unset seems more logical; if we're not running a script, the script name
is not the empty string but it doesn't exist. This would also make it
possible to do
	[[ -v ZSH_SCRIPT ]]
to check if you're in a script.

- M.

