diff --git a/crates/nu-cli/src/cli.rs b/crates/nu-cli/src/cli.rs index c295d378ed..2b69e80979 100644 --- a/crates/nu-cli/src/cli.rs +++ b/crates/nu-cli/src/cli.rs @@ -812,7 +812,8 @@ async fn process_line( ctx.shell_manager.set_path(val.to_string()); return LineResult::Success(line.to_string()); } else { - ctx.shell_manager.set_path(name.to_string()); + ctx.shell_manager + .set_path(format!("{}\\", name.to_string())); return LineResult::Success(line.to_string()); } } else {