File wildcard/glob patterns in Windows eza #621
-
I first used exa and have now been using eza with various Linux installs for years now. It's a great tool. I have just tried installing it on a windows machine for the first time and the winget installer fails (cannot extract the downloaded zip file). But I was able to manually extract and install the executable. I can run the eza command and it looks great and uses the same options as the Linux install. :-) However, if I try to include any filename wildcard/glob pattern, it always reports: "The filename, directory name, or volume label syntax is incorrect. (os error 123)". If I exactly specify a complete filename it works and shows that one file. If I don't specify a filename, it works and shows all files/directories. I cannot figure out why I cannot get any file globs to work. I have tried both standard windows pattterns (w*.*) as well as Linux style patterns. I know windows isn't the real focus for this application, but does anyone have an ideas as to what I might be doing wrong? Thx. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
OK, I apologize for my brain freeze. When I write code in Windows, I forget that the .net file functions typically do the glob expansion and that in the rest of the world it tends to be the shell handling this need. I created a small .cmd file named glob.cmd:
If I run my glob.cmd as: glob.cmd w*.* If anyone has better solution, I'd be interested.... Thx. |
Beta Was this translation helpful? Give feedback.
-
This is a severe limitation for eza on Windows. Yes, apparently that while on Linux globbing is handled by the shell, on Windows it's up to the program to handle it. And...
chrisant996/clink#548 (comment) I don't know anything about compiling on Windows, but I want to do what I can to solve this problem. Quite a few of the ported Unix coreutils don't have this problem (some do), so it seems that this is something that can be fixed on eza for Windows. |
Beta Was this translation helpful? Give feedback.
OK, I apologize for my brain freeze. When I write code in Windows, I forget that the .net file functions typically do the glob expansion and that in the rest of the world it tends to be the shell handling this need.
I created a small .cmd file named glob.cmd:
If I run my glob.cmd as: glob.cmd w*.*
and then run: eza -lhag %expanded_list%
it works as expected. It's not a complete solutions and it doesn't handle recursive globbing, but that can also be resolved. So, because of limitations in Windows, this is not as conven…