feat(tasks): don't edit newly created task"
This commit is contained in:
parent
9ff46fe572
commit
651bd95adb
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
5
tasks.sh
5
tasks.sh
|
@ -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
|
||||||
} ||
|
} ||
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue