zsh-users
 help / color / mirror / code / Atom feed
From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: zsh-users@zsh.org
Subject: completion configuration
Date: Mon, 18 Jun 2018 23:40:41 +0200	[thread overview]
Message-ID: <CAP+y1xC=AvW-Qhd+ntfK6b8jpbm9P6ya-RU=baNfoTwZcSOD3w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

Hello everybody, I must confess I don't have a clue when it comes to
configure completion styles. I made various attempts but for now, I don't
seem to grasp the syntax of ztyle.
I have in my .zshrc (blindly copied years ago from who knows where):

zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'

that, as I understand, enables approximate match for all the commands when
trying completion for a number of errors proportional to the number of
characters of the word to be completed etc.

I would like to disable this completion for a command that has a completer
function I wrote that pass to compadd various values, since these are so
many that the completion is very slow to show matches. So I thought that
maybe disabling the approximate match for this command would speed things
up.

My best bet doing this was:
zstyle -e ':completion:*:approximate:my_command' max-errors 0

but this does not work. I tried also various variants to no success.
Can someone shed some light on this please?

-- 
Pier Paolo Grassi
email: pierpaolog@gmail.com
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO

             reply	other threads:[~2018-06-18 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 21:40 Pier Paolo Grassi [this message]
2018-06-18 22:12 ` Arturo Escaip
2018-06-19  7:32   ` Pier Paolo Grassi

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='CAP+y1xC=AvW-Qhd+ntfK6b8jpbm9P6ya-RU=baNfoTwZcSOD3w@mail.gmail.com' \
    --to=pierpaolog@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).