mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
make auto-cd change $env.OLDPWD
(#6019)
* make auto-cd change `$env.OLDPWD` * fmt * use Config * make auto-cd change `.OLDPWD`
This commit is contained in:
parent
a54f9719e5
commit
b9bbf0c10f
1 changed files with 8 additions and 0 deletions
|
@ -349,6 +349,14 @@ pub fn evaluate_repl(
|
|||
(path.to_string_lossy().to_string(), tokens.0[0].span)
|
||||
};
|
||||
|
||||
stack.add_env_var(
|
||||
"OLDPWD".into(),
|
||||
Value::String {
|
||||
val: cwd.clone(),
|
||||
span: Span { start: 0, end: 0 },
|
||||
},
|
||||
);
|
||||
|
||||
//FIXME: this only changes the current scope, but instead this environment variable
|
||||
//should probably be a block that loads the information from the state in the overlay
|
||||
stack.add_env_var(
|
||||
|
|
Loading…
Reference in a new issue