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 32138 invoked from network); 10 Apr 2022 16:33:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Apr 2022 16:33:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1649608394; b=chCHdg1P2giU8rAlT9zAtzGMPzjVehCT9FHLtMHf9D07xXf/zYiYqXP/doMHFEWmxBvSePL8K8 tQYavkH+J56SINOZHF9QK5j2lc9TMZXi6WYQqXyDB995X7SL4ycAGebprtJ/EsY0fntaEuoeeY lOziM87Lrxj7L4mWIvjTs9tl65lrKHV/4NZs75h5o5Q225cA3fR8mszyWDMoQ9flIHXwlDaBFY BXH7r+3zotfgJFy3XtJP3A5KWb6JUaklnzNPWrdbIybaQZYZM+t+BQy5tBkWtZYvbOdXcJZjw6 OItwJ4dA7yE0ygz0Ib5Yw+udvGJNRd2yNK2Rbi6zAERXhw==; 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=1649608394; bh=Jc8ZYRZVY2uctX4sDHo7yV8Fxt0Ryy/rl6Pir1qgUAY=; 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=KOY+599EI0MevX7wqgYXRDraY3GRv4CdeKo++znVXHJU+SNxGjQ0KDMpjWR3ARXREzwFkKBzlb jAZ/BKjrHk79UDz5/2F9Z3G7EprRMeSH1L1LVZ8x5Ogu5R3XEzE2qV6Fxl+eO3z/BdXGJUOnNh 68EjJm31cC9D67RuaOQF1r+i+LDZYfgJUUBn6p5FI+kRtO8FSz5kKmVCTmTSiUJH8sJp6latEs Ea9dpbEjJq7OFCGEHiPkbKvEFznz1Sj3v8xlI7Umdrbz1oupUVS+K3r4qu89bO5DSSi+trEAxl zc2DgoGITi3LrPP8GsoahmwYcApAeaiFSZOxjpMModBeyQ==; 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=dlFLyu93F4+N4NMMLecBRh7GtpYB+P1+oTGIprgKymg=; b=N8ZKAKzvvqZZgoziMOj1rK0dQV 0PKIAD2kXNSGI1O4BhMPmSEvt1rJrwfLXETmCuXpMkZHJ4LQhVXyDGlYKsYwNRth7hjXnoLsdwC6J B199PwdcxYIycq27cNDKy+1vBkfICimt1e3QTCChIczyWkczyze2t3syeFUQWMa/O8c3qj9My6JKV pmCBFKPf/BCvK4iL4s8gYFD+Ia0hqRNmA0OnQt0KHJwYQpSUZJNJrO2g1IeNYoQe54XBR1V5LjVfj 9b+EZq3MU9M46wmIm49sVmcWbYU/ssdhuc8wELWkBNfXbr1eb0/qPRqOt0jOP2N9fvsYqKsW27scT QvFLdJwQ==; Received: from authenticated user by zero.zsh.org with local id 1ndaV0-000G2s-Ls; Sun, 10 Apr 2022 16:33:14 +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]:32895) by zero.zsh.org with esmtps (TLS1:DHE-RSA-AES256-SHA:256) id 1ndaUP-000FLB-If; Sun, 10 Apr 2022 16:32:37 +0000 Date: Sun, 10 Apr 2022 18:32:36 +0200 From: Tomasz Pala To: Bart Schaefer Cc: zsh-users@zsh.org Subject: Re: cd /u/N/v/ tab expansion Message-ID: <20220410163236.GA22715@polanet.pl> References: <860877fd-ec69-0323-3f2a-8a40e96e6aee@rayninfo.co.uk> <2b388cce-1412-36cd-9a90-d58f853ee830@rayninfo.co.uk> <20220410010441.GA24829@polanet.pl> <20220410143222.GA21848@polanet.pl> <20220410162751.GA21675@polanet.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <20220410162751.GA21675@polanet.pl> User-Agent: Mutt/1.5.20 (2009-06-14) X-Seq: 27655 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 18:27:51 +0200, Tomasz Pala wrote: > 3. if to be left intact - how to prevent this from happening? The only > difference I see are MATCH=/ MBEGIN=6 MEND=6. > > > The solution I've came works for me, but I got no idea why and if that's > even the rational way: > > - [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*" > + [[ -n "$compstate[pattern_match]" ]] && [ -z "$MATCH" ] && SUFFIX="${SUFFIX:s./.*/}*" This doesn't work reliably... after first use MATCH is set and nothing unsets it. -- Tomasz Pala