From ba4f5e80ec9d7e145718e79fed6e57a852c86c12 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:15:04 +0000 Subject: zsh-3.1.5-pws-8 --- Src/builtin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 2b77c57bc..fc9b113ca 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -56,7 +56,7 @@ static struct builtin builtins[] = BUILTIN("disown", 0, bin_fg, 0, -1, BIN_DISOWN, NULL, NULL), BUILTIN("echo", BINF_PRINTOPTS | BINF_ECHOPTS, bin_print, 0, -1, BIN_ECHO, "neE", "-"), BUILTIN("echotc", 0, bin_echotc, 1, -1, 0, NULL, NULL), - BUILTIN("emulate", 0, bin_emulate, 1, 1, 0, "R", NULL), + BUILTIN("emulate", 0, bin_emulate, 1, 1, 0, "LR", NULL), BUILTIN("enable", 0, bin_enable, 0, -1, BIN_ENABLE, "afmr", NULL), BUILTIN("eval", BINF_PSPECIAL, bin_eval, 0, -1, BIN_EVAL, NULL, NULL), BUILTIN("exit", BINF_PSPECIAL, bin_break, 0, 1, BIN_EXIT, NULL, NULL), @@ -643,7 +643,7 @@ set_pwd_env(void) pm = (Param) paramtab->getnode(paramtab, "OLDPWD"); if (!(pm->flags & PM_EXPORTED)) { pm->flags |= PM_EXPORTED; - pm->env = addenv("PWD", pwd); + pm->env = addenv("OLDPWD", oldpwd); } } @@ -3051,6 +3051,8 @@ int bin_emulate(char *nam, char **argv, char *ops, int func) { emulate(*argv, ops['R']); + if (ops['L']) + dosetopt(LOCALOPTIONS, 1, 0); return 0; } -- cgit 1.4.1