Skip to content

Commit

Permalink
Add trailing slash in completion of symlinked dir (#3921)
Browse files Browse the repository at this point in the history
  • Loading branch information
knottio committed Aug 16, 2021
1 parent 65c639c commit ab961a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/nu-completion/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl PathCompleter {
let mut file_name = entry.file_name().to_string_lossy().into_owned();
if matcher.matches(partial, file_name.as_str()) {
let mut path = format!("{}{}", &base_dir_name, file_name);
if entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false) {
if entry.path().is_dir() {
path.push(SEP);
file_name.push(SEP);
}
Expand Down

0 comments on commit ab961a7

Please sign in to comment.