Skip to content
chumpy edited this page Jun 13, 2012 · 3 revisions

Calamity Recipes

Calamity obeys the unix principle of playing nice with textual inputs/outputs, you can unlock a lot of functionality by chaining with other programs (particularly grep and awk). Following are some recipes for common tasks.

  • Filter list by context or project:
$ calamity list | grep "project or context name"
  • Filter list by context or project and show only task name:
$ calamity list | grep "project or context name" | awk '{print $1}'
  • List all unfinished tasks but show only task name:
$ calamity list | awk 'NR>1{print $1}'
  • Count unfinished tasks for a given context or project:
$ calamity list | grep "project or context name" | awk 'END {print NR}'
Clone this wiki locally