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,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2879 invoked from network); 11 Aug 2021 20:24:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Aug 2021 20:24:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628713459; b=UX+T3Xcp6SAQeG4/5L3g8Q0CRwpO/HIIK0uxOG8FNMyfvEYbe8LEdIWyblpaK5mzK6Np1xcI2I CT95zsmVZ4UmceH1EhWalpSYvABfmL64cGsGwU9CIfd4PUyCmZYbDezzCfZNkOv6P7d417MHGT 9TXTiiTNXYRGqwAEVEyPpFdT+hVoA/nOjGldC/pTb1zeuybczA/QoBhCYZ4aQP4ZMFiKOmpqx+ Ptbkx0rzNyrEWZpGgVLZ5TPV6MRoQn+ThzR6k+8WOxwW0zAaKV1phWMkCzEFuaoR/wWvpmQUxL SsKz17pZ0WVvCKPrkPRuLsmveDU2dCra3hllG+4lbdN74g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628713459; bh=jlFSQdNdjT3kLyyo+N3zWUW0SGOfRdK3hscUNQe6/Ik=; 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=iNPW4cMQUyTVwhObjQ950nn1CUWRcRlBGkLwsrNBAtXZSaXitG1fSQ3trMqi+pljsvC+LoIir+ NaV0puw/0WCFo1YxTjfQqwKSlBm+kJQk8laVJtDv41Cn7WQCPhIkYwa940enmF15jm6FwxgrJj B3vXO7hxjy1QJS+qXD6fGqS4Y2Ng9USNiGsyNzgwqhoaHZvfNooHWHUYm+WYA84jVi7aDUisgA MRWYHQm+NbCEZGSB/yr4nbEeoPFtj2dXe5AqRAdkaCIpohfP638Zx/A+r2pAeys0cXCiy/jnKM pWum4MCGXub+qmEEMGOJWVtM8XoNqNQ3+DE1Q9Nke3aaAg==; 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=MhgiuLFDotuhYwDVO/ADeXpRQgi57USTeouSKcYvSDs=; b=JjUQrUtvWHA/SpKpSopbzjO2nJ ksWuBz35djCkNOT64yutPSExyP1Ry6CuhabkWImydw+LzuZZEkpdeHqjM6zyXbq2sWI5F4ahdsaMS H2VrenyDNg97nAppnAmNJmv7uExlkgf1TlUf16gk/8LEikV56Ncf2NH7cA0Jro+0patSieAiX0xNL j6kWFN2OnUX8y1dlOYpZTZBHc+d0lz+rUmzxa+yBx7nH4Vr4EUR+XUz73uwSAWTvYuz9Qs4K6oShA esZqM+CYpwCU2BCvTYSRDPf+CI4ShZj2uRkWc4Vnu431elKhXfbvs4GxCS8ANLKiiXjjxqjEonvI6 K2TvlDZQ==; Received: from authenticated user by zero.zsh.org with local id 1mDulv-000PRg-E7; Wed, 11 Aug 2021 20:24:19 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f43.google.com) smtp.remote-ip=209.85.218.43; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f43.google.com ([209.85.218.43]:45645) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mDul8-000OhX-Qq; Wed, 11 Aug 2021 20:23:31 +0000 Received: by mail-ej1-f43.google.com with SMTP id qk33so6677159ejc.12 for ; Wed, 11 Aug 2021 13:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MhgiuLFDotuhYwDVO/ADeXpRQgi57USTeouSKcYvSDs=; b=stPzuqSUq+dIumam/L63tlFcygHbDOJwoOs4MDcsTygtYPy53EC9mdMVsUBMk4q5Bv SrIzw6cnLm63ngY+gb5utmq7MZqtoEjJBql1+Lq87mnO3mpArxjiFrGCd/7WaptXSl17 hjP79QKk21DHpOUi++BY+buOHljZADALO89BCdJfzMyzQRHQIq/dHrIc2PQMujXiMKKQ kciKC1/gA+l/T/lqiNHugc4LFkN20uWyOnIOG9gveH4IcWdKdqvvhMuxh5EjGE62KYCO jmjHyt5NaO5/Ylb4lMr2t5VrcTlPONYVjF9F5P9kKcmy4hBXK7CgTnWXrl4HCNPni84j auZA== 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; bh=MhgiuLFDotuhYwDVO/ADeXpRQgi57USTeouSKcYvSDs=; b=NjwLPPfWiGssKT8plOocYtlJvhltrAF4iBv+Y9G+UxSoSfcHmghBTWa6oFaNwAYYPW Ys98nIKp/j/kPoD9JK65oTqxHhB588dGEJU1sX9/J9QXcvupPj+mb+w7uRTZqTXKb2oc 1pKp8JPGL3pT7No4J6fp7GcPxwVTPklyfj4KMI60Jrwz3HuUA08b8kJGqOutJeiWW5/B D/0nkFMOycv5MzGJnUdGQplKmxlFbIh8X5x0wAECxUa0N7SJC4T+qj3mYndaKfX31iiX 4dZ8wIKlK4z6ZiYzFM6KJuToLOZt/Nz4r8reEhag2lqMjQ76a60PFed3ORH1mG6dy4WC B5Sw== X-Gm-Message-State: AOAM531B9sPrXt3OalXf9X7YNy6DXDZzrRPkq5U0h3Fl26jFaLivst5V wKzdkdaGPGI+t5Nv60fCW5A4X+Mw5MkpJ8Lq6lk= X-Google-Smtp-Source: ABdhPJxE3C6XfWyHFRhZ7YEA+G0/aWKBdzdYrgn6bEXGta9EIdD3QrtP4OjC9U7otm/tLX59nC5NLUSet8dzNSevY/c= X-Received: by 2002:a17:906:4346:: with SMTP id z6mr265475ejm.403.1628713410549; Wed, 11 Aug 2021 13:23:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?UGV0ZXIgU2zDrcW+aWs=?= Date: Wed, 11 Aug 2021 22:23:13 +0200 Message-ID: Subject: Re: completion does not insert a slash To: Bart Schaefer Cc: Zsh Users Content-Type: multipart/alternative; boundary="00000000000046dc8405c94e64a9" X-Seq: 26916 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: --00000000000046dc8405c94e64a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable OK, more clarification. I've used "zstyle ':completion:*:*:*:*:descriptions'". Now it seems that with the second completed path, the completion engine cannot decide between these two: % cd src/python -- directory after cdablevar -- -- local directory -- 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 "directory after cdablevar" and "local directory" are the same directory anyway. Peter =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 > parentheses). > > I tried to descend into 'src/python/api' by typing 'cd s', later wit= h > src completed, 'cd src/py'. > Here are the results: using the value 'tag-order local-directories > named-directories' helped with completing src/, the directory name was > completed immediately upon hitting Tab. The second dir (python) was not > completed on the first Tab press. Typing another Tab did *not* produce a > list of suggestions. > > Here is the result of 'sr' and 'src/py'. > > % 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) > > 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 liste= d > in a reversed order in the second case. And yes, the empty result list in > the last case. > > Peter > > =D1=81=D1=80=D0=B5, 4. =D0=B0=D0=B2=D0=B3 2021. =D1=83 19:26 Bart Schaefe= r =D1=98=D0=B5 > =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BE/=D0=BB=D0=B0: > >> On Wed, Aug 4, 2021 at 9:50 AM Peter Sl=C3=AD=C5=BEik >> wrote: >> > >> > It seems like the completion engine cannot choose between the named >> directory and a local directory of the same name. In reality, they point= to >> the same dir. >> > >> > Is there a way to fix this behavior? >> >> Yes. The default is to offer all possible completions at the same >> time, but you can change that with the tag-order zstyle. >> >> The default behaves mostly like this: >> zstyle :completion::complete:cd:: tag-order "local-directories >> named-directories" >> (all tags in the same space-separated string are offered at the same tim= e) >> >> What you want is more like this: >> zstyle :completion::complete:cd:: tag-order local-directories >> named-directories >> >> You can reverse the order if you prefer to see the named-directories >> first: >> zstyle :completion::complete:cd:: tag-order named-directories >> local-directories >> >> Anything in a tag you don't include in the list will be offered if >> there are no results for the tags you do list. >> > --00000000000046dc8405c94e64a9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
OK, more clarification. I've used "zsty= le ':completion:*:*:*:*:descriptions'".

Now it se= ems that with the second completed path, the completion engine cannot decid= e between these two:

% cd src/= python<Tab>
-- directory after cdablevar --
-- local directory --

<= /div>Frankly, I still don't understand what the problem is, because I&#= 39;m inside a dir pointed to by a named directory (src/ in this case= ) and both "directory after cdablevar" and "local directory&= quot; are the same directory anyway.

Peter

=D1=81=D1=80=D0= =B5, 11. =D0=B0=D0=B2=D0=B3 2021. =D1=83 22:03 Peter Sl=C3=AD=C5=BEik <<= a href=3D"mailto:peter.slizik@gmail.com">peter.slizik@gmail.com> =D1= =98=D0=B5 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BE/=D0=BB=D0=B0:
So= rry for the late reply, I tried both versions (with and without parentheses= ).

I tried to descend into 'src/python/api' by ty= ping 'cd s<Tab>', later with src completed, 'cd src/py<= ;Tab>'.
Here are the results: using the value 'tag= -order local-directories named-directories' helped with completing src/= , the directory name was completed immediately upon hitting Tab. The second= dir (python) was not completed on the first Tab press. Typing another Tab = did *not* produce a list of suggestions.

Here is t= he result of 'sr<ctrl+x h>' and 'src/py<ctrl+x h>&#= 39;.

% cd sr<ctrl+x h>
tags in context := completion::complete:cd::
local-directories named-directories =C2=A0 = =C2=A0 =C2=A0(_cd)
users named-directories directory-stack =C2=A0(_til= de _cd)
users =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(_user= s _tilde _cd)

% cd src/py<ctrl+x h>
tags in context :comple= tion::complete:cd::
named-directories =C2=A0(_cd)
local-directorie= s =C2=A0(_cd)

% cd src/python/<ctrl+x h>
(no results)

Do you think that there is anything suspic= ious? Personally I wonder why there are duplicated entries in the first cas= e and why are the tags listed in a reversed order in the second case. And y= es, the empty result list in the last case.

Pete= r

=D1=81=D1=80=D0=B5, 4. =D0=B0=D0=B2=D0=B3 2021. = =D1=83 19:26 Bart Schaefer <schaefer@brasslantern.com> =D1=98=D0=B5 =D0=BD=D0= =B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BE/=D0=BB=D0=B0:
On Wed, Aug 4, 2021 at 9:50 AM Peter Sl=C3= =AD=C5=BEik <peter.slizik@gmail.com> wrote:
>
> It seems like the completion engine cannot choose between the named di= rectory and a local directory of the same name. In reality, they point to t= he same dir.
>
> Is there a way to fix this behavior?

Yes.=C2=A0 The default is to offer all possible completions at the same
time, but you can change that with the tag-order zstyle.

The default behaves mostly like this:
zstyle :completion::complete:cd:: tag-order "local-directories
named-directories"
(all tags in the same space-separated string are offered at the same time)<= br>
What you want is more like this:
zstyle :completion::complete:cd:: tag-order local-directories named-directo= ries

You can reverse the order if you prefer to see the named-directories first:=
zstyle :completion::complete:cd:: tag-order named-directories local-directo= ries

Anything in a tag you don't include in the list will be offered if
there are no results for the tags you do list.
--00000000000046dc8405c94e64a9--