jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit e724bdfad65ac547e9e3cc61309ee850d76c2d74
parent 315889f2036f972efde5a678d7834069ce4c0ae9
Author: Jaromil <jaromil@dyne.org>
Date:   Wed, 30 Apr 2014 17:13:44 +0200

fixes to group completion

Diffstat:
Msrc/zlibs/addressbook | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/zlibs/addressbook b/src/zlibs/addressbook @@ -113,20 +113,21 @@ EOF } complete() { - func "complete from $list: $1" + func "complete: $1 (list $list)" # completion on configured groups { test -r $MAILDIRS/Groups } && { if [[ "$1" =~ "group/" ]]; then + func "completion will look into groups" needle="${1[(ws:/:)2]}" - if [ "$needle" = "group" ]; then + if [ "$needle" = "" ]; then act "Listing all mailout groups" matches="`${=find} $MAILDIRS/Groups -type f`" else act "Searching for \"$needle\" in mailout groups" - matches="`#{=find} $MAILDIRS/Groups -type f -name \"*$needle*\"`" + matches="`${=find} $MAILDIRS/Groups -type f -name \"*$needle*\"`" fi - print "jaro: ${#matches} matches" + print "Groups: `print $matches | wc -l` matches" print for i in ${(f)matches}; do gr=`basename $i`