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
|
||||
for file in *
|
||||
do
|
||||
grep --color=always -il "\<$1\>" $file
|
||||
grep --color=always -inhT -m2 -C1 "\<$1\>" $file
|
||||
grep --color=always -il "$1" $file
|
||||
grep --color=always -inhT -m2 -C1 "$1" $file
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue