zsh-users
 help / color / mirror / code / Atom feed
From: "Jesper Nygårds" <jesper.nygards@gmail.com>
To: zsh-users@zsh.org
Subject: Explicit colons in zstyle
Date: Thu, 29 Mar 2012 20:59:25 +0200	[thread overview]
Message-ID: <CABZhJg9hy-gZU-k+GAPMJmQq2hiM7TYBn+pUkoSStx_iJow_mQ@mail.gmail.com> (raw)

Is there something special about how a style should be expressed when
it relates to "completer"?. I started noticing in some examples from
The Book, that completer is not treated exactly the same as other
styles.

Here's the well know most-recent-file example:

zstyle ':completion:most-recent-file::::' completer _menu _files _match
zstyle ':completion:most-recent-file:*' file-sort modification
zstyle ':completion:most-recent-file:*' hidden all
zstyle ':completion:most-recent-file:*' file-patterns '*(.):normal\ files'

Is there a reason why the first line contains so many colons? To me it
looks like it would be equivalent to the other lines, containing an
asterisk.

The same pattern in the next example:

zstyle ':completion:history-complete::::' completer _history
zstyle ':completion:history-complete:*' remove-all-dups true
zstyle ':completion:history-complete:*' sort true


Then, I saw this, also from The Book:

zstyle ':completion::*:::' completer _complete _prefix

The text says that the asterisk is necessary to make the _prefix
completer match, but I can't understand why the simpler "zstyle
':completion:*' completer _complete _prefix" wouldn't work.

I'm obviously missing something. Perhaps someone can enlighten me?


             reply	other threads:[~2012-03-29 19:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 18:59 Jesper Nygårds [this message]
2012-03-30 19:41 ` Peter Stephenson
2012-03-31 13:35   ` Jesper Nygårds

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=CABZhJg9hy-gZU-k+GAPMJmQq2hiM7TYBn+pUkoSStx_iJow_mQ@mail.gmail.com \
    --to=jesper.nygards@gmail.com \
    --cc=zsh-users@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).