summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-24 22:41:07 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-24 22:41:07 +0100
commit394a4a82e5dc5b5e0425df29b835f87578de9962 (patch)
tree0ecb08d5e64443d9559ab3705824e5c5298e4729 /etc
parent1ae1b18bbdb49291df4ec7e7081930ddcb548a58 (diff)
gtd-all: Pass additional arguments to devtodo
Diffstat (limited to 'etc')
-rwxr-xr-xetc/functions/gtd-all16
1 files changed, 13 insertions, 3 deletions
diff --git a/etc/functions/gtd-all b/etc/functions/gtd-all
index c4e23e6..ddbfdba 100755
--- a/etc/functions/gtd-all
+++ b/etc/functions/gtd-all
@@ -1,10 +1,20 @@
## vim:ft=zsh
+## concatenate all GTD databases
+## usage: gtd-all [--force] [devtodo options]
typeset prefix=~/var/gtd
typeset database
-typeset arg=$1
+typeset -i force
+
+while [[ $1 == -* ]] {
+ case $1 in
+ -|--) shift; break ;;
+ --force) force=1 ;;
+ esac
+ shift
+}
function gtd_grep {
- if [[ $arg == force ]] {
+ if (( force )) {
cat
return 0
}
@@ -18,5 +28,5 @@ function gtd_grep {
for database in $prefix/*(.N); {
echo "\n${database:t}"
- todo --database $database | gtd_grep
+ todo --database $database $* | gtd_grep
}