Not for normies
| 1 | __GREP_CACHE_FILE=""/grep-alias |
| 2 | |
| 3 | # See if there's a cache file modified in the last day |
| 4 | __GREP_ALIAS_CACHES=(""(Nm-1) |
| 5 | if ; then |
| 6 | |
| 7 | else |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | # Ignore these folders (if the necessary grep flags are available) |
| 13 | EXC_FOLDERS="{.bzr,CVS,.git,.hg,.svn,.idea,.tox,.venv,venv}" |
| 14 | |
| 15 | # Check for --exclude-dir, otherwise check for --exclude. If --exclude |
| 16 | # isn't available, --color won't be either (they were released at the same |
| 17 | # time (v2.5): https://git.savannah.gnu.org/cgit/grep.git/tree/NEWS?id=1236f007 |
| 18 | if ; then |
| 19 | GREP_OPTIONS="--color=auto --exclude-dir=" |
| 20 | elif ; then |
| 21 | GREP_OPTIONS="--color=auto --exclude=" |
| 22 | fi |
| 23 | |
| 24 | if ; then |
| 25 | # export grep, egrep and fgrep settings |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | # write to cache file if cache directory is writable |
| 31 | if ; then |
| 32 | | |
| 33 | fi |
| 34 | fi |
| 35 | |
| 36 | # Clean up |
| 37 | |
| 38 | |
| 39 | fi |
| 40 | |
| 41 |