From 4c99a14532c8fc361296c17e61e64d945e7c7760 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 \> --- scripts/note | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/note b/scripts/note index 1946a73..c398315 100755 --- a/scripts/note +++ b/scripts/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 }