Search for the latest file by name, not by modification date
This commit is contained in:
parent
9c9acf9e83
commit
1f5af6af73
1 changed files with 1 additions and 1 deletions
2
histd.sh
2
histd.sh
|
@ -52,7 +52,7 @@ function list {
|
||||||
# Open last note
|
# Open last note
|
||||||
function last {
|
function last {
|
||||||
_check_editor
|
_check_editor
|
||||||
LAST_FILE=$(ls -t $BASE_DIR/**/**/* | head -1)
|
LAST_FILE=$(find $BASE_DIR -type f -name "*.md" | tail -1)
|
||||||
cd $BASE_DIR
|
cd $BASE_DIR
|
||||||
$EDITOR $LAST_FILE
|
$EDITOR $LAST_FILE
|
||||||
cd - > /dev/null
|
cd - > /dev/null
|
||||||
|
|
Loading…
Reference in a new issue