I often have to use the --exclude-dir to exclude various folders such as .git from the search path.
grep -r --exclude-dir=.git --exclude-dir=another_path XXX Then, the command line becomes quite lengthy every time.
Is there a way to make the --exclude-dir options the default, so that grep -r XXX is equivalent to above?
(This is with Ubuntu 24.04 LTS).