mirror of
https://github.com/nushell/nushell.git
synced 2025-05-06 07:52:57 +00:00
Reverts nushell/nushell#15387 As pointed out by @132ikl in https://github.com/nushell/nushell/pull/15387#issuecomment-2764852850, #15387 had the unintended side effect of not showing all suggestions in certain cases when that wasn't desired.
This commit is contained in:
parent
7be90c2644
commit
9aba96604b
@ -98,7 +98,7 @@ fn complete_rec(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// For https://github.com/nushell/nushell/issues/13204
|
// For https://github.com/nushell/nushell/issues/13204
|
||||||
if options.match_algorithm == MatchAlgorithm::Prefix {
|
if isdir && options.match_algorithm == MatchAlgorithm::Prefix {
|
||||||
let exact_match = if options.case_sensitive {
|
let exact_match = if options.case_sensitive {
|
||||||
entry_name.eq(base)
|
entry_name.eq(base)
|
||||||
} else {
|
} else {
|
||||||
|
@ -2224,16 +2224,6 @@ fn exact_match() {
|
|||||||
&vec![file(dir.join("partial").join("hello.txt")).as_str()],
|
&vec![file(dir.join("partial").join("hello.txt")).as_str()],
|
||||||
&suggestions,
|
&suggestions,
|
||||||
);
|
);
|
||||||
|
|
||||||
let target_dir = format!("open {}", file(dir.join("partial").join("hello"))); // No trailing slash
|
|
||||||
let suggestions = completer.complete(&target_dir, target_dir.len());
|
|
||||||
|
|
||||||
// Despite no trailing slash, since it's an exact match, only 'partial/hello.txt' should be suggested, not
|
|
||||||
// 'partial-a/hello' and stuff. See issue #14794 for details.
|
|
||||||
match_suggestions(
|
|
||||||
&vec![file(dir.join("partial").join("hello.txt")).as_str()],
|
|
||||||
&suggestions,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[ignore = "was reverted, still needs fixing"]
|
#[ignore = "was reverted, still needs fixing"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user