Update clean-tw.sh
Automated confirmation process when deleting multiple tasks
This commit is contained in:
parent
c56f8995e1
commit
18aadb6673
1 changed files with 9 additions and 8 deletions
|
@ -5,6 +5,7 @@ function get_task_value {
|
||||||
}
|
}
|
||||||
|
|
||||||
ids=$(task limit:none recur | grep -E '^ ?[[:digit:]].*[[:alpha:]].*[[:digit:]]$' | sed -E 's/^ ?([[:digit:]]+) .*/\1/')
|
ids=$(task limit:none recur | grep -E '^ ?[[:digit:]].*[[:alpha:]].*[[:digit:]]$' | sed -E 's/^ ?([[:digit:]]+) .*/\1/')
|
||||||
|
|
||||||
excluded_ids=$(for id in $ids
|
excluded_ids=$(for id in $ids
|
||||||
do
|
do
|
||||||
task_data="$(task $id)"
|
task_data="$(task $id)"
|
||||||
|
@ -18,5 +19,5 @@ del_ids=$(for id in $excluded_ids $ids
|
||||||
|
|
||||||
if [ ! -z "$del_ids" -a "$del_ids" != " " ]
|
if [ ! -z "$del_ids" -a "$del_ids" != " " ]
|
||||||
then
|
then
|
||||||
task $del_ids del
|
{ echo 'all'; yes n; } | task $del_ids del
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue