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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15277 invoked from network); 10 Apr 2022 14:33:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Apr 2022 14:33:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1649601198; b=B4YIHv0i3xBawh8rcja+6DnDiPzmNZC9zVkpuIjLUlGqF4pTqKacOMP3uDIb/0cCXUtoqkU9vf E35c9saSYxFZscardI/AMufPapVFwrPOlFuJ8Kd5KKe/2r39wfM0w/bxcmXo59Jm3ZUZ2wZYef TfSlLvJavLqQSARdasa7pWLCRIx3AzDDpEadaPWy/rRt2fAnu4lNKl20Cn6nGdae0m1hwFoh0g Nmor1EqhmoB7v/MfEs+ES9dw2m4M69CHZSjvsb3OqDjNXJBSwOaeRdtTWKvuF/NXXEj7CbAlk+ qhiWHnOny8A0a9FuHpfhUOMaAlmetwmXxM9irW4gW9zGvA==; 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=1649601198; bh=CDZqwZyEgIKgOR7m5jKGcQ0BoV3T6HURRri9zEc2mTo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=Mmrdv0/0x4gng8nFIjyUweVPFqCryJnKdRQYZ9PuisILRnv1ehKw4Va4kPTqYXr+XNRMhofNuD KCpqnGtZdfDbp/Dt/73HB1KS9hjDqqNFEZaLsrTOGotKnmgqJ34JALO+OaJoY1eplj91JhDfpe nFyxBgTUo63BCm+AMjSKNiPSSS6lkJrTv7J+PnWqZhzMzP1/Qp0hO4ltuFAR4iVlnOmbln00kT P0qtBfyqz/ZMX0WnUFJL4i3HOozDjENVaY2Jtp31w4yCrpz2y2CAL7oocUu19aJvKVRKYE0wkx iGBm/mzLyv3L6Nb0Ce1wptYYEQPaqaqYfOkFLK9kQEO/GQ==; 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:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=h/OF7PmbO5JHFoXm/QYIfeejddnEdw+eSmwWYKG0yKE=; b=TvokuTHy1WIKUjfWNKJJzCj8PW s+oRK5g0wjRLDAnMJLbxzuBHRMgL+ikXxdpjTudHQWV/Xc3+3AnEo4/g0aHi7U5dXLU2fLToJbBTV ZLdSLB3eSDV31CT14+8FINac8LZnhncWi46KBDjnE0sKSDQQ0EL7yMyIiRLDQ3vi+RRFK/m30MoYL Lg1zHLi+2jdiZXDuUbd/v85FD3WHJUNaXpA1VscCaYtVJ27fNIpSheAT344LCmYheshB8GNDTl7v8 LuzOnrq+2sSz0PH9SW9LgJ0F2irX8XoLa6fZl3zwYT9hKbbTJivUn3AOUgr63Q+kU/QdyylZwQOhc R9FfRfmA==; Received: from authenticated user by zero.zsh.org with local id 1ndYcu-0008jv-Lj; Sun, 10 Apr 2022 14:33:16 +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]:58645) by zero.zsh.org with esmtps (TLS1:DHE-RSA-AES256-SHA:256) id 1ndYc3-00082I-QR; Sun, 10 Apr 2022 14:32:24 +0000 Date: Sun, 10 Apr 2022 16:32:22 +0200 From: Tomasz Pala To: Bart Schaefer Cc: zsh-users@zsh.org Subject: Re: cd /u/N/v/ tab expansion Message-ID: <20220410143222.GA21848@polanet.pl> References: <860877fd-ec69-0323-3f2a-8a40e96e6aee@rayninfo.co.uk> <2b388cce-1412-36cd-9a90-d58f853ee830@rayninfo.co.uk> <20220410010441.GA24829@polanet.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <20220410010441.GA24829@polanet.pl> User-Agent: Mutt/1.5.20 (2009-06-14) X-Seq: 27653 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: On Sun, Apr 10, 2022 at 03:04:41 +0200, Tomasz Pala wrote: > I've stuck with this problem month ago... > > $ cd /e/s/s/[tab] > No matches for: `directory' This happens with: setopt glob_complete interfering with zstyle ':completion:*' list-dirs-first true According to the docs this should not be correlated. For me it seems that list-dirs-first is somehow broken. I got other usecases with bogus sets in menu completion. Namely: $ mkdir -p usr/{share/{aclocal,atever},sbin,src} $ touch usr/sbin/a1 usr/share/a1 usr/share/a2 $ zstyle ':completion:*' list-dirs-first true $ ls u/s*/a[tab] directory aclocal/ atever/ after second tab: directory aclocal/ atever/ files a1 a2 - the problem is there is only ONE a1 file proposed and this is usr/share/a1, usr/sbin/a1 doesn't get to the list at all! Or it's overaggregated (disregarding directory). $ ls u/s*/a*[tab] note the asterisk after "a" directory aclocal/ atever/ files sbin/ share/ - this is much better, as sbin/ and share/ are completed to "sbin/a*" and share/a*, so after the initial selection one can start second completion resolving "a*" part. My solution was to use: zstyle ':completion:*:*:*:*' list-suffixes yes but then: $ mkdir -p a/{b1,b2}/d/{e1,e2}/g $ ls a/b/d/e/g[tab] No matches for: `files' or `directory' And after: $ zstyle ':completion:*' list-dirs-first false $ ls a/b/d/e/g[tab] No matches for: `files' - slightly different response only. This behaviour also doesn't match the docs - enabling list-suffixes should cause all ambiguous components to be shown. Apparently it does the opposite (!) Therefore - list-dirs-first breaks some cases and my solution breaks others. Without both of them: $ ls u/s*/a[tab] note the asterisk after "s", i.e. any glob No matches for: `files' So, assuming list-dirs-first is simply broken (and it should only result in different ordering of matches, completion of u/s*/a is apparently some side effect only), what should be the correct way to complete $ u/s*/a[tab] into: directory share/aclocal/ share/atever/ files sbin/a1 share/a1 share/a2 ? BTW this might be related to my previous thread: "_complete: insert unambiguous when globbing" -- Tomasz Pala -4500 s