Deewiant / glob

Haskell library for glob matching
https://deewiant.iki.fi/projects/glob/
Other
25 stars 8 forks source link

Output of glob is not in lexicographic order #27

Closed jbweston closed 6 years ago

jbweston commented 6 years ago

Not sure if this is a bug or expected behavior, but glob matches are returned in a (seemingly) arbitrary order.

I would expect the results to be in lexicographic order, so as to match the output of ls on the same glob.

Steps to reproduce

Deewiant commented 6 years ago

This is expected: glob returns the files in the same order as getDirectoryContents produces them. Try ls -U ("do not sort; list entries in directory order") and you should see the same order. If you want to sort the results, you may do so yourself afterwards — that's what ls also does internally.

jbweston commented 6 years ago

Thanks for the clarification.