Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: loading user startup files for zsh scripts



On Fri, 11 Feb 2011 09:26:02 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> } I can add doc if you like it.. one open
> } question is whether you want $ZSH_SCRIPT to be unset or empty when
> not } running a script; currently it would be empty, which might be
> useful } for detecting whether zsh is providing that parameter.
> 
> I think empty is OK, but let's hear from PWS.

I think empty is much more Zen-like, so fits perfectly.

More(?) seriously, I don't think we'd want [[ -z $ZSH_SCRIPT ]] to
trigger a "NO_UNSET" error if you weren't running a script, and I don't
think (( ${+ZSH_SCRIPT} )) is as common an idiom for special variables.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



Messages sorted by: Reverse Date, Date, Thread, Author