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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19862 invoked from network); 3 Aug 2022 16:51:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2022 16:51:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1659545501; b=S33R9gB50Rm706OcmpC3FSUFPFs7M81Ug4yy6GexMk/A1sG2ZjXGNJavTBP4Z+ktLAhJtjcO1l a8GxWuTJXRe1xhEpnertcmbySkWA+i4KCi6/+XqWBERmgqVAMFsY/DIhm/YS1EcuKVR2zOgnIA ddY4NKhRmq3LW7SaCgdyRXCRJnZSFboL3zMWxXFMY6vhsufvere7Tmyl2SoyydQIL7x1kqeZCK ETxC0QSSnjiir5pBsXdZmOhBBYVNO6F3a/a3loMGzdzzTIcqXghhA0ZW8xH5EhxTiJ3SZcIikp QQH7ZSrD2msrYem+m4qYeyW+xcBmgwCU6aUROuUKCNuo7A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=virgin.net header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=virgin.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1659545501; bh=lgtTH3RDQiqLYZ5Q4qXTXobT2qpMS5HQAQkw7vkpjzw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: In-Reply-To:References:Message-ID:Date:Subject:Cc:To:From:DKIM-Signature: DKIM-Signature; b=RTwsOrYvDGMhZTNsiTW26Gv3scYEb+XxWLm91hrxj4JDmFQHNY8i/5+DgBuqZnhBMf0bmBoqbp m9iaadBUpKOwFv2Q8SIvpNLZ6XrfGcBC06IkiWZqIVsObJKxr6IoSg52lvkXFco/pZFJBiIDlX D3Auid9IevT+GJoGP6koZ+GnhJk2S/62XgjDHhKN9R+B5i8A+BCv8TMQ+XpDcqOEFGUw72H9yC mbweCZoudV5Q5dG5g3YBBJ1S7WhAr6EUr76MSkY6taf8pLj4N6eAMwWfLFSVcjQX57Z25qBgfO Rne+cozdqFej2pXOcHUGG1wrJ73zSrJygM6yQ9UivPx3ag==; 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-Transfer-Encoding: Content-Type:MIME-Version:In-Reply-To:References:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=lgtTH3RDQiqLYZ5Q4qXTXobT2qpMS5HQAQkw7vkpjzw=; b=Q+y0wosKsCZ5Q/UqfCWrQR1TOJ IWKFD0AIlOhKgwLJl/le+I/dsvzDYLoHb3m+oCxt5sLXA3hDTDqJz0JRu9+khWfZzcirNhXQyCD5Y 7/EDAqbvGYFT6AcLVtozUuWun5HegeqIF9qu4qsFSKDRsg5ch2OlWYkv/i3e6pRAfG9t/BJmgxtZm M+BB0UE1Oxs1mv5RdgY3iFAEFXabIXBfuVUO2x1E/yB9KG0dMhjvDANrmXKXXs2IhfadIwOAVSrya 3K6vAVsbFKgQn8tTxlVQGN2EVP5CUE9K01kSkS1meF6n5K4oo/SoTLfM0gJ2FayINJf4y3zIKBOrm QpjeE/Mw==; Received: from authenticated user by zero.zsh.org with local id 1oJHav-0008Vu-EX; Wed, 03 Aug 2022 16:51:41 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96; dkim=pass header.d=virgin.net header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=virgin.net; arc=none Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:56500) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1oJHZz-0007rA-CA; Wed, 03 Aug 2022 16:50:43 +0000 Received: from [212.54.57.106] (helo=csmtp2.tb.ukmail.iss.as9143.net) by smtpq1.tb.ukmail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJHZy-0001rJ-Qs for zsh-users@zsh.org; Wed, 03 Aug 2022 18:50:42 +0200 Received: from vCholatse.rt ([92.4.73.43]) by cmsmtp with ESMTPA id JHZxoNhKq7QLyJHZyoP9Z2; Wed, 03 Aug 2022 18:50:42 +0200 X-SourceIP: 92.4.73.43 X-Authenticated-Sender: thomas.lauer@virgin.net X-Spam: 0 X-Authority: v=2.4 cv=Ft4WQknq c=1 sm=1 tr=0 ts=62eaa762 cx=a_exe a=tt7q7ErRJQISQ5ppuipDJg==:117 a=tt7q7ErRJQISQ5ppuipDJg==:17 a=kj9zAlcOel0A:10 a=biHskzXt2R4A:10 a=8RloEfZUAAAA:8 a=pGLkceISAAAA:8 a=HYshxDoSAAAA:8 a=A79WzG_Hpv-qskrnmncA:9 a=CjuIK1q_8ugA:10 a=HYdssBAQvfgA:10 a=UGlKvKOEil4A:10 a=ea-aaFCQWd8KpuIyLtRc:22 a=na7qQM7zoEAPfvOk0o6d:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virgin.net; s=meg.feb2017; t=1659545442; bh=lgtTH3RDQiqLYZ5Q4qXTXobT2qpMS5HQAQkw7vkpjzw=; h=From:To:Cc:Subject:Date:References:In-Reply-To; b=NCEtink5s+SdL5zR0B2qZmGZiEYvF8uHicC8kvpwFAfNFmO3/SXd1Yy1aS0HHGRIv 9riQULeVmqV28v6mLvPYC2vfcMs50SpzjLIZh99Zjl876AmBWs7lEOFmd/Ej8c4KMH Zef/OVoxPBzSxWf/iNQpBVg5IYKLkAw9IYvhSqQVM3qEoaCgwZS/14gyieWZJpfMr/ 021l6qsKrYuGZ4tWHai9Qql8e4f2aC8clz0DNOlRVc8TwVAE2fVpXh1s0NBAx2Z8D+ ZkvG4FWUJ00pET3QiRdkMOt6Vxupz7fKklNtsfLE7U2VsocklVWmMohSM8ODPjsmtI 3EU5m2Wnj91NA== From: Thomas Lauer To: Thomas Lauer Cc: Mikael Magnusson , Zsh Users Subject: Re: Completion... but only for the extension part Date: Wed, 03 Aug 2022 17:50:42 +0100 Organization: TL Message-ID: <1l9lehpuqtef2c8tbc9e35uck0dol8go13@tlc.com> References: <3ibdeh5ne7prrsaq8394994usvq22q7afm@tlc.com> In-Reply-To: <3ibdeh5ne7prrsaq8394994usvq22q7afm@tlc.com> User-Agent: ForteAgent/7.00.32.1200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4xfP3YLjNTotf+JWY8jO/wHFOFmxrfK6eEjAMzqhAY7IE+MqsehFyTYgSI7sV9FinuFvnWUGWuy6Adu18NAq+GR36gJldwuir9QeBJavs+nmZ+L0jSOb0p QaWx896TFt3xCNiP/HroZ6cjRytV660FTlFEyubAQPkVTWcpDZA+IFDXzHH4i3C6kBeun4Z1YYxUJd4/m1QVwAcPFo4++hCoD0jT4FIQhpTvKzSudwDPmBTq q1GmIPDbPnQBxG3jDJNb4Q== X-Seq: 27927 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: =46rom: Thomas Lauer > From: Mikael Magnusson > > On 7/31/22, Thomas Lauer wrote: > > > Sorry if this is in the Fine Manual but I couldn't find it (and = googling > > > also brought no great enlightenment). > > > > > > I have directories with many files in them which all have rather = long > > > extensions (12+ chars). There can be quite a few separate = extensions, > > > say "*.winter-music" or "*.spanish-photos"... you get the idea. > > > > > > So, often I want to complete filenames as normal but sometimes I = want to > > > limit completion to files with just one specific extension, say > > > "*.indonesian-videos". So... I'd like to type "*.indo" and then = press > > > to get "*.indonesian-videos" which in its turn will = complete > > > only those files. The problem is the bit... or rather a > > > function that does that and can be bound to . Do I have = to > > > write such a function or is there something in the completion = system > > > that will do this OOTB? > >=20 > > There is _extensions, you probably want it on a separate keybind from > > normal completion, look at the _all_matches entry for an example of > > how to do that. > >=20 > > https://www.zsh.org/mla/workers/2014/msg00230.html is the thread for > > the patch that adds _extensions if you're curious. >=20 > Right. That _extensions extension works, thanks for the pointer! >=20 > The only problem now is that my "normal" completions add a space after > the completion and that happens here as well. As I want to use these > completions as bases for further completions that means I have to > backspace and press again. I have no problem with the but > not adding a space would make things a bit faster. Alas I've not found > the right place to do that. >=20 > I have this >=20 > zstyle ':completion:*' menu select=3D2 interactive >=20 > if that helps. >=20 > Again thanks, much appreciated! >=20 > T Hm... simply editing the _extensions file and removing "add-space" in line 24 seems to do the trick. Works well now. T