Speed up listing notes and improve preview formatting

This commit is contained in:
Konstantin Nazarov 2024-11-18 08:38:29 +00:00
parent 8e1d3e017c
commit 76038af802
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22

View file

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