diff --git a/histd.sh b/histd.sh index a0261f9..5a1da18 100755 --- a/histd.sh +++ b/histd.sh @@ -52,7 +52,7 @@ function list { # Open last note function last { _check_editor - LAST_FILE=$(ls -t $BASE_DIR/**/**/* | head -1) + LAST_FILE=$(find $BASE_DIR -type f -name "*.md" | tail -1) cd $BASE_DIR $EDITOR $LAST_FILE cd - > /dev/null