From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21718 invoked by alias); 19 Jun 2018 07:33:27 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23499 Received: (qmail 4826 invoked by uid 1010); 19 Jun 2018 07:33:27 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.217.172):SA:0(-1.9/5.0):. Processed in 2.380768 secs); 19 Jun 2018 07:33:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: pierpaolog@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UXsHRcj9j7zIhix1SimT2T2gTrp7pSoV1oJPx951xKY=; b=gtxyFrMdmDm3NarJOGmj+q+F7h7p/BkiLzNNVzzWekxyBtphuUye3pnoSqzTPyHNZQ aiFcob1ZawI8e4JS5bz++Bxp1La8Fu5lOGbiJwrCZJdZXvp/fjaxQ+89bttr1nAvn/q6 FgsLoKmqjmGeo3MdSLyQBGYSaSGQ9ZqPD6jMl9JzU7sBRt3bVL8298jiR2e0tHUifEMe kIlJyLUtelw8Cw+xkUeEQFmvN6EAk8W2sBFqzYWxLwa82J4ZJVJ9/ceyrMgdFuJsuJYT UeKC0x9Ia6HfilZyeAxKrBheM//+jUruvEu0+ERGozA+HmZB1Crllw5uQa8ATpyeL5xG kfhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UXsHRcj9j7zIhix1SimT2T2gTrp7pSoV1oJPx951xKY=; b=JB2T1hZg2IhUtYc8Dvmg2shZ30fmsAsc98YqsEKPI44me+/c689ccKJBE9v+WaT3/3 hxxr3e7y9jFbsWLcPIkVSAJ3U5ehENKNwQYmVXM0or72Wipm/prnkTmLKvQqz8gTqRoe wGrZp0bwP7uzMAY0s3A8vVkUfud5kbUb5sI8O3Cc09TLVqCMfQApYdlTQtooNFP87Ble lZCFfCQWEYq1bj9TobB93wEZUZMy8l90rp4L/lDyLsYCziBScaGre31dwRVg16gudW5A kkSj+SGj7oGr1CjCQV0zuXpj6JpO+mK4CA8KL1i1Vg84+YWVxbjxGLcxcfzUc4Q3vV/7 rbeg== X-Gm-Message-State: APt69E2mV4n7IelqNbCX4j1gMH2yNaNqROuWArgoeEejZFWzFHbAijQd FUu8qeQ87yF0Jb4RanJ7082cmabmchxq1xXzSMo= X-Google-Smtp-Source: ADUXVKKNFfDx7VcMQh+ir87agkDWh/P5fbaMOBP0BmxQuEHi6zf0bfX4QcE0k4UE7aZA4JpP8jA0dEz+mRrzNvxLROo= X-Received: by 2002:ab0:2508:: with SMTP id j8-v6mr9738309uan.10.1529393601646; Tue, 19 Jun 2018 00:33:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Tue, 19 Jun 2018 09:32:46 +0200 Message-ID: Subject: Re: completion configuration To: arturoescaip@gmail.com Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="000000000000591a92056ef9b20e" --000000000000591a92056ef9b20e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable hello Arturo, thanks for your suggestions, I will try and let you know best Il giorno mar 19 giu 2018 alle ore 00:12 Arturo Escaip < arturoescaip@gmail.com> ha scritto: > Hey Pier, > > I=E2=80=99m not very knowledgeable about styles, but I think you may have= the > context pattern wrong. You can use C-x h to see the context at any point > when writing a command and you can use that output as a guide when buildi= ng > a pattern for a style. For example, I have a command that I wrote that is > called pb and this is the output I get when I do C-x h right after typing > pb: > > ~% pb > tags in context :completion::complete:pb:: > argument-1 options (_arguments _pb (eval)) > > The full context is :completion::complete:pb::, I think in your call to > zstyle you are missing the last two colons, so what if you try: > > zstyle ':completion:*:approximate:my_command:*' max-errors 0 > > You don=E2=80=99t need the -e option because you don=E2=80=99t need 0 to = be evaluated. > =E2=80=8B > > On Mon, Jun 18, 2018 at 2:41 PM Pier Paolo Grassi > wrote: > >> 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=3D( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )' >> >> that, as I understand, enables approximate match for all the commands wh= en >> 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 complet= er >> 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 thing= s >> 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 >> > --=20 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 --000000000000591a92056ef9b20e--