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
Trying to hide all files except the ones in a specific directory #527
Comments
Ok, I've debugged the two reasons why my code wasn't working. Forgive my newbiness, and I hope this helps someone else! First of all, the options aren't included unless you place them before the main script. So, that's why my regex's weren't registering. that's probably a common thing here with unix commands, but as I said, I'm a noob, but I'm always learning! Second of all, you have to escape your regular expression on the command line. So, if you want to only include certain files or directories, you need do do a negative lookahead and escape the regular expression. So, say you only wanted files with the word jacket or cake in the file. You could do that like this: --hidden=^\(?\!\(.*jacket.*\)\|\(.*cake.*\)\) If you just wanted files with the word jacket in them, you could do this: --hidden=^\(?\!.*cake.*\) Hope this helps someone else too! |
A simpler way how to escape the regular expression argument is to use single quotes:
|
@zwhitchcox , can this issue to be closed? |
No activity by long time. Feel free to reopen it, if issue doesn't solved. |
I try to hide all files except the ones in the directory "meanio" like this:
But I get this error:
-bash: !meanio: event not found
Side note, no regular expressions work, not just this one. It's just usually, it blatantly ignores my regex, and doesn't even give me an error.
I'm on yosemite with node version 0.10.35
The text was updated successfully, but these errors were encountered: