zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: file-sort in _path_files
@ 2004-04-27 15:57 Bart Schaefer
  2004-04-27 16:07 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2004-04-27 15:57 UTC (permalink / raw)
  To: zsh-workers

This seems to fix the bug I just reported; there may be a more elegant
way -- such as, simply inserting a new (#q...) in the right place -- but
I wasn't sure what ramifications that might have for the "copy qualifiers
from the line" section that creates $tmp3 (just above the patched lines).
More patching may still be needed for that portion.

Index: Completion/Unix/Type/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.23
diff -u -r1.23 _path_files
--- Completion/Unix/Type/_path_files	8 May 2003 10:30:49 -0000	1.23
+++ Completion/Unix/Type/_path_files	27 Apr 2004 15:21:47 -0000
@@ -120,10 +120,10 @@
 
     tmp2=()
     for tmp1 in "$pats[@]"; do
-      if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then
-        tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[2][3,-1]}" )
-      elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then
-        tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[2][2,-1]}" )
+      if [[ "$tmp1" = (#b)(*[^\$])\(\((\#q)#(([^\|~])##\)\)) ]]; then
+        tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[3]}" )
+      elif [[ "$tmp1" = (#b)(*[^\$])\((\#q)#(([^\|~])##\)) ]]; then
+        tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[3]}" )
       else
         tmp2=( "$tmp2[@]" "${tmp1}(${sort})" )
       fi



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: file-sort in _path_files
  2004-04-27 15:57 PATCH: file-sort in _path_files Bart Schaefer
@ 2004-04-27 16:07 ` Bart Schaefer
  2004-04-27 16:59   ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2004-04-27 16:07 UTC (permalink / raw)
  To: zsh-workers

On Tue, 27 Apr 2004, Bart Schaefer wrote:

> This seems to fix the bug I just reported; there may be a more elegant
> way -- such as, simply inserting a new (#q...) in the right place -- but
> I wasn't sure what ramifications that might have for the "copy qualifiers
> from the line" section that creates $tmp3 (just above the patched lines).

Sorry, that should say "just below the patched lines" -- it's another bit
almost exactly like the bit that inserts ${sort}.

I just saw PWS's patch, and it's probably better than mine -- but it also
may need to be applied to the similar ${tmp3} section.

PWS asked:
> Do you have a matcher style set which assumes `-' is an anchor
> character?

The matcher styles were the first ones I deleted when tracking down what
style caused the problem, and none of those made any difference at all.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: file-sort in _path_files
  2004-04-27 16:07 ` Bart Schaefer
@ 2004-04-27 16:59   ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2004-04-27 16:59 UTC (permalink / raw)
  To: zsh-workers

Bart Schaefer wrote:
> I just saw PWS's patch, and it's probably better than mine -- but it also
> may need to be applied to the similar ${tmp3} section.

OK, I've committed it with that addition.  Hmm, those chunks look like
they could with what we software engineers call a `subroutine'...

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-27 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 15:57 PATCH: file-sort in _path_files Bart Schaefer
2004-04-27 16:07 ` Bart Schaefer
2004-04-27 16:59   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).