commit 2905f7c531889ff7906da47d6d436aa78e706bd0 parent d7b93f5da26b7d47a470a703473cade3964bab5e Author: pancake@localhost.localdomain <unknown> Date: Wed, 28 Oct 2009 22:11:22 +0100 * Add support for listing files owned by ANDed tags - dmc-tag -l tag1 tag2 tag3 ... Diffstat:
dmc-tag | | | 17 | +++++++++-------- |
doc/design | | | 3 | +++ |
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/dmc-tag b/dmc-tag @@ -67,17 +67,18 @@ case "$1" in fi ;; "-l") - # show all available tags if [ -z "$2" ]; then ls | cat else - while [ -n "$2" ] ; do - if [ -e "${DMCTAG_ROOT}/$2" ]; then - cat ${DMCTAG_ROOT}/$2 - else - echo "Cannot find tag $2" - fi - shift + # XXX buggy: does not supports filenames with spaces + tag0=$2 + shift ; shift + for a in `cat ${DMCTAG_ROOT}/${tag0}`; do + for b in $* ; do + a="`grep "$a" ${DMCTAG_ROOT}/$b`" + [ -z "$a" ] && break + done + [ -n "$a" ] && echo $a done fi ;; diff --git a/doc/design b/doc/design @@ -34,6 +34,9 @@ sync The sync process is done independently from the backend. + - get list of last 50 mails + - TODO + tags