From c96a993d51e3e5958c8161d0dbe86cb43bcc52c1 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Tue, 28 Apr 2015 20:42:26 +0100
Subject: 34989: AUTO_CD needs to call cd --.
Otherwise directories looking like options do the wrong thing.
---
Src/exec.c | 1 +
1 file changed, 1 insertion(+)
(limited to 'Src')
diff --git a/Src/exec.c b/Src/exec.c
index 31c80a74e..6a8b35a36 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -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;
--
cgit 1.4.1