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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16563 invoked from network); 11 Aug 2021 22:21:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Aug 2021 22:21:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628720466; b=oXrqJ9in0UfXZeEu/1EZ6yZ+syaK+v1z7Cd3ag/GF325yz3XAZ4DoQ62HZngurUM1IrtCOs3t5 w0ABLu+1Z/6FyoKWsykV8vg/9Z727lGzgKehtZ083pEmDD0SJnXo8JObB4AjwyB8d3f3AAaAV5 B8TO0YikT95IlzoC9jaZHZLuylJpIIg/rF4JN9RPc7rSeVADeXJfSTjWXKkqTcHmIW0+s4jSrL ht8de47taujicdgdXiDUQ4uhfxLN5FMC+cXpHz5vIQvUacA1CIoX2AqRcQ01Q8GenSrjrv14tP lq6I0XvFJ+85o4okX2/4e+n6p7/iXXWohLBx9m/E1PMQBw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f181.google.com) smtp.remote-ip=209.85.219.181; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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=1628720466; bh=ASg5vcNn0BLi9fZAvbl2gM3YOyKFAx8zs4m5GEeUX+Y=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=AhRciEmLZVuCebZEmEHhykmF4H8iSqRD0F4jcvjyXKw6EQ0yp/4HRJzhoiNnJOR9CQX5fzm/So vGipLndTl8wmzCKoTgI/ossZqJ1JGprYO/XxjHmuUZEx4TAUYFvFiaGf7UD4WASYc4wrNAzTmU xjtigrdAsq6lZPmYXK4rn1EFMB2pDlEwQt7LfqI3GXikI+eS4NHp758Z60sDHEyXkPx07Y+7Kk MNbFD8e3r6tmKoNyCYkEV/IIEs1e4Z3tfkQ4VHUX/npZM6qcMWChG/EMIPGgpTbejhK/kdEugs q4dQXh/n10sBlnqd2PfK7Nqqr+iMQyAdKp7pgBSewPOWmw==; 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=YFBGAkySxDGqDqdFq0ul/BLT4C2dfpc/lNt4M7U83ug=; b=BRcflc//sqWQx7T6pDkg0+XbXL GAMP4Z91iyLqhR7iJI5xGwtuq7nvq5w35h+TiMuLS1SKGMDmztCEI0+gC5JXaiTX9RR2Qt1+IXGll QKwsSelamwBygTY5igrEV8GdFshbhHFfkihDpIS32LXELqalAQ+yLfmeo3TOE8vKnKYwDTwdEA+DH hlKv0UsX/qraDkFjW/q6qoAAPvl6SUfsOWteIybDsHZnlUpDN3DF6EDxZik9PZ1cid8x59pDy3rEb wjtujqsr4Q7WW5Kac1DCaetGHHICgMm21W8mFHTcJbY7JNBpR0OsljIbMCcGvfotgF5laXruZR2fb BJjI91Ww==; Received: from authenticated user by zero.zsh.org with local id 1mDwaw-000Aid-5S; Wed, 11 Aug 2021 22:21:06 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f181.google.com) smtp.remote-ip=209.85.219.181; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f181.google.com ([209.85.219.181]:43005) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mDwaG-000A12-Es; Wed, 11 Aug 2021 22:20:25 +0000 Received: by mail-yb1-f181.google.com with SMTP id m193so7634338ybf.9 for ; Wed, 11 Aug 2021 15:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YFBGAkySxDGqDqdFq0ul/BLT4C2dfpc/lNt4M7U83ug=; b=VOnJgScQ8XxE01kpGKozjpto/JoJHAAhiusNwJK/RPS4Q313CyGgB2PL2/WRiTB7dq W4RkQL8NVigXKtBsaWsw3msavVRCaCkdmyRzrR7GvqZtO0Qocwv2U+uFcabgCP41+kWK EEcYO4U+nXFv/vRlvKvUvIMf8gUshIhVB1FLVIcostS6Bed5kubSkcJSab4HK2VcRXes R9Z/qCM5TrOogvRwCy38Ocz+ZYDQISf22JahzkUijM2tNN1pvZp1o0p5RFov+QHg2Dr/ LWIiNxVDkCVwtF9BUN+2DP4A5ec6Mxv3YKVIJrtEurM28ug7tW4uIT8W+kjyZ069kaFq 4CbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YFBGAkySxDGqDqdFq0ul/BLT4C2dfpc/lNt4M7U83ug=; b=cKz3t68e4wSAfeUeITipu9ALpQktDHDUpqdQhLduZZQN47bZk1VL1Zm6cV6QzgQsu5 y7U0/oyGHGAXldY+aZwmHkQdSw2Jt5NqqQ49RXOcsOy5Hbr+l4I/Ti0MHv6faxSdlEWx Uw052G59g7/XuRoKoMSrW7Xn4ha3LSWR4HHQe6vFmVWRdIfv87edx7vsq5ijc1GwVaQP abkLZelR+M4ig+c6q3VfEmj5RXmRU46hLGQYXDqcL4ULcFiuDhSwNA+65at4amz8P9Tp DcDoR0MZnX0KGcPOHHwnwpWZ41fMQ9HUSt0FWRs8T7AHdtReoTBhY6mDuKCoOpArn9WL yv2w== X-Gm-Message-State: AOAM531XSrjN70qOa/tL2DvK5NhmUR42SLt/VDhFBVeMXodDR/q8/xSI dGobgzttPcO5uCebHr7D/6+OtJWCSEIYVFRz17YnnA== X-Google-Smtp-Source: ABdhPJynIZo8khwRRgupvS3r+1pb4reUFuemJG4uNXw7SVL4YXPfuII2ElziCLC8STO3dRiPvjDFXf5nXVQOLQZI//8= X-Received: by 2002:a25:e042:: with SMTP id x63mr344273ybg.398.1628720423142; Wed, 11 Aug 2021 15:20:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Wed, 11 Aug 2021 15:20:12 -0700 Message-ID: Subject: Re: completion does not insert a slash To: =?UTF-8?B?UGV0ZXIgU2zDrcW+aWs=?= Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 26921 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 Wed, Aug 11, 2021 at 1:23 PM Peter Sl=C3=AD=C5=BEik wrote: > > =D1=81=D1=80=D0=B5, 11. =D0=B0=D0=B2=D0=B3 2021. =D1=83 22:03 Peter Sl=C3= =AD=C5=BEik =D1=98=D0=B5 =D0=BD=D0=B0=D0=BF=D0=B8= =D1=81=D0=B0=D0=BE/=D0=BB=D0=B0: >> >> Sorry for the late reply, I tried both versions (with and without parent= heses). I don't know what "with and without parentheses" means here. >> % cd sr >> tags in context :completion::complete:cd:: >> local-directories named-directories (_cd) >> users named-directories directory-stack (_tilde _cd) >> users (_users _tilde _cd) >> >> % cd src/py >> tags in context :completion::complete:cd:: >> named-directories (_cd) >> local-directories (_cd) >> >> % cd src/python/ >> (no results) Are there any subdirectories inside src/python/ ? The only case in which I can get this to reproduce is when there's nothing more to complete. If there are subdirectories, a possibility is that the permissions on either the python directory or the subdirectories are preventing further names from being found. This is the case where you switch to running and look at the trace file. >> Do you think that there is anything suspicious? Personally I wonder why = there are duplicated entries in the first case and why are the tags listed = in a reversed order in the second case. The output of c-x h is not sorted by the tag-order style, it's in the order that the tags are populated by the completion function. _cd happens to check for named directories first. In an actual completion pass, filtering the display according to tag-order happens later, after all the possible tags have been populated. > OK, more clarification. I've used "zstyle ':completion:*:*:*:*:descriptio= ns'". > > Now it seems that with the second completed path, the completion engine c= annot decide between these two: > > % cd src/python > -- directory after cdablevar -- > -- local directory -- I don't have your set of "hash -d" entries nor your file structure, but with the closest guess I can make using the zsh source tree, I get that result only when there are no subdirectories left to complete. What does (execution of, not completion of) ls -ld ~src/python/*(/) show you at that point? > Frankly, I still don't understand what the problem is, because I'm inside= a dir pointed to by a named directory (src/ in this case) and both "direct= ory after cdablevar" and "local directory" are the same directory anyway. Whether they're the same directory doesn't actually matter; the tags have caused them to be placed in separate groups, so as far as completion is concerned they are different alternatives. The "directory after cdablevar" branch has gone down the full path $src/python (and then hidden a prefix) whereas the local directory branch has used the relative path src/python and completion is only looking for unique strings, not filesystem targets. The filesystem is only examined to generate the strings that are compared.