mirror of
https://github.com/nushell/nushell.git
synced 2025-01-11 08:48:23 +01: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
@ -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 New Issue
Block a user