From 5417f28b1594a6c9b3fb793c2c7d2cc176ac2454 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Thu, 16 Feb 2023 23:45:47 +0500 Subject: [PATCH] Add "list" command --- histd.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/histd.sh b/histd.sh index 8386653..8d8eec2 100755 --- a/histd.sh +++ b/histd.sh @@ -42,6 +42,10 @@ function merge { find $BASE_DIR -type f -name "*.md" -exec echo "# {}" \; -exec cat "{}" \; -exec echo \; } +function list { + tree $BASE_DIR +} + function help { echo "Histd - How I Spent This Day" echo "A simple personal diary app" @@ -50,6 +54,7 @@ function help { echo "- histd.sh - open a text editor to describe the current day" echo "- histd.sh backup - create an archive of all notes" echo "- histd.sh merge - print all notes" + echo "- histd.sh list - list all notes" echo "- histd.sh help - show this message" } @@ -64,6 +69,8 @@ elif [[ $1 == "backup" ]]; then backup elif [[ $1 == "merge" ]]; then merge +elif [[ $1 == "list" ]]; then + list elif [[ $1 == "help" ]]; then help else