-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Right now, if -a is specified, then ag appears to ignore the --ignore-dir argument(s).
Please update ag so that if both -a and --ignore-dir are used as command line arguments, the --ignore-dir argument(s) are respected and those directories are ignored.
Use case: by default, ag ignores a number of file types and directories by default, which usually is perfect. Sometimes I need to search for something that is in one of those excluded file types, so I need to use the -a option. I work with both node/Angular and Python virtual environments, and what I'm searching for often appears tens to hundreds of times within these directories, giving me a poor signal-to-noise ratio in the search results. I want to be able to exclude the venv and node_modules and .angular directories by using one or more --ignore-dir arguments. But right now, --ignore-dir arguments are ignored if -a has been specified.
For example if I execute:
ag -a --ignore-dir venv xyz
Ag currently searches the venv directory for xyz instead of ignoring venv. I am requesting ag be updated to always respect --ignore-dir arguments, regardless if -a has been specified or not. Or, if this will have unintended side effects with the use of -a argument, then some new argument/switch to search all files but still respect --ignore-dir argument(s).
Ag is an incredibly helpful utility, and this functionality will make it even more helpful.
Thanks