I'm trying to pass a complicated regex as an ignore pattern. I want to ignore all subfolders of locales/
except locales/US/en/*
. I may need to fallback to using a .agignore file, but I'm trying to avoid that.
I'm using silver searcher (similar to Ack, Grep). I use zsh in my terminal.
This works really well and ignores all locale subfolders except locales/US
:
ag -g "" --ignore locales/^US/ | fzf
I also want to ignore all locales/US/*
except for locales/US/en
Want I want is this, but it does not work.
ag -g "" --ignore locales/^US/^en | fzf
Thoughts?
The following can work as well:
Man Pages Documentation
-prune
lets you filter out your results (better description here)-exec
lets you execute a command on any resultsfind
returns.Add multiple --ignore commands. For instance: