feat(tasks): Remove Project (move tasks to parent then delete)
This commit is contained in:
parent
3007aa3f75
commit
578be926e4
1 changed files with 17 additions and 0 deletions
17
tasks.sh
17
tasks.sh
|
@ -227,6 +227,23 @@ elif [ "$1" = "move" ] || [ "$1" = "m" ]; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## REMOVE a project
|
||||||
|
elif [ "$1" = "remove-project" ] || [ "$1" = "rp" ]; then
|
||||||
|
cd "$tasks_dir"
|
||||||
|
dirs=( */ )
|
||||||
|
|
||||||
|
if ! [ "$2" = "" ]; then
|
||||||
|
index=($2-1)
|
||||||
|
remove_project=${dirs[$index]}
|
||||||
|
echo "Removing $remove_project"
|
||||||
|
# move all project tasks to parent
|
||||||
|
mv "${tasks_dir}/${remove_project}"* "${tasks_dir}/"
|
||||||
|
rm -rf "${tasks_dir}/${remove_project}"
|
||||||
|
notesSync
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
## CREATE a project
|
## CREATE a project
|
||||||
elif [ "$1" = "project" ] || [ "$1" = "p" ]; then
|
elif [ "$1" = "project" ] || [ "$1" = "p" ]; then
|
||||||
read -p "Create new project: " project
|
read -p "Create new project: " project
|
||||||
|
|
Loading…
Reference in a new issue