zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Subject: Re: "pws non-canonical hack" problems
Date: Mon, 25 Aug 2008 17:47:51 +0100	[thread overview]
Message-ID: <20080825174751.38323d18@pws-pc> (raw)
In-Reply-To: <080823075551.ZM5496@torch.brasslantern.com>

On Sat, 23 Aug 2008 07:55:49 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Aug 23, 11:24am, Alexey I. Froloff wrote:
> }
> } _path_files:
> } 377       # pws non-canonical hack which seems to work so far...
> } 378       # if we didn't match by globbing, check that there is
> } 379       # something to match by explicit name.  This is for
> } 380       # `clever' filing systems where names pop into existence
> } 381       # when referenced.
> } 382       if (( ! $#tmp1 )); then
> } 383           for tmp3 in "$tmp2[@]"; do
> } 384               if [[ -n $tmp3 && $tmp3 != */ ]]; then
> } 385                   tmp3+=/
> } 386               fi
> } 387               if [[ -e "$tmp3${(Q)PREFIX}${(Q)SUFFIX}" ]] then
> } 388                   tmp1+=("$tmp3${(Q)PREFIX}${(Q)SUFFIX}")
> } 389               fi
> } 390           done
> } 391       fi
> } 
> } When I completing directory, sometimes file is being completed.
> 
> The problem is that this code should not unconditionally append something
> to tmp1.  It has to test again (probably by using some variant of the call
> to compfiles that appears 20 or so lines above) that some new file really
> was created that matches the qualifiers in the generated glob pattern.

Er, isn't that what the -e test does?  What I think you mean is there
may be options to compfiles that don't get taken account of at this point.

Unfortunately, the file completion code was never very intelligible and
there are way too many cases.  If anyone can come up with a way of
limiting this test in the right way, great.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  reply	other threads:[~2008-08-25 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-23  7:24 Alexey I. Froloff
2008-08-23 14:55 ` Bart Schaefer
2008-08-25 16:47   ` Peter Stephenson [this message]
2008-08-26  1:19     ` Bart Schaefer
2008-09-01 17:14       ` Peter Stephenson

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=20080825174751.38323d18@pws-pc \
    --to=p.w.stephenson@ntlworld.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).