From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18861 invoked from network); 7 Jul 2020 04:52:05 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 7 Jul 2020 04:52:05 -0000 Received: (qmail 10711 invoked by alias); 7 Jul 2020 04:51:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: Sender: zsh-workers@zsh.org X-Seq: 46197 Received: (qmail 9391 invoked by uid 1010); 7 Jul 2020 04:51:55 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f50.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25863. spamassassin: 3.4.4. Clear:RC:0(209.85.210.50):SA:0(-1.9/5.0):. Processed in 2.768417 secs); 07 Jul 2020 04:51:55 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.210.50 as permitted sender) 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; bh=4fgaE2YSCMJprpHSR0NzZjV6nXRO1chNnXS6yiJSD8c=; b=nuFRZvQYmvlVnnIkQrhlI852r5+p5w8upYKTLbeF4i5ioK4ilfB+lFWbqSIZLTCxHN IJ/ZqLgwlX8CCqAtDuwGuICUzg6C6XcQoNTpJc9asHAGuLUD1kkvIIjk1Pp0jBjcFSeA KhfC67oChIU3VnPHajHUHBL4VLkj6bfo8EfDHkgCt6Wwzcwg6Wrwdbe95/0MfM2nVjUN U9m5sxVO12byfo4xxymsTj0xsOKHO1FzFHvOT0DDUBEE1v4xQENxtbMOD+371VXTPhIe LoaNz2Hw57G+T4R8LNXbzbDd3qABcIwsu027YqLJwMEqFOly3MfYLWMeZ0cwxXVXj6Bm P5zQ== X-Gm-Message-State: AOAM531ed502dC3xs2Sh4dYf2DrZfGhBV8Ua92j1iPaflhzAp/wQFnrf kboo67z9G9p6OYx6luD+9gnVVMPb/jwVlTK+POeBBBVQZL8= X-Google-Smtp-Source: ABdhPJxuAG5q3eccIo3ch0OMkxGbgCqqXOz6Z3H1onJULm6mklVEdRImsgP5D6dGbhbNsBcTPa19aE6IMiET1eYT8Ys= X-Received: by 2002:a9d:6047:: with SMTP id v7mr29017652otj.161.1594097478227; Mon, 06 Jul 2020 21:51:18 -0700 (PDT) MIME-Version: 1.0 References: <20200705174642.b2frcpxiuscbj27r@aegis.localdomain> <20200705192433.mdqsbcrhhasqvotf@aegis.localdomain> In-Reply-To: <20200705192433.mdqsbcrhhasqvotf@aegis.localdomain> From: Bart Schaefer Date: Mon, 6 Jul 2020 21:51:06 -0700 Message-ID: Subject: Re: [Bug] Doubled completions with suffix aliases and grouping To: Bart Schaefer , "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" On Sun, Jul 5, 2020 at 12:24 PM Guido Cella wrote: > > I think that the bug is adding files that aren't executable to the > "executable file" grouping. Aye, well, that's not exactly a bug either. The position taken when developing the completion code was that it's always better to offer something that the user might possibly mean rather than to offer nothing; i.e., err on the side of too much information rather than too little. Because _command_names uses _alternative, the two branches (executables and suffix-aliases) don't "know" that the other might produce overlapping matches, so each generates its result independently, and when executables finds nothing, it falls back to all files. There are two elements of your specific example that could potentially be considered bugs. The first is that there's no file-patterns zstyle for the "executables" tag; the closest you can get is to set one for the :completion:complete:-command-:: context. The second is that this doesn't work: zstyle :completion::complete:-command-::executables ignored-patterns '*(^*)' Instead you have to do this: zstyle :completion::complete:-command-::executables ignored-patterns '*(#q^*)' However, I think you'll find if you do that latter, you'll get what you want.