zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Case-insensitive completion
Date: Tue, 16 Sep 2003 15:27:29 +0000	[thread overview]
Message-ID: <1030916152729.ZM30128@candle.brasslantern.com> (raw)
In-Reply-To: <10378.1063706957@gmcs3.local>

[redirected to zsh-workers from zsh-users]

On Sep 16, 12:09pm, Oliver Kiddle wrote:
} Subject: Re: Case-insensitive completion
}
} Bart wrote:
} 
} > - file-patterns are not tried after the first one that has the pattern
} >   '*:...' which is why the (#I) is thrown in on globbed-files, to force
} >   attempting both globbed-files and ci-globbed-files even if the match
} >   pattern substituted by %p is '*'.
} 
} Yuk. Could you see if there was a good reason for that?

The docs have this example:

     To alter the default behaviour of file completion -- offer files
     matching a pattern and directories on the first attempt, then all
     files -- to offer only matching files on the first attempt, then
     directories, and finally all files:

          zstyle ':completion:*' file-patterns \
              '%p:globbed-files' '*(-/):directories' '*:all-files'

     This works even where there is no special pattern: _files matches
     all files using the pattern `*' at the first step and stops when it
     sees this pattern.  Note also it will never try a pattern more
     than once for a single completion attempt.

} If it is just for efficency it should perhaps be removed.

It appears to be done that way to intentionally short-circuit the process
exactly when %p is '*', so that (in the example above) no redundant group
'directories' is created when both files and directories are already in
the globbed-files group.

The correct behavior (which may be very tough to implement) would seem to
be to check the entire list of tags against the matcher style before the
loop begins, and bail at '*' only if there are no tags left with matchers.


       reply	other threads:[~2003-09-16 15:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030914103053.GA827@strindberg.student.uu.se>
     [not found] ` <1030914185817.ZM27558@candle.brasslantern.com>
     [not found]   ` <10378.1063706957@gmcs3.local>
2003-09-16 15:27     ` Bart Schaefer [this message]
2006-03-01  9:16 case-insensitive completion Karl Chen
2006-03-05  9:44 ` Bart Schaefer
2006-03-05 17:24   ` Peter Stephenson
2006-03-05 20:45     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1030916152729.ZM30128@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).