Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to escape metacharacters in globs #4935

Open
quasicomputational opened this issue Dec 5, 2017 · 7 comments
Open

No way to escape metacharacters in globs #4935

quasicomputational opened this issue Dec 5, 2017 · 7 comments

Comments

@quasicomputational
Copy link
Contributor

The section of Cabal's manual describing file globbing does not cover how to escape metacharacters. It ought to say how to include a file with a literal * in its name.

@23Skidoo
Copy link
Member

I'm actually not sure whether that is at all supported.

@gbaz
Copy link
Collaborator

gbaz commented Feb 2, 2018

cc @mitchellwrosen

@mitchellwrosen
Copy link

I'm not sure either but I can find out for you in a couple hours.

@mitchellwrosen
Copy link

It's not possible to include a file with a literal * in its name:

_ | '*' `elem` filepath -> Nothing

@mitchellwrosen
Copy link

Actually, I thing I'm wrong. The code looks like it would accept a filename such as

foo.*.txt

(but the user probably intended for * to be treated like a glob in this case).

@mitchellwrosen
Copy link

Whoops, forget that last comment, I read the code wrong. I confused filepath for filepath'. The code is confusing, heh.

@quasicomputational
Copy link
Contributor Author

In which case I am going to turn this into a feature request, since I'd think that someone, somewhere will have a good reason to include a file with an asterisk in its path; it'll also free preprocessors like hpack of the duty to check for that special case.

@quasicomputational quasicomputational changed the title Manual does not describe how to escape metacharacters No way to escape metacharacters in globs Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants