diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-24 22:41:07 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-24 22:41:07 +0100 |
commit | 394a4a82e5dc5b5e0425df29b835f87578de9962 (patch) | |
tree | 0ecb08d5e64443d9559ab3705824e5c5298e4729 /etc | |
parent | 1ae1b18bbdb49291df4ec7e7081930ddcb548a58 (diff) |
gtd-all: Pass additional arguments to devtodo
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/functions/gtd-all | 16 |
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 } |