zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Thorsten Kampe <thorsten@thorstenkampe.de>
Cc: zsh-users@sunsite.dk
Subject: Re: .zshrc sanity check
Date: Mon, 05 Apr 2004 20:59:32 +0200	[thread overview]
Message-ID: <17660.1081191572@trentino.logica.co.uk> (raw)
In-Reply-To: <1gyr312onv6xj$.dlg@thorstenkampe.de>

Thorsten Kampe wrote:
> 
> re-reading the User's guide I have made many changes to my .zshrc and

> zstyle ':completion:*' completer        _expand _complete _match _approximate _ignored
> zstyle ':completion:*:expand:*' glob             true

The _match completer is pretty much superfluous if you already use
_expand to expand any globs. I have _match bound to a separate key.

> zstyle    ':completion:*:approximate:*' insert-unambiguous true

This style is not doing anything. _approximate only looks up that style
after it has added the number of corrections to the context. I use:
  zstyle ':completion::approximate*:*' insert-unambiguous true

> zstyle    ':completion:*:approximate:*' original           false

false is the default value for this style. It would also need an extra
`*' in the style after `approximate'. If you never want _approximate to
add the original string as a match, you need to use:
  zstyle ':completion::approximate:*' tag-order corrections

You might want to think about using more specific contexts for quite a
few of the styles. It is worth thinking through all the style
components whenever you set a style. If you can't remember the
components, add a comment:
  # contexts are :completion:<function>:<completer>:<command>:<arg>:<tag>

I prefer to avoid matching anything (with *) in the function component
with styles that affect completion behaviour.

Another case where you could make the context more specific:

> zstyle ':completion:*:functions' ignored-patterns  '_*'

Anything which restricts matches by literal checks of what has already
been typed against a fixed string tends not to be desirable for the
_correct and _approximate completers. This is because you might
mis-type the literal string. So, for example:
  unfunction -ssh<tab>
won't correct to
  unfunction _ssh

I instead use:
  zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*'

> zstyle ':completion:*:expand:*' subst-globs-only true

You might want to rethink setting that (and your expand styles in
general since it looks like you've just set everything true). Other
styles now do a better job with what I tried to do with
subst-globs-only.

Other than that, it rest comes down to personal preference. I found
myself thinking "yuk" but not "that's insane" on seeing some of your
option settings. A couple of options you may want to try setting are
c_bases and braceccl.

Oliver


  reply	other threads:[~2004-04-05 19:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-03 12:12 Thorsten Kampe
2004-04-05 18:59 ` Oliver Kiddle [this message]
2004-04-05 23:33   ` Thorsten Kampe

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=17660.1081191572@trentino.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=thorsten@thorstenkampe.de \
    --cc=zsh-users@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).