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

Re: User installation script for new completion



On May 3,  1:19pm, Peter Stephenson wrote:
} Subject: Re: User installation script for new completion
}
} > Have it test [[ -o functionargzero ]] and skip this when it's not set?
} 
} That doesn't really matter, since if the option isn't set, $0 is the shell
} name and won't have a / in, so the test fails anyway.

Eh?  $0 will have a / in it if the shell was invoked by any mechanism other
than path search, or even if PATHDIRS is set and a partial path was used:

zagzig% echo $0
../zsh-3.1.5-build/zsh
zagzig% unsetopt functionargzero
zagzig% function foo() { echo $0 }
zagzig% foo
../zsh-3.1.5-build/zsh
zagzig% 

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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