From 16f871ed3526b7559ff1a7df5ce00bf5c632fa3a Mon Sep 17 00:00:00 2001 From: Ayo Date: Sat, 2 Aug 2025 10:43:39 +0200 Subject: [PATCH] feat(notes): list notes in a directory using "nl " --- notes.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notes.sh b/notes.sh index cc87598..9a88a4f 100755 --- a/notes.sh +++ b/notes.sh @@ -69,7 +69,11 @@ elif [ "$1" = "sync" ] || [ "$1" = "s" ]; then elif [ "$1" = "list" ] || [ "$1" = "l" ]; then echo "ACTIVE NOTES: " notesSync - files=( $notes_dir/*.md ) + if ! [ "$2" = "" ]; then + files=( $notes_dir/$2/*.md ) + else + files=( $notes_dir/*.md ) + fi index=0 for file in "${files[@]##*/}"; do ((index++))