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

Re: "." not recognising "--" as the end-of-options



On Tue, Oct 28, 2008 at 09:49:52PM +0000, Peter Stephenson wrote:
[...]
> > . -- "$1"
> > 
> > if you can't guarantee that "$1" won't start with a "-".
> > 
> > Unfortunately, that code doesn't work with zsh at the moment.
> 
> This happens with builtins that are declared not to have any options.
> I've noticed it before and thought it a bit flakey but been too craven
> to fix it.  We don't document option processing rules anywhere that I
> can find, so sticking with the standard is the only sensible bet.  It's
> probably best to change for all such builtins.
[...]

Thanks Peter!

note that I've filed the same bug report to ash, so I suspect
Net/FreeBSD shs are affected as well, which means we can't use
. -- "$1" portably anyway even though it's POSIX.

Cheers,
Stéphane



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