1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-30 20:06:03 +02:00

25937: builtins with no options should still ignore --

This commit is contained in:
Peter Stephenson 2008-10-28 20:55:22 +00:00
parent b77f9505d8
commit 36d228b129
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-10-28 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 25937: README, Src/builtins.c: builtins that don't have
options now ignore an initial "--" argument.
2008-10-28 Peter Stephenson <pws@csr.com>
* unposted: Config/Version.mk, Etc/relnote_4.3.7.txt: Release
@ -2997,7 +3002,7 @@
2007-10-23 Peter Stephenson <pws@csr.com>
* users/12087: Src/glob.c: fix a case where we doing globbing
unncessarily to find files case-insensitively in Cygwin.
unnecessarily to find files case-insensitively in Cygwin.
2007-10-22 Peter Stephenson <pws@csr.com>

6
README
View File

@ -35,6 +35,12 @@ Possible incompatibilities
This section documents incompatibilities in the shell since the 4.2
series of releases.
In previous releases of the shell, builtin commands and precommand
modifiers that did not accept options also did not recognize the
argument "--" as marking the end of option processing without being
considered an argument. This was not documented and was incompatible
with other shells. All such commands now handle this syntax.
The configuration option --enable-lfs to enable large file support has
been replaced by autoconf's standard --enable-largefile mechanism.
As this is usually used whenever necessary, this won't usually

View File

@ -391,6 +391,9 @@ execbuiltin(LinkList args, Builtin bn)
if (ops.ind['-'])
break;
}
} else if (*argv && !strcmp(*argv, "--")) {
ops.ind['-'] = 1;
argv++;
}
/* handle built-in options, for overloaded handler functions */