why does a glob in single quotes on Windows not work? #2536
-
What version of ripgrep are you using?
How did you install ripgrep?https://github.com/BurntSushi/ripgrep/releases What operating system are you using ripgrep on?Windows 10 Describe your bug.I would like to search for text in a subset of files, not all of them. I tried using What are the steps to reproduce the behavior?
What is the actual behavior?https://gist.github.com/ashrasmun/245ec0e48dd2b8377b0aa4616b7e9b2d What is the expected behavior?I would like to search for string 'lib' in a narrow set of files, not all of them. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Thanks for the report. My best guess is that you have a Windows problem. IIRC, single quotes don't work the way your command suggests you think they do: https://superuser.com/questions/324278/how-to-make-windows-command-prompt-treat-single-quote-as-though-it-is-a-double-q It might be a good idea to read a tutorial on how to use the Windows command line. I'm not a Windows user myself so I'm not sure what the best one might be. |
Beta Was this translation helpful? Give feedback.
-
They actually provided the
So yeah, the single quotes are interpreted literally and they end up in the glob pattern. |
Beta Was this translation helpful? Give feedback.
-
Ah nice! I completely missed the gist link. Thanks for pointing that out. :) |
Beta Was this translation helpful? Give feedback.
-
Hey, thanks for the response. Everything works fine with double quotes. Sorry, I just rolled with what's written on https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#manual-filtering-globs. Was there anything I could do better with gist to make it more visible? I tried to follow the guide when creating the issue as faithfully as I could. |
Beta Was this translation helpful? Give feedback.
Thanks for the report.
Can you say why you didn't run with--debug
and show the output, as the error message suggests?My best guess is that you have a Windows problem. IIRC, single quotes don't work the way your command suggests you think they do: https://superuser.com/questions/324278/how-to-make-windows-command-prompt-treat-single-quote-as-though-it-is-a-double-q
It might be a good idea to read a tutorial on how to use the Windows command line. I'm not a Windows user myself so I'm not sure what the best one might be.