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 31624 invoked from network); 17 Apr 2022 03:01:53 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Apr 2022 03:01:53 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1650164513; b=To1Zt3ur7+yP9/kbzbRMZEhCxrwZPG+Lekax3ekGiSn7TqD32gDceYpgIEc7bISBXTVNjyZoES bwafJ+i//5fT8wuW+rqr2NzXspX7MfQA6xHuWCtxgERS6TJzO2eVTIiaOyyxmo4D+vX67VFhke WR0je+U/30G7kNzJReTTW8+duSQzxrs/8ShpS9Xa04bIcG7hQRsMIJjd1l1euyaVWSjJViQK0e Ur3bD5SOy0YeGBKwkyuFhr8fAuourgaAQPhZZiphhHyNea+9szbm2dNrTAbfPnioo3hCSPTIxh bdTod78ivJ0sLi3DMLExF+rY6+0Syq6n6OZhO46UnV/u4g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f53.google.com) smtp.remote-ip=209.85.208.53; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1650164513; bh=N1xV++BQAiSsMM8bBlqU/Zj7Cl9CO+Q77wiDxbRYRNI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=l75H7xDZ3toGDmepGAcN7pZIIvm+f8zxhU23o99kz/0zjIZ1jY8nOr5OvU9MC6HxKRSbPCKi/t l3ADLCAHWOKIV3iFsNQuPX4Ue3jpU4OcWwR/OAqagMGCOORRs0gA4vP4hZXcB7IrLOyj6w/3M/ Q/xP5GWCYt2RUGYw8NtaeJgxiw/OH27ruXQpSWVgiV5Zst/L/ev3cMLjg1HiHHhU3uArtgszlJ fT4Q1kn4/wfhblSprXcT23gvMXWyOZKEE8lNQWK9BwSOfH8SS3XV8Yk73smhiZTVGFptrp1T6o 2E1XGXuQubswvrGwdOOYDmQT5xUY9C9PEzyk6cafkzjZjQ==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=AJOXYtP1GyV304FQvjvsTxqMDI7NdDUdPjkr5kdH2eQ=; b=sHavL592vTPbr+8oFHeKWv7LId QDuU4xrVJRrmC+EBvLqxUleezxEgkQ5MAWBvq4+U6NvRbsH/LIJkwKVkazhrjx/5PqnBJDo3ZEzUN IH6xHzLv6EOXRLxjrx/I9ub8wJq6Dsn2Dz4lEYA55LkRk6vIILmOodR8WgdHvQuWZirdNVtmAb3ki jRuLN0aiudD7jweE0kRtxC7W3IZyMHpdo2UHvg+PkhtWA1qiT0gM5L13Fduh/ok0ETRxPobnlFcO2 uRxOObWJ3LLylqRmEGlgQD9nxN4hcynlUk7EQDYhLbxvDUfuI2PuE4u6RL91YFXQZGk9ZUA7Cn29S ke+O4u3w==; Received: from authenticated user by zero.zsh.org with local id 1nfvAe-000EiA-5e; Sun, 17 Apr 2022 03:01:52 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f53.google.com) smtp.remote-ip=209.85.208.53; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f53.google.com ([209.85.208.53]:44000) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nfv9L-000DRo-AB; Sun, 17 Apr 2022 03:00:32 +0000 Received: by mail-ed1-f53.google.com with SMTP id b24so14075480edu.10 for ; Sat, 16 Apr 2022 20:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AJOXYtP1GyV304FQvjvsTxqMDI7NdDUdPjkr5kdH2eQ=; b=DMcZiTZytl9OcXakma86t/OFNrnjc2hRDDhm1gShg57gsy7ZzpcMMs3sW0MCSYZ9UT 2Qd/CY3qsMvbaj0DOU2fHnLGK0kYSmsHaoH8XBhji37u/LGQ35JgezqDvQZXCWXmRukR NvVvNuocCtat7V3XoofoMLsd42Y6qV51xshd3L069/VJQ0WUA3ghmRH9Ko2JRNhKB+KJ +E0NcbfpUcTjD6Liuz1uPlmK1PHKwlyL2HWD3rpfRmsTDxCNBjmgRnHZfKVluKQpmVF1 dLF9nmuBIPmZzZisKy3rAaxqPvkn44YQKuXvPBJMSt8MEQv/SRZq+6MirEQOGPS/nhD9 Xyfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AJOXYtP1GyV304FQvjvsTxqMDI7NdDUdPjkr5kdH2eQ=; b=BfHC5FbR0TLjWrjq0FFuSFh6oGlGME+gYscS6oYWiy0Q6Q6c+AxNpmP9Xpvy3KSw/6 xV9yOwM8Vbn7ivmmjJr5ysAUalSyv2BGPXlbSDEJG8i6bJgE5na2FjaF6KwC2lr0dbcI c/PWdqkkuSRLXrbBlWHWJlTYTDCByUoBcX5wcr5y+gFlnKUoOtup0e+d4/7vQ+UkvEg+ T0/ALJp3pZEhMPxDXaVps/9FJ82zKkNJl/2Fx4LKsYh7bc8OWiV/N6vM4voFbLSOd0EB yzWX1qRT7L3J+z0nlz4k/+1X1v8BkOJzdylzpFhcBaAtkSjfyX5uzQC33tJCOAhc6k+c gxkg== X-Gm-Message-State: AOAM533NhNDFatVM3gzcgczttcI42g6ZUi11dy/8KiA0NJ6SsHxgZ1ik /kT7EiJD7Ya+lQwCFYoBpM9x8e9171Pfi8z0t46UBfbdgG2igKH3 X-Google-Smtp-Source: ABdhPJxnFwopT6HjD33RRWfaCg7+P7dNpiGyQkifQm5nupX+q8SSJzIE6tApOUIHlsS+jPyWveGPleK2qq3ovr1Kl+E= X-Received: by 2002:a05:6402:2815:b0:420:c32e:ebe2 with SMTP id h21-20020a056402281500b00420c32eebe2mr6043900ede.1.1650164430261; Sat, 16 Apr 2022 20:00:30 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20220410143222.GA21848@polanet.pl> From: Bart Schaefer Date: Sat, 16 Apr 2022 20:00:18 -0700 Message-ID: Subject: Re: cd /u/N/v/ tab expansion To: Tomasz Pala Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27660 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 7:32 AM Tomasz Pala wrote: > > On Sun, Apr 10, 2022 at 03:04:41 +0200, Tomasz Pala wrote: > > > $ 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. I am not able to reproduce this with zsh-5.8.1.2-test-9-g0ad3b11, at least not with only: zstyle '*' format %d zstyle ':completion:*' list-dirs-first true zstyle ':completion:*:*:*:*' list-suffixes yes setopt globcomplete > $ mkdir -p a/{b1,b2}/d/{e1,e2}/g > $ ls a/b/d/e/g[tab] > No matches for: `files' or `directory' This I am able to reproduce with the settings above. However, if I invoke _next_tags at that point, I get: % ls a/b/d/e/g directory b1/d/e/g b2/d/e/g So the results have been correctly completed and added, they're just not in the tag group where they appear on the first attempt. > This behaviour also doesn't match the docs - enabling list-suffixes > should cause all ambiguous components to be shown. Apparently it does > the opposite (!) The settings of list-dirs-first and list-suffixes have no effect on the tag to which the matches are added in this case. It's all down to globcomplete. _next_tags works here, too. When globcomplete is set, the following differences occur: _path_files line 251 forces menu=yes _path_files line 737 sets SUFFIX=*/d/e/g* _path_files returns false to _files line 119, so ret=0 is not done at line 120 _files line 109 invokes _tags which calls comptags -N _files returns false to _arguments, so ret=0 is not done at line 465 _arguments line 467 sets alwopt=yes _arguments line 538 test is true, so 543-551 run compadd _arguments line 586 is false, returns false to _dispatch, no ret=0 at line 63 _dispatch returns false to _complete, no ret=0 at line 117 _complete returns false _main_complete As you mention in a later message on this this thread, one problem is at _path_files line 737, that suffix will never match given that the /e/ path segment is ambiguous. Using :gs as you suggested resolves everything after that, but introduces a new difference at _main_compete:411, where compstate[pattern_match]='*' and unambiguous_cursor=8 (instead of 4 in the noglobcomplete case). That seems to go along with having forced menu completion on, but it seems odd. Regarding: > - compadd "$tmp4[@]" $listopts - "$i" > + compadd "$tmp4[@]" -U $listopts - "$i" Try ${Uopt} instead of -U there, and see if that makes any difference? I don't seem to be able to re-create the setup for your "ctrl-g toggling of behaviour" incident. Can you specify?