mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
40977: "emulate" disallows "--help" and "--version"
This commit is contained in:
parent
a11b241d4a
commit
fc96274801
2 changed files with 6 additions and 2 deletions
|
|
@ -376,12 +376,12 @@ parseopts(char *nam, char ***argvp, char *new_opts, char **cmdp,
|
|||
*argv = "--";
|
||||
while (*++*argv) {
|
||||
if (**argv == '-') {
|
||||
if(!argv[0][1]) {
|
||||
if (!argv[0][1]) {
|
||||
/* The pseudo-option `--' signifies the end of options. */
|
||||
argv++;
|
||||
goto doneoptions;
|
||||
}
|
||||
if(*argv != args+1 || **argv != '-')
|
||||
if (nam || *argv != args+1 || **argv != '-')
|
||||
goto badoptionstring;
|
||||
/* GNU-style long options */
|
||||
++*argv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue