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

Re: loading user startup files for zsh scripts



On Tue, 8 Feb 2011 12:09:41 -0500
Greg Klanderman <gak@xxxxxxxxxxxxxx> wrote:
> What's the best way to determine that the shell is running a script?

You can test if [[ $0 == zsh ]].  If it is, either you're running a
script helpfully called zsh, or you're not running a script at all.

-- 
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