From 76038af8020ba4e5c4bf285fb75a127bfe335923 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 18 Nov 2024 08:38:29 +0000 Subject: [PATCH] Speed up listing notes and improve preview formatting --- notes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notes.sh b/notes.sh index ed7d6ab..4c13859 100755 --- a/notes.sh +++ b/notes.sh @@ -115,7 +115,7 @@ list_entries() { }\ " - grep -r -h "^Subject:\|^X-Note-Id:\|^X-Date:" "$BASEDIR" | awk "$FILTER" | sort | cut -d " " -f "2-" + grep -r -m 3 -h "^Subject:\|^X-Note-Id:\|^X-Date:" "$BASEDIR" | awk "$FILTER" | sort | cut -d " " -f "2-" } @@ -216,7 +216,7 @@ while (( "$#" )); do exit 1 fi NOTE_ID="$(echo $2 | cut -d " " -f 1)" - export_note "$NOTE_ID" "" | fmt -w "$FZF_PREVIEW_COLUMNS" + export_note "$NOTE_ID" "" | fmt -s -w "$FZF_PREVIEW_COLUMNS" exit 0 ;; -g|--graph)