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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25867 invoked from network); 10 Nov 2021 22:35:01 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Nov 2021 22:35:01 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1636583701; b=SG49xbFD65lkFcoMw4v8guUcvKG4Aqj6/zrWPFVkjv4g4m1w+S3CBd53GpqUFIMOdHFMINUo8k DOxGlWIB69ugrP0yYqWmnXmOObptXMVwTNBpEnsuLsahMXZm1HH10mDkPAEFiehH1tHYS2S008 CX/JYTvfvvUhBAG5dDtEpyPe6ymJef9vG7ZSew6SwYQdKYZiNGWmSB19uXCx5Sv9ZPl3kLwwKp gMndpKRk/5tAN9yi3AaMvx8EkNl1CuulXIR4Etusp9jTWqChfU2WbxlPGW/lzfGuTyF9+X+QQ5 lA0TjOedzdHikBwmS8tBWN0kdkOp6hCwCi8VhevDKIsjrw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1636583701; bh=VsI+3OQqktP93Y4uvdONiEabFaW4aofCfXjWs2H5IKs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=kUJEYAM7cMOFp82HQ7uOm3phEuUQxQtQQ3c0DeYnSDJe8JvkEjo3ravUVlWifAh+y23dw57Udl TqMxbbKhcmQqLfdADn0aoX38kT1ZjAGLwrEp1lHSYORaT+mTs6pTmwLqvCihcbWLIhPW6oYLsK hyhArc5Ym12UAHy+467E8XE7rC5xnaiEbEZgsXGcQhks3oWDlILbFv3c59XhMqIrJ1iOhYaFFy tpmAMF2+IhF5eS+wF743Nx5Pj9LHH6Xja1/IccJdmOTpkxvIv8oE8GbTZT3DA/tDJS3NGO4NqY s3J2bjvuKyoBLsQs8IvshAIdQd5m9JRXSwd4tVm8DJwPNQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=INIg1xJkqrgWxSCaLREuLHfU+dYD4Dms1czz/v0bdaQ=; b=JOR5D6RRPptI3/VA+rUz1h2A7C X0cBPSC9Lo3zz7vdSDMaMr/CY3RuQCbyutQVZWonScM77+sCaJ9mJQVUJlfFc80fr2+yhEANAp0ik UeJQfyV1xaDhbN65Pl/PB/ljXdwoJFOfFc7xQ4KBJE/g2vIvf2hi8xrX1ifnOvlQ3tS/0wXHpEMan FfUzmGoAc2Ht8zwO9ZPewvNnAa8ApiLAl3cbHeO+AkXDLJKbfo0yBJfTejMlZF18wzt9FO+24lT8D xY/DSwzOtsrdpknl8Q9cwFDIFgZG85Z62GdmX3fqlTsjKgn/5xa6BeXJK/IFpBO9KbiydWIFo36KQ 6BqNSpYw==; Received: from authenticated user by zero.zsh.org with local id 1mkwBJ-000Ky0-7K; Wed, 10 Nov 2021 22:35:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f180.google.com ([209.85.219.180]:40580) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mkwB3-000KgH-HD; Wed, 10 Nov 2021 22:34:46 +0000 Received: by mail-yb1-f180.google.com with SMTP id 131so10212092ybc.7 for ; Wed, 10 Nov 2021 14:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=INIg1xJkqrgWxSCaLREuLHfU+dYD4Dms1czz/v0bdaQ=; b=UDx5IRUOuF9cjCtjscVYSAy+RIhtUiNNPSGj22RApH4CwgE7hsziB3wBNMKPm8ATLp 3G2TSV2nTgwo4WUFDGxi0R0yJhJugtlCGOgjm5YAAl9p1yLnn2M7FRkpQ4jkGR5iiNLz Fo1f9O9OKPp6I0tWduev/Wqt8hKVKYztIDZXUP7W5tOi8D4q3OPF/N12p6OiUbiRjQjw xLC4txZZLGq26Qmt9TdHYRxRN49owTPeWeTIJNOO9f523T+uMX4f8WZVW9tnMyzAnrUO WgDPJ/VCARNGKy+GOMAyXJxjEEDZC8VISpVRzqUaZ2yVPw1LR07LpW00TM1Z+8RjrKmU weDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=INIg1xJkqrgWxSCaLREuLHfU+dYD4Dms1czz/v0bdaQ=; b=3jtJfvVbBvHIZAO4hV7ekZIHFBYu5k3hUqraeiSNkuhMnnxAz2c6mZcGHK9pYnRkCY 89lgZX00ugoBZ8jWHl/Imzyp03ZoICnntjbf+7USXkCsKd7GnobNhFq6t1XLlmk8NSqo D//CH6CIvcbYI03KtqqAHBnRfiLN46cFcAbhniN8/XKkB7j3nhY3IDCc+R+70JWkS0sj JsIA4gYIcvpY4K6hzSHF6q8QTBAfcuPMlevHnrfXTMBoGowZ3O7jewoByeGBg1NsdGE7 uM9ZetvVqA3TYkeq055/xZzC7HtNA1A9zvXhUvmvlYAS3VrOTJGAUyTesDWY337jOLXu ihOA== X-Gm-Message-State: AOAM532xH7wdyNcTCSdSP5Y+v+UIdtKZIoq9ZyfE68MjMzm6QXf5d67x t8eqR094RG2Tw1OoEdyidgFjnBxtHHE50gxHphcPjA== X-Google-Smtp-Source: ABdhPJyb/2htqo/xH9v8GxIdn2aZXz7cSeP27TSh76fe1DbkxFxot8M6gyl/EJ2A1c6MRyYU87HmbrWEypzHlV/zfSo= X-Received: by 2002:a25:460b:: with SMTP id t11mr2817433yba.249.1636583684315; Wed, 10 Nov 2021 14:34:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Wed, 10 Nov 2021 14:34:33 -0800 Message-ID: Subject: Re: [BUG] Any type of file in command position gets misleadingly completed as 'executable file' To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 49560 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Wed, Nov 10, 2021 at 2:01 PM Marlon Richert wrote: > > The problem is in _files and it is two-fold: > * _files always adds '*:all-files', which ignores the pattern passed > with the -g flag. There's a comment: # People prefer to have directories shown on first try as default. # Even if the calling function didn't use -/. In fact the actual assumption is that most people prefer to have SOMETHING completed rather than nothing, unless they've specifically requested otherwise. You can change this behavior by zstyle ":completion:*" file-patterns ... (although I'm not sure why that overrides list-dirs-first). There's even an explicit paragraph and example in the documentation explaining how to do this. > * Even though _files passes its file pattern tags to _next_label, if > _files was passed a tag and/or description, it _always_ prefers these > over the ones returned by _next_label's call to _description. Someone else will have to comment on that. > * The 'globbed-files' tag should be renamed to just 'files' and have a > default description of 'file'. That would actually break my zstyle setting for file-patterns. > (As an aside, the docs speak of an > 'other-files' tag used when zstyle list-directories-first is set, but > this is never actually offered. Let's remove that, too.) It appears "other-files" was (inadvertently?) removed by workers/36165 (Oliver, back in 2015).