From ac39900126a8cad29d2f82bf6ccc4fd9d09cc43a Mon Sep 17 00:00:00 2001 From: Ayo Date: Tue, 24 Jun 2025 00:20:08 +0200 Subject: [PATCH] feat(tasks): intial Projects creation --- tasks.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tasks.sh b/tasks.sh index bf8c2be..0840b86 100755 --- a/tasks.sh +++ b/tasks.sh @@ -102,14 +102,14 @@ elif [ "$1" = "done" ] || [ "$1" = "d" ]; then done_file=${files[$index]} read -p "Resolution: " resolution echo $resolution >> "$done_file" - mv "$done_file" "${tasks_dir}/done/" + mv "$done_file" "${tasks_dir}/.done/" notesSync else PS3="Mark as Done, file #: " - echo "Mark a task as DONE ($(ls ${tasks_dir}/done/ | wc -l))." + echo "Mark a task as DONE ($(ls ${tasks_dir}/.done/ | wc -l))." select file in "${files[@]##*/}"; do { - mv "${tasks_dir}/${file}" "${tasks_dir}/done/" + mv "${tasks_dir}/${file}" "${tasks_dir}/.done/" notesSync break } || @@ -173,8 +173,18 @@ elif [ "$1" = "copy" ] || [ "$1" = "c" ]; then done fi +## CREATE PROJECT +elif [ "$1" = "project" ] || [ "$1" = "j" ]; then + read -p "Create new project: " project + mkdir "$tasks_dir/$project" ## CREATE a task (default) else + index=0 + for dir in "$(cd $tasks_dir && ls -d -- */)"; do + ((index++)) + echo "$index) $dir" + done + createtask fi