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

Ability to opt out of ** (have it behave like * / POSIX glob) #142

Open
LunarLambda opened this issue Mar 21, 2024 · 0 comments
Open

Ability to opt out of ** (have it behave like * / POSIX glob) #142

LunarLambda opened this issue Mar 21, 2024 · 0 comments

Comments

@LunarLambda
Copy link

LunarLambda commented Mar 21, 2024

I'm parsing a file format which uses glob patterns in C. The C glob function on unix does not support **. Instead, a series of consecutive * is the same as writing just one *

demonstrated with a posix shell:

$ ls -ld /usr/**/
drwxr-xr-x   2 root root 77824 Mar 19 16:34 /usr/bin/
drwxr-xr-x   2 root root  4096 Mar 19 09:05 /usr/games/
drwxr-xr-x   4 root root  4096 Nov 29 14:17 /usr/i686-w64-mingw32/
drwxr-xr-x 108 root root 20480 Mar 18 14:23 /usr/include/
drwxr-xr-x 118 root root  4096 Mar 19 16:34 /usr/lib/
drwxr-xr-x   3 root root  4096 Mar 11 09:31 /usr/lib64/
drwxr-xr-x  21 root root 12288 Mar 19 09:32 /usr/libexec/
drwxr-xr-x  12 root root  4096 Feb 19 09:37 /usr/local/
drwxr-xr-x   2 root root 20480 Mar 19 09:32 /usr/sbin/
drwxr-xr-x 347 root root 12288 Mar 19 16:34 /usr/share/
drwxr-xr-x   6 root root  4096 Mar 13 10:14 /usr/src/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant