From 1f5af6af7382b8144ef140007be96eb6fb84c8e3 Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Mon, 13 Mar 2023 00:33:11 +0500 Subject: [PATCH] Search for the latest file by name, not by modification date --- histd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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