From 6d5a3f72e56c1c41c19e01a71d5d524f487cce63 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Tue, 19 Apr 2022 23:43:55 -0700 Subject: [PATCH] ned: change comments --- .config/shell/bin/ned | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/shell/bin/ned b/.config/shell/bin/ned index c86e6f2..9d8042e 100755 --- a/.config/shell/bin/ned +++ b/.config/shell/bin/ned @@ -47,13 +47,14 @@ open_file() { edit() { check_setup - # This logic is to allow the $2 to be optional + # This logic is to allow $2 to be optional if [ -n "$3" ]; then SEARCH_TERM="$3" NOTE_DIR="$(cd "$BASE_DIR" && fd -t f | sed 's-\./--g' | $FZF_SEARCH "$2")" || exit elif [ -n "$2" ]; then SEARCH_TERM="$2" fi + # TODO: what if there is no $2 provided # Searching for 'T' will get you today's note if [ "$SEARCH_TERM" = 'T' ]; then @@ -75,6 +76,7 @@ new() { else NEW_NOTE_NAME="$DEFAULT_NEW_NOTE_NAME" fi + # TODO: what if there is no $2 provided # Note dir NEW_NOTE_DIR="$BASE_DIR/$(cd "$BASE_DIR" && fd -d 1 | sed 's-\./--g' | $FZF_SEARCH "$2")/notes" || exit