diff --git a/.config/shell/bin/ned b/.config/shell/bin/ned index 650bde2..6c2c8db 100755 --- a/.config/shell/bin/ned +++ b/.config/shell/bin/ned @@ -42,7 +42,7 @@ edit() { SEARCH_TERM="$2" fi - NOTE_PATH="$NOTES_DIR/$(cd "$NOTES_DIR" && fzf -1 -q "$SEARCH_TERM" --layout=reverse --info=inline --height=10%)" + NOTE_PATH="$NOTES_DIR/$(cd "$NOTES_DIR" && fzf -1 -q "$SEARCH_TERM" --layout=reverse --info=inline --height=10%)" || exit $EDITOR_CMD "$NOTE_PATH" } @@ -59,6 +59,7 @@ new() { NOTE_NAME="$(date +'%F').md" fi + # TODO: use fzf instead of fd + fzf for picking the directory NOTE_PATH="$(fd -ad 1 "^$2" "$NOTES_DIR")" # check if there were no results if [ -z "$NOTE_PATH" ]; then