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

Re: Handling of *ARGZERO options, for Zsh <= 5.3



On Tue, Jan 2, 2018 at 8:57 AM, dana <dana@xxxxxxx> wrote:
>
> If the problem is ZSH_ARGZERO, shouldn't this work in like 5.0+?
>
>   () {
>     setopt local_options posix_argzero
>     MY_ARGZERO=$0
>   }

For considerably older (but still not the oldest) zsh you can use
$funcfiletrace:

zmodload zsh/parameter
print -r -- ${ZSH_ARGZERO:=${${funcfiletrace[-1]}[(ws/:/)1]}}



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