Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: loading user startup files for zsh scripts
On Feb 9, 11:01am, Greg Klanderman wrote:
}
} Is there any way to get the original $0 from within a file that's
} being source'd from .zshenv and when functionargzero hasn't been
} unsetopt'd?
Put something in /etc/zshenv (or whatever path has been compiled for
that on your system) that stashes $0 in another parameter. (This is
one of the few good uses of /etc/zshenv that I've ever considered; I
usually configure --disable-zshenv when building the shell myself.)
Or just do the $ZSH_NAME = $0:t test in /etc/zshenv and set a boolean
to indicate a script is running.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author