refactor(complete): Remove no-op help calls

This commit is contained in:
Ed Page 2024-08-21 11:29:08 -05:00
parent 2f07f3cc61
commit ebb1302e90

View file

@ -375,14 +375,12 @@ fn complete_path(
let path = entry.path(); let path = entry.path();
let mut suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path); let mut suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
suggestion.push(""); // Ensure trailing `/` suggestion.push(""); // Ensure trailing `/`
completions completions.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()));
.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()).help(None));
} else { } else {
let path = entry.path(); let path = entry.path();
if is_wanted(&path) { if is_wanted(&path) {
let suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path); let suggestion = pathdiff::diff_paths(&path, current_dir).unwrap_or(path);
completions completions.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()));
.push(CompletionCandidate::new(suggestion.as_os_str().to_owned()).help(None));
} }
} }
} }