mirror of https://github.com/nirenjan/dotfiles.git
Allow user to pass in grep pattern
This also disables the search by word, so to search only by word boundaries, surround the pattern by \< and \>vimbundler
parent
a00d7dff70
commit
4c99a14532
|
@ -264,8 +264,8 @@ note_search() {
|
||||||
cd $NOTES_DIR
|
cd $NOTES_DIR
|
||||||
for file in *
|
for file in *
|
||||||
do
|
do
|
||||||
grep --color=always -il "\<$1\>" $file
|
grep --color=always -il "$1" $file
|
||||||
grep --color=always -inhT -m2 -C1 "\<$1\>" $file
|
grep --color=always -inhT -m2 -C1 "$1" $file
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue