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 25302 invoked from network); 3 Jan 2022 15:24:52 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Jan 2022 15:24:52 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1641223492; b=D5xeBQhwJ3KmuJQfrJu+jbd+YQL3k2va7mdy4rRP2/Xub7e+e/8vnCrdKm72EA6OKBkvUE1Y2M umwNcREX+0PWluBUilW9phwWExSj94rtXgtpq60mRzQDcKmVeq0nmkbqeU+BjhMMiX6Psu/Zo1 wWDX4aivQR31Pb8PEyNLzh2qglFJQJIY1YI1FzkcuWC1TIu2u3Wwa9iFYPTGDnCPyJpRXb5vDh Mp+BlNpQ5OY5urnEQOQSpUVQBIZdiW3P6qBcc0qO3iSsYJgBXViE1ScuMpnvxNHWkzPhS1/pZ/ bFBZowoYWj5YPItC7/qkfxWrKB95zU2NqSF1HAZTVWNJQA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (pepin.polanet.pl) smtp.remote-ip=193.34.52.2; dmarc=none header.from=polanet.pl; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1641223492; bh=A/V3Oo1xtnKqJav9dII0GdQcE9vNXoyG0oxLOldqc/o=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: Resent-To:Resent-Message-ID:Resent-Date:Resent-From:DKIM-Signature; b=PXR6wVCyyfzh3kfWwx7KB0w0rhomZY7J3r7N2nzOF7L4Ml9zNXWe1JApZQoTiX4A3eBe7OpUvS 4q/Jkrk69K4Z6D/DRVKtr3iFXt8q7da/t5z5qmanll6mpOk59Lmu5j+lAceQmX/6ttAG/33ewT uogPLD6FdeFOrGedk6WFXdx0Nm0MgU14C6RkCXI/o14e/vgR0MTvaNVDc0Bb0cRHRQdvwfjX3p 5sBi+JbgZXwSohxmbydEetfu37nABvt9+VlMi5YP+9oVzmRF413u1GEvK/YBZSifLg4oge7uRQ zlE3nrNjbz3xSSWT6q3w/EvhFBjT3Wbjxl8L50mQNjQlKA==; 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:MIME-Version:Message-ID: Subject:To:From:Date:Resent-To:Resent-Message-ID:Resent-Date:Resent-From: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Sender:Resent-Cc:In-Reply-To:References; bh=TDlB1r33qDc2Y5jhWOYtwdzi4E/u8SbwuRGIpbnkeko=; b=HgNtc2gPsIC076PpbMKMkSneMp UwCGHuxh9l9dYGGBGCSqo3OLdgcFlSP7IB6S3dW8haR5HMjwa/VkEllApilpADOKFsAJAAhXzsuGB aOx1UAdAyYMEf8cFxnzLrw83uey4tC5WdC5cv3dqBLT1TaKY9xi1UJ9qZgvBug5dtL/+La2qg/R1F ydLZ8vxHhRUDSzcdNwhFJ/lNXbWa2N4J4Sq3bqfZX8nRIxoZmBew4mIXdJMgXpodeIHXLV9vDJRhI c1kNI3/i1OjoDXcSoH1d3ngjJ3MkgeOtAtyo8zVdmiLDNC4fYu/ehzcK6LhL8rZIr0HsQoEiyEfG/ luz5zWMg==; Received: from authenticated user by zero.zsh.org with local id 1n4PCd-000K4T-9k; Mon, 03 Jan 2022 15:24:51 +0000 Authentication-Results: zsh.org; iprev=pass (pepin.polanet.pl) smtp.remote-ip=193.34.52.2; dmarc=none header.from=polanet.pl; arc=none Received: from pepin.polanet.pl ([193.34.52.2]:52198) by zero.zsh.org with esmtps (TLS1:DHE-RSA-AES256-SHA:256) id 1n4PBf-000JLz-Tn; Mon, 03 Jan 2022 15:23:52 +0000 Resent-From: Tomasz Pala Resent-Date: Mon, 3 Jan 2022 16:23:50 +0100 Resent-Message-ID: <20220103152350.GA7318@polanet.pl> Resent-To: zsh-users@zsh.org Date: Mon, 3 Jan 2022 13:39:03 +0100 From: Tomasz Pala To: zsh-users@sunsite.dk Subject: _complete: insert unambiguous when globbing Message-ID: <20220103123903.GA20434@polanet.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Seq: 27447 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Hello, I'm struggling with something which felt basic, yet I cannot find a valid solution (in any combination of remaining styles)... mkdir empty cd empty touch 20{a,b,c,d}.x ls 2[tab] ==> 20 this is expected ls 2*[tab] !=> 20 how to make this to be expanded first to "20", and then the regular rules to proceed (either menu complete I always use, or _expand)? More advanced example: ls 2*x[tab] ?=> 20[completions]x And the most advanced: ls 2*[tab] ?=> 20*.x with the cursor placed after "*" In the most advanced form, the _completion expands "2*", finds out there is unambiguous "20" prefix and ".x" suffix and puts them into ZLE before performing completion (in my case, menu). In other words, I want the globbing _complete to behave like non-globbing one. While the initial case is pointless (simply don't put the "*" at the end), I'd like to use it when looking for specific file types. I often look for logs in 2021.*.xz form and when there is too many matches I want to narrow them down, but I could simply type 2*z[tab] to have the same effect. best regards, -- Tomasz Pala