zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: _file in _zmodload: why option -/ ?
Date: Mon, 28 Oct 2013 01:10:26 +0900	[thread overview]
Message-ID: <2CCD8761-51AF-4DAE-82F0-3F57BA9FD01F@kba.biglobe.ne.jp> (raw)
In-Reply-To: <131026143721.ZM9022@torch.brasslantern.com>

2013/10/27 06:37、Bart Schaefer <schaefer@brasslantern.com> wrote:
> I'm not entirely sure, but its effect on _files is to cause symlinks
> that point to directories to be followed, so I presume it's to force
> symlinks in directories that contain modules to be offered alongside
> the modules that happen to be in the same directory.

In _files, there are lines of code (lines 66-69 and 79-82) which seem to be
commented out in 2001; see seq:15995
http://www.zsh.org/mla/workers/2001/msg02656.html
With this old code, if -/ is omitted, then both directories and symlinks to
directories would not be offered.

With the present code, however, I *guess* -/ can be omitted.
But there may be styles and options which could interfere with the option -/
and it may be safer to leave the option as is....

So I tried to modify my zstyle as, for example,

zstyle -e ':completion::*' file-patterns \
  '[[ $funcstack[1] = _files && $type =~ "^[^g]*/[^g]*$" ]] && reply=("*(-/)")'

which seems to solve my problem.

  reply	other threads:[~2013-10-27 16:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-26  9:25 Jun T.
2013-10-26 21:37 ` Bart Schaefer
2013-10-27 16:10   ` Jun T. [this message]
2013-10-27 22:54     ` 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=2CCD8761-51AF-4DAE-82F0-3F57BA9FD01F@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /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).