Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZSH_SCRIPT
>>>>> On March 2, 2016 Martijn Dekker <martijn@xxxxxxxx> wrote:
> 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.
Hi Martijn, I'm happy to do it either way, but went with what had
been discussed about 5 years ago when both Bart and Peter seemed to
prefer empty to unset:
http://www.zsh.org/mla/workers/2011/msg00183.html
Bart> I think empty is OK, but let's hear from PWS.
PWS> I think empty is much more Zen-like, so fits perfectly.
Bart and Peter, can you let me know if that still holds?
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author