mirror of git://git.code.sf.net/p/zsh/code
34989: AUTO_CD needs to call cd --.
Otherwise directories looking like options do the wrong thing.
This commit is contained in:
parent
4096469b34
commit
c96a993d51
|
@ -1,3 +1,8 @@
|
|||
2015-04-28 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 34989: Src/exec.c: AUTOCD needs to pass -- to cd to avoid
|
||||
directory being treated as option.
|
||||
|
||||
2015-04-28 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* Jared Ahern: 34980: Completion/Unix/Command/_make: expanding
|
||||
|
|
|
@ -2930,6 +2930,7 @@ execcmd(Estate state, int input, int output, int how, int last1)
|
|||
* is a directory we should AUTOCD to. */
|
||||
if (!hn && trycd && (s = cancd(peekfirst(args)))) {
|
||||
peekfirst(args) = (void *) s;
|
||||
pushnode(args, dupstring("--"));
|
||||
pushnode(args, dupstring("cd"));
|
||||
if ((hn = builtintab->getnode(builtintab, "cd")))
|
||||
is_builtin = 1;
|
||||
|
|
Loading…
Reference in New Issue