aboutsummaryrefslogtreecommitdiffstats
path: root/grepnote
diff options
context:
space:
mode:
authorMatthew Lemon <chaffinach+git@protonmail.ch>2022-01-07 13:57:41 +0000
committerMatthew Lemon <chaffinach+git@protonmail.ch>2022-01-07 13:57:41 +0000
commit79908d0f06a13adb62ed11b8935741cbee5d396b (patch)
tree6ad6fe847fbcc0abc6e94f9f17ad96bb8788ca9e /grepnote
parentecc038b6bfc0dfdd4a7a8c333218324542b873f5 (diff)
can now search for term
Diffstat (limited to '')
-rwxr-xr-xgrepnote6
1 files changed, 3 insertions, 3 deletions
diff --git a/grepnote b/grepnote
index a33cd4f..b42dfe0 100755
--- a/grepnote
+++ b/grepnote
@@ -6,10 +6,10 @@ GREP=/usr/bin/grep
CMD="$RG_BIN --heading -w -i -g !"*fish-history*" -g !"*.html*" -g !"*apt-packages*" -g !"*.json" -g !"*-fish-history*" -g !"*backup*""
if [[ -z $1 ]]; then
- echo "You must provide a file name as the argument to this command."
+ echo "You must provide a search term as the argument to this command."
exit 1
else
- TARGET=$1
+ TARGET="$1"
fi
# test for rg
@@ -18,6 +18,6 @@ if ! [[ -x $RG_BIN ]]; then
fi
# rg --heading -i "joanna" ~/Notes/journal/
-$CMD $TARGET $NOTES
+$CMD "$TARGET" $NOTES