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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9990 invoked from network); 30 Jun 2023 07:20:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Jun 2023 07:20:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1688109655; b=W5fcL6kwbn88ti1hxNo6JkX5ntsoGFJ5/az63ApK4m2WNvrcxo9FxJylu7TMcaMsJYEO44Zaey bpL73UkJeuRgySE8Z2XCV8W9GkpJCRtWDbpafeF3nMtap7HHnIeTxYOw/ndLQm94I/pkcTdZm5 r7Q0hXbA4QXE4ljp7MyCRaOAX75vviw2JFngfm1zkqo9tEiRZIzLwBkvPlq5jQ78GbYCX6EvLR 3dLCTzM1Q3uaB4l+SfHGxNljmxPDZyk3Gb238HQIX1VJY5/8InycQnKya8APO8i5GLOavBza5w leIwYjlXZBCtKHImRelgmy4o2mVeRN2attRo2Td4tkIqmg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-4316.protonmail.ch) smtp.remote-ip=185.70.43.16; dkim=pass header.d=pm.me header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=pm.me; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1688109655; bh=VX7vFn+irzOPw0N85W4mPtScSVcr8W4iqEV2d9Vmde8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Subject:Cc:From:To:DKIM-Signature:Date: DKIM-Signature; b=kA/3BrRHhPFJSxjlkjD7cVDPV3CYJ0f0rEHEOXeC0NECqE3aLlAa8N+wj+BUvJ8GzdyGWfEHzz nbQ4PO83tZTVF7yXyXSNHl2SKgFJHMfpr3k0YxLUP5lEWi2qQVyjvMdN4+6LIHPs6cF672PL6r GarUtGtpOyuL0izw0T8JVxRgtksp1aDKKsxCAa/Y3x0kYNWPw/OBly3hJfSyQg/9DRP6Fb7m9A CexIVZ3G9avzMWEUsLJWRs7rl+XrdBjd14L55Nv91HI75uLMtj+fnai73YvGRqOn51dNmZZmzA 3fEn9Ttf8N63bh7NPOgvmrFGjITf15CSibpNXC0xRdMEIA==; 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:References:In-Reply-To:Message-ID:Subject:Cc:From: To:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=yfFovcveSt6owB6dPCS/0yyz0K3+uyxlIUjwJMruV7g=; b=G3IN7a4QwoR554IL5P4uqHzDX1 fdcAqcoRJxpze6up6S4L1MADxFb09EzxMUOraDX3+ikAxvXL1ith2cyiVFCp4re6IJo5520fn04DR R7mdDh+IqzBZoRml/w0o40xBsC9rNnr7QMVWE09dNZnLgnk4JmHoYmD1/vDxBi5H0O56ebDU7hH+U sJvgXCJsV0WT2FM2fQCo2g+izc4GP66XWmEMdgsV7wxbITXP8Nxb1groEhtDw28Jj8jMNXE/IZYRi HIBDG/AxZkHlxuVl/fuDt5UjCthd9aFCypC+Tclpf0wZDWrlOUHx1hW1EE8c6grR2guas1KlryZOW n49TKZqA==; Received: by zero.zsh.org with local id 1qF8R4-0003FM-7p; Fri, 30 Jun 2023 07:20:54 +0000 Authentication-Results: zsh.org; iprev=pass (mail-4316.protonmail.ch) smtp.remote-ip=185.70.43.16; dkim=pass header.d=pm.me header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=pm.me; arc=none Received: from mail-4316.protonmail.ch ([185.70.43.16]:47915) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qF8QF-0002Wg-VN; Fri, 30 Jun 2023 07:20:07 +0000 Date: Fri, 30 Jun 2023 07:19:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1688109602; x=1688368802; bh=yfFovcveSt6owB6dPCS/0yyz0K3+uyxlIUjwJMruV7g=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=RV+D7BhbXGUqaf/rkEZ4MUdU3TufcHKxYE2oIe1j0lbTWditXHdO8m13DdGck5WKw YjoRNhtWmzQC29r6j8EY/gJrnoHPyVculBTZYMsngeUIxqZugTZ6HM4vIHWzKJGs08 sFD0pwUtUfD704FPGVds7pNgJ7bFb0pFg8AqMGP1Po4dyESPnJFZUY24scB2WsD4Vs jkxGIH8WOP3EdZurbhEOGmQyeuRakZNB1O33Iu3u6+XVdp9RZ+WL844FDd/DeXzMYP BdB8J+lsxPrN6GIquE4PtBNA4zvlIJfFWKei6EYnPMxfYxYwhlUMfGVjAnXJcJRnKE AUa2zp5rYy/5w== To: Bart Schaefer From: Marc Coquand Cc: zsh-users@zsh.org Subject: Re: How to have Zsh completion menu and use glob patterns + recursive search? Message-ID: In-Reply-To: References: Feedback-ID: 79185866:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 29100 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: Hey, You are correct in assuming it's just generic file completion. I tried your recommendation and now it works exactly how I want it. Thank you so much! :)=20 Sincerely, Marc On Fri Jun 30, 2023 at 2:44 AM CEST, Bart Schaefer wrote: > On Thu, Jun 29, 2023 at 5:40=E2=80=AFAM Marc Coquand wr= ote: > > > > I'd like to be able to do ./**/*file* and get a selectable list of= all options available. > > "do" that where? Usually it would be after a command word such as > "ls" or "vi". Each command may have a different completion function > that supplies contextual clues to adjust the results. > > Presuming we're just talking about generic file completion context: > > > I notice that if I remove all the previous options that I have enabled,= ./**/*file* works but it expands to all available options. > > That's because the default binding for the tab key is > "expand-or-complete". You're seeing the results of the "expand" part, > which takes place before completion is attempted. In many cases after > "compinit" you want to change the binding of tab to be > "complete-word". > > bindkey $'\t' complete-word > > > However, if I enable the completion list, ./**/*file* stops workin= g and doesn't do anything. > > You need the bindkey above (see the documention for _expand), followed > by at the least (other completer entries are possible) > > zstyle ':completion:*' completer _expand _complete > > The _expand completer takes the place of the expansion part of > "expand-or-complete" and (in effect) feeds the expansions back to the > completion menu instead of populating the command line directly. > > You probably also want > > zstyle :completion::expand::: tag-order expansions original > > otherwise _expand will offer "all-expansions", that is, the "all > available options" set you didn't like, as one of the possible menu > choices, which if it is a large listing can have unexpected > side-effects on the display.