forked from extern/nushell
ls .file
and ls **/.*
show hidden files (#2379)
This commit is contained in:
@ -125,6 +125,8 @@ impl Shell for FilesystemShell {
|
||||
}
|
||||
};
|
||||
|
||||
let hidden_dir_specified = is_hidden_dir(&path);
|
||||
|
||||
let mut paths = glob::glob(&path.to_string_lossy())
|
||||
.map_err(|e| ShellError::labeled_error(e.to_string(), "invalid pattern", &p_tag))?
|
||||
.peekable();
|
||||
@ -145,7 +147,7 @@ impl Shell for FilesystemShell {
|
||||
Err(err) => return Some(Err(err)),
|
||||
};
|
||||
|
||||
if !all && is_hidden_dir(&path) {
|
||||
if !all && !hidden_dir_specified && is_hidden_dir(&path) {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user