zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: _file in _zmodload: why option -/ ?
Date: Sun, 27 Oct 2013 15:54:19 -0700	[thread overview]
Message-ID: <131027155419.ZM8283@torch.brasslantern.com> (raw)
In-Reply-To: <2CCD8761-51AF-4DAE-82F0-3F57BA9FD01F@kba.biglobe.ne.jp>

On Oct 28,  1:10am, Jun T. wrote:
} Subject: Re: _file in _zmodload: why option -/ ?
}
} 2013/10/27 06:370x3001Bart 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.

Right.  On closer inspection, the -/ is needed only when one of the styles
file-patterns or list-dirs-first is used; -/ is redundant in the default
case because that test is commented out.

} 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.

Of course, you only have this problem because you disagree with the
conclusion reached in workers/15995.  There probably ought to be yet
another zstyle that controls the default use of directories.


      reply	other threads:[~2013-10-27 22:54 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.
2013-10-27 22:54     ` Bart Schaefer [this message]

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=131027155419.ZM8283@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).