加入到 ~/.bashrc 或者 ~/.bash_profile
bash
1 export GREPF_FILES=/mnt/d/Developer:/mnt/e/Developer 2 3 function grepf() { 4 if [ $# -ne 1 ]; then 5 cat <
mingw
1 #export GREPF_FILES="$(cygpath 'D:\Developer') $(cygpath 'E:\Developer')" 2 3 function grepf() { 4 if [ $# -ne 1 ]; then 5 cat <
命令
$ grepfUsage: grepf PATTERNVariable: GREPF_FILES grep fileExample: grepf \"2005\" GREPF_FILES=. grepf \"2005\"