I'm curious if anyone has a way to automatically generate a different set of --exclude-dir flags for grep for each different codebase that you work in.
Because in one project, I'll never want to search in the output/ dir, and in another, I'll never want to search in the checkpoints/ directory.
Since there are often a few folders in a codebase that have non-source code, I always have to type those out manually (e.g. grep --exclude_dir {onedir, twodir, threedir} ...)
Ideally, for whatever codebase I'm in, I can just have a file in it that grep can look into to see what to automatically populate the --exclude-dir option with whenever I call grep from the command line. So that I don't have to type out a long list of directory names to exclude every time, which differ based on which project I'm currently working in.
If it could just read from an existing .gitignore that would work too.