Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The two features are bundled together because I couldn't find a way to test UTF-8, since valid multibyte UTF-8 characters cannot contain ASCII characters like
*
and/
. Invalid multibyte UTF-8 characters are allowed on ext4 Linux, but Nix seems to normalize them into valid UTF-8 and gets rid of the invalid*
and/
bytes in the process.Added a fix for patterns like
\*
, since*
is a valid character in file names, at least on ext4 Linux. I made sequences like\t
match the charactert
instead of a tab, but didn't add any tests for it, since I'm not sure if this is a behavior we want to keep.The UTF-8 feature is implemented using https://github.com/figsoda/utf8. The implementation might be a little inefficient because it converts back and forth between strings and lists of characters using
concatStrings
andutf8.chars
, but hopefully shouldn't be a big deal because of how short glob pattern usually are. I went with this route because otherwise the diff might be a bit hard to review.closes #5
closes #6