From 35eb2b8da82339acad2f1a216cc48f5270478e76 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Mon, 11 Feb 2013 15:39:15 -0800 Subject: [PATCH] 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 \> --- note | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/note b/note index 1946a73..c398315 100755 --- a/note +++ b/note @@ -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 }