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 32160 invoked from network); 31 Jul 2022 16:34:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Jul 2022 16:34:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1659285295; b=ek1Q0Q9QVPhWmiXh6HzsUSw2GH8bN3tvkCZw4fQwL22LMCpqkK9QTqRQ8TwMpaMhrY4CRym+CK IsPtAna9Rg5QJkUl4TME3D3GWHzYXm48x8m/syg3GUPByztV73lUehPDA8DBbB6zQBwc/bw7Dy ofLmLpLOxMEMn1nZGyjNobeIBVNcU9cav7XO0X5s13sRgGq+pSAAc9v/ELrlZnEu+gBn1HUAet ihW3UCOcMkL1uXhJzIVouPErjrTfIpFuC5mYGUvyL9VFG0c8cR4sHaGfHBU+Z51tI7AKzz9BvS xwkQ45IZcllcMR1RmowuPuRDWSNlmZRHv2Voyiqh72gsvA==; 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=1659285295; bh=7GYVSDeecj32rNfc8zqmKUaYep7UQRm3vGc3s+WNGr0=; 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=P7JTAsaoUtVX3muB1WQne0pmwrkw7oW7Wh+lLc4NCsDftwf+IDeUCNl9t8qXuAOv8tD8rzRh6d ijxGi9Zk5ZkDk+VaKC5OkYdgSUFJgyXHsQCWo8+uBaCQW34t9wMIBvzNnkZWuWxuQhD5FVXi60 5DkmjTGZCa8G1DW/75snDVymUf/JKhoDBCYq3G1LWMTHXd1ku/LlRHK4usMUq+QfB+6XnL9qlo 6ZgbI5DgwuU2jR1AqF0R+2/0yW7fZ0UJlWkKRyQN4ETiU0eXICH1wbVTuoIPnEbHUagnHR4V/3 PTIDDLEGzrh+WYe6q4xizYKV4nvNlCu4/2vB65JI6kMQWw==; 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=7GYVSDeecj32rNfc8zqmKUaYep7UQRm3vGc3s+WNGr0=; b=oXkNXtY2/S7LSPoizn1viS9Npu ct+oC/kISxqXGKJHT+RumPYfSnfxM5uO+qZi7pti9Km71CkOG86gyh4yoi3UzKQW8j4gWZ+YmTgxS WIidWsPJ3k2F4n30gao7EUiUWtWJ87gv269+wU2vU4GjxsKUvQBqnE8dsNEnweYozXq+ENItFeEhN AB0ccHQnRmwafgp4jtH8DVfV88b7eAbI0h+jdo95duYBxPnCVG31VWJGym98+2AlcGQ4y+TJ39qhG 1bHEsJmQIB7uj8uGGKVGLxmzvy4ePIRFSCIXioST2EGw6XolSBWyTBJAQ9o0SZVnZxviXd+0GRVlw g1EVXNkw==; Received: from authenticated user by zero.zsh.org with local id 1oIBu1-0006QM-Db; Sun, 31 Jul 2022 16:34:53 +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]:34634) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1oIBtB-0005j1-Of; Sun, 31 Jul 2022 16:34:02 +0000 Received: from [212.54.57.112] (helo=csmtp8.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 1oIBtB-0001jI-G8 for zsh-users@zsh.org; Sun, 31 Jul 2022 18:34:01 +0200 Received: from vCholatse.rt ([85.210.114.134]) by cmsmtp with ESMTPA id IBtAotCWPPoCmIBtBoXnGy; Sun, 31 Jul 2022 18:34:01 +0200 X-SourceIP: 85.210.114.134 X-Authenticated-Sender: thomas.lauer@virgin.net X-Spam: 0 X-Authority: v=2.4 cv=XaCaca15 c=1 sm=1 tr=0 ts=62e6aef9 cx=a_exe a=l7OtQQtcCQarUvWpCMt6Bg==:117 a=l7OtQQtcCQarUvWpCMt6Bg==:17 a=kj9zAlcOel0A:10 a=RgO8CyIxsXoA:10 a=pGLkceISAAAA:8 a=8RloEfZUAAAA:8 a=HYshxDoSAAAA:8 a=H2-S9W7ainfN7uCPBU4A: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=1659285241; bh=7GYVSDeecj32rNfc8zqmKUaYep7UQRm3vGc3s+WNGr0=; h=From:To:Cc:Subject:Date:References:In-Reply-To; b=koLN2jnSER5PeC07e2mmkhQcNjeD7e9Lus0Ivgl4CfCK1LA4mjErHqNI80EX/NYFT tjyGtY7vAIQDQErADiHfBgobCqVvTUP+2A+6WA1zNHJBm9YDY1yzoPn7l8RidT3zgM ai1JfZLwustDkOz+JlI99Xs6KNKsDs1T15A9f5pi4hc7bw2BiUfZg/LP0Mfdn0PaGs JJk+A+1fZLN9XFmI47NYxEy1VbdHEOEFGIXag1z6CKx/fhGMolMxFRtsQi3xv7zaaO LUjDi6uvEcU/ZPpACaoQLP8zzn6FX9BoWwanfYbPa0dpJ8cR93EbFLhZiuYpOLvOUb gm8R4L8WcnteQ== From: Thomas Lauer To: Mikael Magnusson Cc: Zsh Users Subject: Re: Completion... but only for the extension part Date: Sun, 31 Jul 2022 17:33:37 +0100 Organization: TL Message-ID: <3ibdeh5ne7prrsaq8394994usvq22q7afm@tlc.com> References: In-Reply-To: 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: MS4xfFUfKeklahfo7xNBHWcoU7LiJiL5UZXimpzmL+/x+ZVPHUGaXIbYnoOEE9E9MqH3rvpbSsVpdzE8xxXvwO9pgaYP+i3DdmskQ6VnGFbUlSkLoEjqoCXw g0Q0OUVdFd792CylKMJIlP05iHaY2jsm7jUKcGLBBWaqeL6DUFTkFdboktPeFcySKEw3ZVgJPLG761GY7oYSjFZZOWh21sxAxMs4Zdu2HwS/0a/ngwdvJD5e X-Seq: 27921 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: 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. Right. That _extensions extension works, thanks for the pointer! 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. I have this zstyle ':completion:*' menu select=3D2 interactive if that helps. Again thanks, much appreciated! T