Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
25937: builtins with no options should still ignore --
  • Loading branch information
Peter Stephenson committed Oct 28, 2008
1 parent b77f950 commit 36d228b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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
Expand Down Expand Up @@ -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>

Expand Down
6 changes: 6 additions & 0 deletions README
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Src/builtin.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 36d228b

Please sign in to comment.