From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21147 invoked from network); 15 Jul 2003 03:54:09 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Jul 2003 03:54:08 -0000 Received: (qmail 9545 invoked by alias); 15 Jul 2003 03:54:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18856 Received: (qmail 9532 invoked from network); 15 Jul 2003 03:54:02 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Jul 2003 03:54:02 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.64.233.9] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Jul 2003 3:54:2 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h6F3s0u07191 for zsh-workers@sunsite.dk; Mon, 14 Jul 2003 20:54:00 -0700 From: Bart Schaefer Message-Id: <1030715035400.ZM7190@candle.brasslantern.com> Date: Tue, 15 Jul 2003 03:54:00 +0000 In-Reply-To: <478.1057231464@csr.com> Comments: In reply to Peter Stephenson "Re: Bug in autocompletion in CVS" (Jul 3, 12:24pm) References: <478.1057231464@csr.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Bug in autocompletion in CVS MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 3, 12:24pm, Peter Stephenson wrote: } } I think there may be a similar problem when checking for modified files, } but as the test is currently [...very complex...] } I don't feel like investigating more closely at the moment. Here's that substitution broke down into its components: local ents stats ents="$(<"$realdir"CVS/Entries)" ents=(${(@f)ents}) ents=(${(@M)ents:#/*}) ents=(${(@)ents#/}) ents=(${(@)ents/${slash}[^${slash}]#${slash}//}) ents=(${(@)ents%/[^/]#/[^/]#}) stats="$(LC_ALL=C builtin stat -gn +mtime -F '%a %b %e %T %Y' ${realdir}*(D) 2>/dev/null)" stats=(${(f)stats}) stats=(${stats##*/}) stats=(${stats/ //}) stats=(${stats//(#m)[][*?()<|^~#\\]/\\$MATCH}) stats=${(j:|:)stats} ents=(${(@)ents:#${~stats}}) ents=(${(@)ents%%/*}) [[ -n ${pat::="${(@j:|:)ents//(#m)[][*?()<|^~#\\]/\\$MATCH}"} ]] I don't immediately see what to do to simplify it or to be sure it quotes spaces in filenames correctly, though.