diff options
Diffstat (limited to 'etc')
| -rwxr-xr-x | etc/functions/gtd-all | 17 | 
1 files changed, 16 insertions, 1 deletions
diff --git a/etc/functions/gtd-all b/etc/functions/gtd-all index f1a46c6..cefe62b 100755 --- a/etc/functions/gtd-all +++ b/etc/functions/gtd-all @@ -1,7 +1,22 @@  ## vim:ft=zsh  typeset prefix=~/var/gtd  typeset database +typeset arg=$1 + +function gtd_grep { +	if [[ $arg == force ]] { +		cat +		return 0 +	} +	if [[ -r ~/var/tmp/.actual-location && $(<~/var/tmp/.actual-location) == offline ]] { +		fgrep -v '@online' +		return 0 +	} +	cat +	return 0 +} +  for database in $prefix/*(.N); {  	echo "\n${database:t}" -	todo --database $database +	todo --database $database --force-colour | gtd_grep  }  | 
