zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Subject: Re: need help with enhancement to prevent completion from stat'ing automounts
Date: Thu, 10 Sep 2009 10:30:12 +0100	[thread overview]
Message-ID: <20090910103012.64677425@news01> (raw)
In-Reply-To: <m3tyzddn12.fsf@klanderman.net>

On Tue, 08 Sep 2009 19:39:21 -0400
Greg Klanderman <gak@klanderman.net> wrote:
> I'm quite certain that passing the 'fake' files and directories to
> compadd would solve the problem here.  I will acknowledge that IMO the
> most correct change would be to introduce a 'fake-dirs' zstyle and fix
> all of _path_files and compfiles to maintain these fake completions
> separately so they can be given to compadd with the correct suffix
> rather than '-f' when the time comes.
> 
> But I find those two pieces of code so impenetrable that I'm having
> trouble forcing myself down that path.  And so another idea is to add
> an array parameter, say completion_automount_roots, which I could
> maybe set to (/net /home) and have bound to a C variable, then in the
> ztat() function return 'directory' without stat()ing any files
> directly under those roots.  Not pretty, but I can see exactly what
> needs to be done and it's not too hard.

It's high time we fixed this properly.  The whole problem with the
completion system is arbitrary bits getting added without understanding the
existing bits, and each time that happens it gets worse.

Both Bart and I have been bamboozled by the networks of special cases and
clever features in _path_files, but we need to track them down if we want
to make file completion maintainable.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


  reply	other threads:[~2009-09-10  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-05 21:30 Greg Klanderman
2009-09-08  2:14 ` Greg Klanderman
2009-09-08 10:12   ` Peter Stephenson
2009-09-08 23:39     ` Greg Klanderman
2009-09-10  9:30       ` Peter Stephenson [this message]
2009-09-10 14:52         ` Greg Klanderman
2009-11-24 16:07           ` Greg Klanderman

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=20090910103012.64677425@news01 \
    --to=pws@csr.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).