diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-13 16:35:13 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-13 16:35:13 +0200 |
| commit | 730706910852b83ebf72345622e72b97bd5715e3 (patch) | |
| tree | 7ffdd879cae08ca815af0aabd5c69b4918f4a5d6 /fish | |
| parent | af6d3b1526c203f8f7ed0321f4faad9ff5b9dd51 (diff) | |
Update
Diffstat (limited to 'fish')
| -rw-r--r-- | fish/conf.d/taskwarrior.fish | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fish/conf.d/taskwarrior.fish b/fish/conf.d/taskwarrior.fish index 885d2a2..7bd85b0 100644 --- a/fish/conf.d/taskwarrior.fish +++ b/fish/conf.d/taskwarrior.fish @@ -93,6 +93,25 @@ function taskwarrior::export::maybe end end +function taskwarrior::export::wins + set -l winsfile ~/Notes/random/Wins.md + if test -f $winsfile + # Export all wins project tags + for tag in win wins + task +$tag -random status:pending export | jq -r '.[].description' | sed 's/^/* /' >>$winsfile.tmp.1 + # Guard against "No tasks specified." when there is nothing to delete + test (task +$tag -random status:pending count) -gt 0; and yes | task +$tag -random status:pending delete + end + grep -F '* ' $winsfile >>$winsfile.tmp.1 + + echo "# wins (7)" >$winsfile.tmp.2 + echo '' >>$winsfile.tmp.2 + echo 'Thinks I wins will do something about or wins not' >>$winsfile.tmp.2 + echo '' >>$winsfile.tmp.2 + sort -u $winsfile.tmp.1 >>$winsfile.tmp.2 && mv $winsfile.tmp.2 $winsfile && rm $winsfile.tmp.1 + end +end + function taskwarrior::export _taskwarrior::set_import_export_tags set -l ts (date +%s) @@ -111,6 +130,7 @@ function taskwarrior::export taskwarrior::export::bd taskwarrior::export::maybe + taskwarrior::export::wins end function taskwarrior::import |
