ls
behavior with glob patterns is surprising
#12641
Labels
file-system
Related to commands and core nushell behavior around the file system
glob-expansion
Specific behavior around file-system globbing with regular commands or `glob`
When given a glob pattern as argument,
ls
will behave in the exact same way asglob
, listing the paths themselves instead of the content of any directories.Suppose I have two directories,
foo-1
andfoo-2
, both of which have aempty.txt
in them. Compare:This is surprising. I would expect the output of these two commands to be the same.
For reference, here's how
^ls
works:We can discuss whether it's better to group the output (like
^ls
) or merge the output (likels foo-1 foo-2
), but I don't think it's right to list the directories themselves instead of their content.The text was updated successfully, but these errors were encountered: