forked from extern/nushell
Revert "Feature: PWD-per-drive to facilitate working on multiple drives at Windows" (#14598)
Reverts nushell/nushell#14411
This commit is contained in:
@ -174,14 +174,6 @@ pub fn complete_item(
|
||||
) -> Vec<FileSuggestion> {
|
||||
let cleaned_partial = surround_remove(partial);
|
||||
let isdir = cleaned_partial.ends_with(is_separator);
|
||||
#[cfg(windows)]
|
||||
let cleaned_partial = if let Some(absolute_partial) =
|
||||
stack.pwd_per_drive.expand_pwd(Path::new(&cleaned_partial))
|
||||
{
|
||||
absolute_partial.display().to_string()
|
||||
} else {
|
||||
cleaned_partial
|
||||
};
|
||||
let expanded_partial = expand_ndots(Path::new(&cleaned_partial));
|
||||
let should_collapse_dots = expanded_partial != Path::new(&cleaned_partial);
|
||||
let mut partial = expanded_partial.to_string_lossy().to_string();
|
||||
|
@ -832,12 +832,6 @@ fn do_auto_cd(
|
||||
engine_state: &mut EngineState,
|
||||
span: Span,
|
||||
) {
|
||||
#[cfg(windows)]
|
||||
let path = if let Some(abs_path) = stack.pwd_per_drive.expand_pwd(path.as_path()) {
|
||||
abs_path
|
||||
} else {
|
||||
path
|
||||
};
|
||||
let path = {
|
||||
if !path.exists() {
|
||||
report_shell_error(
|
||||
|
Reference in New Issue
Block a user