#! /bin/tcsh -f 
# -*- Shell-script -*- Time-stamp: <2021-03-17 21:52:16 sander>
# cmg = caaba/mecca-grep

# put the same find commands here as in etags command in main.mk:
# -L = follow links
find -L . -name "*.f90"                            | xargs grep --color -iF "$1"
find -L . -name "*.inc"                            | xargs grep --color -iF "$1"
find -L . -name "*.nml"                            | xargs grep --color -iF "$1"
find -L . -name "*.tex"                            | xargs grep --color -iF "$1"
find -L . -name "*.eqn"                            | xargs grep --color -iF "$1"
find -L . -name "*.spc"                            | xargs grep --color -iF "$1"
find -L . -name "*.kpp"                            | xargs grep --color -iF "$1"
find -L . -name "*.awk"                            | xargs grep --color -iF "$1"
find -L . -name "*.ini"                            | xargs grep --color -iF "$1"
find -L . -name "*.rpl"                            | xargs grep --color -iF "$1"
find -L . -name "*.tbl"                            | xargs grep --color -iF "$1"
find -L . -name "*.py"                             | xargs grep --color -iF "$1"
find -L . -name "*.jnl"                            | xargs grep --color -iF "$1"
find -L . -type f -perm -100 -not -regex ".*\.exe" | xargs grep --color -iF "$1"

exit
