Skip to content

Instantly share code, notes, and snippets.

@ssokolow
Created August 10, 2014 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssokolow/b4851834851ab6010f1c to your computer and use it in GitHub Desktop.
Save ssokolow/b4851834851ab6010f1c to your computer and use it in GitHub Desktop.
Expect script for deleting all missed instances of TaskWarrior tasks which recur daily
#!/usr/bin/expect --
spawn task "( recur.is:1d or recur.is:daily )" due.before:now status:pending delete
for {} 1 {} {
expect {
"Permanently delete task" { send "y\n"}
"This is a recurring task. Do you want to delete all pending recurrences of this same task? (yes/no)" { send "n\n"}
eof { exit }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment