diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-10-28 20:55:22 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-10-28 20:55:22 +0000 |
commit | 36d228b12934000cf11690b4365c144ef55c905f (patch) | |
tree | 9d91cfb3a6fde430da3e085bd64ec8ed6dee000b | |
parent | b77f9505d813016d9ad44e5e9832dcf1fb2a6d03 (diff) | |
download | zsh-36d228b12934000cf11690b4365c144ef55c905f.tar.gz zsh-36d228b12934000cf11690b4365c144ef55c905f.tar.xz zsh-36d228b12934000cf11690b4365c144ef55c905f.zip |
25937: builtins with no options should still ignore --
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | Src/builtin.c | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 86f1ea3c9..d0e0cc1cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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> diff --git a/README b/README index ce4042b44..ac5f318ff 100644 --- a/README +++ b/README @@ -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 diff --git a/Src/builtin.c b/Src/builtin.c index 003897bb4..837740032 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -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 */ |