feat(tasks): don't edit newly created task"

This commit is contained in:
Ayo Ayco 2025-06-23 21:49:55 +02:00
parent 9ff46fe572
commit 651bd95adb
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,6 @@
# Sync notes via git # Sync notes via git
notesSync() { notesSync() {
# check if online # check if online
test="git.sr.ht" test="git.sr.ht"
if timeout 0.5 ping -q -c 1 -W 1 $test >/dev/null; then if timeout 0.5 ping -q -c 1 -W 1 $test >/dev/null; then

View file

@ -45,9 +45,10 @@ function createtask() {
echo $heading > "$full_path" echo $heading > "$full_path"
date_heading=$(date +'%b %d, %Y, %a %r') date_heading=$(date +'%b %d, %Y, %a %r')
echo $date_heading >> "$full_path" echo $date_heading >> "$full_path"
else
editFile "$full_path"
fi fi
editFile "$full_path"
} || { } || {
echo ">>> New task failed" echo ">>> New task failed"
@ -82,7 +83,7 @@ elif [ "$1" = "open" ] || [ "$1" = "o" ]; then
select file in "${files[@]##*/}"; do select file in "${files[@]##*/}"; do
{ {
echo "Opening $file" echo "Opening $file"
editFile "$file" editFile "${tasks_dir}/$file"
break break
} || } ||
{ {