mirror of
https://github.com/nushell/nushell
synced 2024-12-27 21:43:09 +00:00
make cd recornize symblic link (#5454)
This commit is contained in:
parent
768ff47d28
commit
e14e60dd2c
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ use nu_protocol::{
|
|||
levenshtein_distance, Span,
|
||||
};
|
||||
use reedline::Suggestion;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
@ -120,7 +121,7 @@ pub fn directory_completion(
|
|||
return result
|
||||
.filter_map(|entry| {
|
||||
entry.ok().and_then(|entry| {
|
||||
if let Ok(metadata) = entry.metadata() {
|
||||
if let Ok(metadata) = fs::metadata(entry.path()) {
|
||||
if metadata.is_dir() {
|
||||
let mut file_name = entry.file_name().to_string_lossy().into_owned();
|
||||
if matches(&partial, &file_name, match_algorithm) {
|
||||
|
|
Loading…
Reference in a new issue