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 \>
master
nirenjan 2013-02-11 15:39:15 -08:00
parent aebd58f73d
commit 35eb2b8da8
1 changed files with 2 additions and 2 deletions

4
note
View File

@ -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
}