From 3c774a3a4ae5110bc05ab903180bb452ed5500fb Mon Sep 17 00:00:00 2001 From: Antoine Date: Thu, 1 Aug 2024 09:27:49 +0200 Subject: [PATCH] fix dn to get leftover tasks from last daily note --- local/bin/dn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/bin/dn b/local/bin/dn index f635b4a..aa8759a 100755 --- a/local/bin/dn +++ b/local/bin/dn @@ -4,10 +4,10 @@ today=$(date +%d-%m-%Y) daily_note_dir="$NOTES_DIR/daily_notes" today_file="${daily_note_dir}/${today}_daily.md" +most_recent_file=$(ls -t ${daily_note_dir}/*_daily.md 2>/dev/null | head -n 1) # Function to find unticked checkboxes in the most recent daily note find_unticked_checkboxes() { - most_recent_file=$(ls -t ${daily_note_dir}/*_daily.md 2>/dev/null | head -n 1) if [[ -f "$most_recent_file" ]]; then grep -E '^\s*[-*]\s+\[ \]' "$most_recent_file" else