mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 00:54:56 +02:00
Better ls paths (#4612)
* Fix ls paths... again * Fix ls paths... again * Always expand paths inside of glob_from * Expand in ls before we check for directory info
This commit is contained in:
@ -25,11 +25,7 @@ pub fn glob_from(
|
||||
ShellError,
|
||||
> {
|
||||
let path = PathBuf::from(&pattern.item);
|
||||
let path = if path.is_relative() {
|
||||
expand_path_with(path, cwd)
|
||||
} else {
|
||||
path
|
||||
};
|
||||
let path = expand_path_with(path, cwd);
|
||||
|
||||
let (prefix, pattern) = if path.to_string_lossy().contains('*') {
|
||||
// Path is a glob pattern => do not check for existence
|
||||
|
Reference in New Issue
Block a user