Only tab complete trailing slash if path is directory
This commit is contained in:
parent
e5d4a0a46e
commit
e5b10fbb07
1 changed files with 4 additions and 2 deletions
|
|
@ -1469,8 +1469,10 @@ impl Location {
|
||||||
if let Ok(canonical) = fs::canonicalize(&path) {
|
if let Ok(canonical) = fs::canonicalize(&path) {
|
||||||
path = canonical;
|
path = canonical;
|
||||||
}
|
}
|
||||||
// Add trailing slash if location is a path
|
// Add trailing slash if location is a directory
|
||||||
path.push("");
|
if path.is_dir() {
|
||||||
|
path.push("");
|
||||||
|
}
|
||||||
self.with_path(path)
|
self.with_path(path)
|
||||||
} else {
|
} else {
|
||||||
self.clone()
|
self.clone()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue