From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24870 invoked by alias); 10 Jun 2018 01:15:13 -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: 23460 Received: (qmail 5047 invoked by uid 1010); 10 Jun 2018 01:15:13 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr0-f174.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.128.174):SA:0(-1.9/5.0):. Processed in 1.230737 secs); 10 Jun 2018 01:15:13 -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: nhwiles@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=k8t7PPKX1kndPK4C0CfoMAeLPM3EuHO5TfkPrPFstdY=; b=Egz1OPxKIzbAVB1YmHxgXLXHyGRGgjFi75UEy92A4YHjprXKv9f3vhkPuAvNqCC1ZX PMEJQmPbZ0ng6flyK6akw469qqw47ZdBypptxEz1UNzh+3HTWPDZvmuM6P/dqMBo3dxm 7XsxM6vtyeQ5x04KBAE20/1rawEG9XHVyUOStQvdvudzC/1LMsFC2Db1IhVb1RNu7fdc hg6rVlGNTdd78zu+xjoBiucQNyxAcwyheXd77C9gnNSqQg9FDJhg/mZXkfcwKxidQI3F nGsD9WzNah8cnxAg5qEeIQOVJclBfjFBm0ETIVfAObSBR8IshjCy4gkvg8Sh888jtGsL A3KA== 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=k8t7PPKX1kndPK4C0CfoMAeLPM3EuHO5TfkPrPFstdY=; b=kwPkAYL4+N+rSe7dszGx1f5hGH2q0UVG44U0UFsFSbIEH+ZO8/T9TS73qc0wB3IlkV pMRFa6mZ7IvpFBTT0J61LfSUWxYQdrJU2+twT4vRCSuPVsH7PpfKR4soE3iMzIfwUTBf bk7krvpgpENvOuc3pxvr4EXBOKL14DwBB8HQrbbu5A1zwHn0ifbKXLLWrpFuURhKs4Bi IkLvdUaSqfhiUvtkELa+YzqfMCVEZjwu7wvpZUVZdksrfbpbLHneAcGgDivURECaYKkK UgM67st6Hx9jHkOc4pRSNwtWuzccyGexgLnLkKyBskTo4B/gUqLvMYvmDk4n+zTHhW4Q xnvw== X-Gm-Message-State: APt69E3OoZFN9zdF9T67se7aD7Q+vXhpi/Eageo3rMx4KEV+K1crQ/D4 sjRpzZy+23cWQ/zEsru8IyuZAU8ferYXZ2yNY2E= X-Google-Smtp-Source: ADUXVKK/CJUAsPVGZ7mxmIw7U2tTmfAnTy7cdr60t5tGURW2nW6A/Bod7rgttx9acjAcanvJ1yrh6k7MXs30+tzjfjM= X-Received: by 2002:adf:be09:: with SMTP id n9-v6mr9538614wrh.267.1528593307769; Sat, 09 Jun 2018 18:15:07 -0700 (PDT) MIME-Version: 1.0 References: <1528483095.1959306.1401324560.4120FDF5@webmail.messagingengine.com> In-Reply-To: <1528483095.1959306.1401324560.4120FDF5@webmail.messagingengine.com> From: Nicholas Wiles Date: Sat, 9 Jun 2018 18:14:56 -0700 Message-ID: Subject: Re: Question about matching completions with descriptions To: Daniel Shahaf Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="0000000000001da0e1056e3f5d8e" --0000000000001da0e1056e3f5d8e Content-Type: text/plain; charset="UTF-8" It looks like I need to match on the description prior to calling _describe. Using -U and -V together achieved what I was trying to do. The kicker was also adding compstate[insert]="automenu" to prevent common prefix insertion which when you are matching within descriptions the common prefix could be empty! Thanks! On Fri, Jun 8, 2018 at 11:38 AM Daniel Shahaf wrote: > Nicholas Wiles wrote on Fri, 08 Jun 2018 11:13 -0700: > > I have a question about the _describe builtin. > > I am building a binary that provides dynamic completions using a > completion > > function. > > > > Is to possible to provide completions to _describe that will be matched > not > > only on the text of the completion but also on words/text in the > > description? > > I asked this once and the answer was that that wasn't possible. I'd > have linked you to the thread but I looked for it and can't find it :( > > > Or, is it possible to turn off completion matching entirely > > and have zsh present the user with a verbatim set of completions provided > > to compadd or _describe? Thanks in advance! > > Does passing -U (and possibly -V) to compadd do what you need? > --0000000000001da0e1056e3f5d8e--