zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH and Re: Styles usage problem
Date: Tue, 4 Jan 2000 09:23:19 +0100 (MET)	[thread overview]
Message-ID: <200001040823.JAA22101@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Thu, 23 Dec 1999 22:20:33 +0000


Peter Stephenson wrote:

> "Andrej Borsenkow" wrote:
> > bor@itsrm2% zstyle -L
> > zstyle ':completion:*' completer _complete
> > zstyle ':completion*' completer _oldlist _complete _correct _approximate _mat
> > ch
> > 
> > In other words, I told zsh to use specific completers in every case - but Zsh
> > installed it's own, "more specific" style - and simply ingnored my settings.
> 
> I fell foul of this, too.  Maybe this is a case for use of the default tag
> --- after all, there's nothing to stop you defining completers with the
> pattern '*', and that should still take precedence over the supplied
> default.  Same probably applies to just about any zstyle supplied as a
> default.

Ahem, yes, even I stumbled over this. I now use `zstyle -d' before
setting my styles...

I don't see how the default tag would (really) help here. Is it enough 
if we explicitly mention in the compsys manual that compinit sets up
some default styles and that users might want to use `zstyle -d' plus
the output of `zstyle -L' as their starting point when modifying
styles?


The patch just makes sure that max-errors is set for approximation,
too, not only for correction.

Bye
 Sven

diff -u -r oldcompletion/Core/compinit Completion/Core/compinit
--- oldcompletion/Core/compinit	Fri Dec 17 21:39:20 1999
+++ Completion/Core/compinit	Mon Jan  3 19:45:30 2000
@@ -472,13 +472,13 @@
 
 # Default styles. This should be executed conditionally somehow.
 
-zstyle ':completion:*'        verbose       'yes'
-zstyle ':completion:*'        prefix-needed 'yes'
-zstyle ':completion:*'        prefix-hidden 'no'
-zstyle ':completion:correct'  max-errors    '2' numeric
-zstyle ':completion:correct'  prompt        'correct to:'
-zstyle ':completion:*'        completer     '_complete'
-zstyle ':completion*:default' list-colors   "${(s.:.)ZLS_COLORS:-${ZLS_COLOURS:-no=0:fi=0:di=0:ln=0:pi=0:so=0:bd=0:cd=0:ex=0}}"
+zstyle ':completion:*'                      verbose       'yes'
+zstyle ':completion:*'                      prefix-needed 'yes'
+zstyle ':completion:*'                      prefix-hidden 'no'
+zstyle ':completion:(correct|approximate):' max-errors    '2' numeric
+zstyle ':completion:correct:'               prompt        'correct to:'
+zstyle ':completion:*'                      completer     '_complete'
+zstyle ':completion*:default'               list-colors   "${(s.:.)ZLS_COLORS:-${ZLS_COLOURS:-no=0:fi=0:di=0:ln=0:pi=0:so=0:bd=0:cd=0:ex=0}}"
 (( $+SELECTMIN )) && zstyle ':completion*:default' menu "select=$SELECTMIN"
 zstyle ':completion:*' tag-order 'arguments values' options \
                                  globbed-files directories all-files

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


                 reply	other threads:[~2000-01-04  8:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200001040823.JAA22101@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.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).