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 488 invoked from network); 11 Aug 2021 20:04:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Aug 2021 20:04:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628712280; b=NZ0rUSdoFw9DaAPsTWOUe/K+aO4A+6liKVKAna+qvC7mJxJb/kFybb1PJ4eiZ0PNBp3cAO4qPA m3sWHQCbe593AYR14yvLuDUVU+F7s8TDRQl9na/NGGISHV5kYrgZKe5uOCetYzSzS0X0Ydxdz3 WJT2PYSerGXgC3uY8wvQ7E2XmfyHVxJTbgtBClKGOQ47jThPp51UBT6JFq5batWg44lwhDIPig zePl646hCtOx5t7JjQRB2FioBrZ4VSekS8mz7Ni+oCia2VV8adJQ3bSx55lKCo4nJGp5XtZUHB PujSiZCuTma1HfFnsEfBmxbo9B4hpIwPE664szqpZ/IUAg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; 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=1628712280; bh=HI+fZ+YqhB+68Nt9Q/tKYJOD+CoKzk5mlpRmvuSafYY=; 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=XuwF3aGRJp2xKsMn8VywwXh4MG6933U2MQ21LDHWUNf7oa7DjNtj8OMmhlHLePcSG75ceFe1Mv QW2kuxvGFcf1EybhRnNURIEnV3M0/ckjg8ShTo2KX9G03OmEaLMKqcU39QcJB1dXFtKHGpbiAW d4uf5e/SEU7C7TrNWARgt9z+EtShOKbwOEk7SBtbMUOASTdSgluM9Zp43buRapm3ffNJxUywBL F2FPqUVJTD7a4loAQhnlY+rAbVJXTlLayhhHet3sMHJCzV0HxiTnPPGuFjxS15h4m10Knz9RDH TyrflkKve9QNJBFjFiGPdP4DPd005gGeo9BSh6IGtazq5Q==; 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=Sd6O23nTDodIAIMv4ouvqWueTDdQ6Zcy1/HkQPIsw+E=; b=nMOYHVDgDPytvAaNh/rk7yFRQR CQbALwV3GMFhmkGSfJjUPxNUSlnEZmyDQUISU+NJH88DdAXNkd/gesyNQ6O3mUNTc89QQbeVDcbn3 WGOALOdUQTJFGKkNHi451pDqqAFjWvMnmV6fAmMz0I6m249ov52daT3z90sIOX6z8TwX9XzSMfdsT zfjr0iKqf051Nai/TCZakpT2lUQB3hIe3RW4L5JhVLy1o+sYyq/gMXSBEVFZroL0Cwm88TWEcYuUQ Lqrg883G4kFkEupifG/OPfbotHAEzHJgsHTggbjkZMCnlV15V/TyzI+BfmUn+O4aaPghoCKzRjK1G 29Kyv1VQ==; Received: from authenticated user by zero.zsh.org with local id 1mDuSt-000NTE-9Q; Wed, 11 Aug 2021 20:04:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; 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-f51.google.com ([209.85.218.51]:34467) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mDuRy-000MkI-3H; Wed, 11 Aug 2021 20:03:42 +0000 Received: by mail-ej1-f51.google.com with SMTP id u3so6662336ejz.1 for ; Wed, 11 Aug 2021 13:03:42 -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=Sd6O23nTDodIAIMv4ouvqWueTDdQ6Zcy1/HkQPIsw+E=; b=u1yBO5YwRbStn0dAB6rDErzS39jLpeh56n9yO11AlgVsK7xLtzScd+5+tUNclhwNhf t+a53cx1+/rTlmuD32uGXnMqgJDU/DdEEgdo/drNnN6N0rzY22mSf9rb8LfvZslQE6M2 dsxz5g32qzGEMojLKfpzbzCa3CJwn3meKsZtTDocpbEzUp4lrDh+iGtD9rnqrr5/L5rT LtxcNlsrQhv89PnpIHTuqeWfQf3qwkidfTV/v2/4cf6lzvnU944jpaImDfH1xRvdSRZE L//s12/9yWnZKgyUkck/hagXBee6OgnNixssVkTYsJ6auLlwgPlcpn0jPWd8vDswhoCV qHjQ== 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=Sd6O23nTDodIAIMv4ouvqWueTDdQ6Zcy1/HkQPIsw+E=; b=CaOMYH75YayPBMgeAlNENz7vTmH1gkePlxAf+JbSDcmXtEtDRc2GPzWoXmEM93X4FL w4xPVwIiWB9SFBUqCJjeGexcPdsZ0HPYnG32+QH9TiM7S7vTv/DTQZcZxUeFOT7qUgUK gLFD5HwReadWMJv3fqsr9GEjG+SqeHzBP58nTOBKZSPA7G8nvkEBKeyn/O4UahQ+90C9 0yu4MTEn/g4ucwSeoqC9+k/fJNoUQi+nXwpOLTwpmNLnP/iEQMWnlNg09OoftQRcfAOI ZWJ05X93HA+cg3b88JKiNXCMK1mGgvyL7hS9LDrjVVwSMdHf/3eW0p+H2thJr++69omy NhDA== X-Gm-Message-State: AOAM531jADYT8QdQ5EyjqEly3aZhhnhVkWKyKunCvGP7LDlNYesrQA/E tWCxTcwsTxoUtWlVCKQSXQZ7Q1GsXFpbSg/bjzohVbYFdXo= X-Google-Smtp-Source: ABdhPJwxKQSIxlzO2r+LszYI2FYixMLcdwlat1oEdcc50VnrwbFGtzXvHJphcd+VauEfGpULkLq3AjcgVhsCnsy3a6M= X-Received: by 2002:a17:906:4346:: with SMTP id z6mr187453ejm.403.1628712221463; Wed, 11 Aug 2021 13:03:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?UGV0ZXIgU2zDrcW+aWs=?= Date: Wed, 11 Aug 2021 22:03:24 +0200 Message-ID: Subject: Re: completion does not insert a slash To: Bart Schaefer Cc: Zsh Users Content-Type: multipart/alternative; boundary="00000000000066da0505c94e1d96" X-Seq: 26915 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: --00000000000066da0505c94e1d96 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 with 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 listed 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 Schaefer = =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 time= ) > > 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 firs= t: > 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. > --00000000000066da0505c94e1d96 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry for the late reply, I tried both versions (with= and without parentheses).

I tried to descend into 's= rc/python/api' by typing 'cd s<Tab>', later with src comp= leted, 'cd src/py<Tab>'.
Here are the results: = using the value 'tag-order local-directories named-directories' hel= ped with completing src/, the directory name was completed immediately upon= hitting Tab. The second dir (python) was not completed on the first Tab pr= ess. Typing another Tab did *not* produce a list of suggestions.
=
Here is the result of 'sr<ctrl+x h>' and '= src/py<ctrl+x h>'.

<= /span>
% cd sr<ctrl+x h&= gt;
tags in context :completion::complete:cd::
local-directories nam= ed-directories =C2=A0 =C2=A0 =C2=A0(_cd)
users named-directories direc= tory-stack =C2=A0(_tilde _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(_users _tilde _cd)

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

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

Do you think tha= t there is anything suspicious? Personally I wonder why there are duplicate= d entries in the first case and why are the tags listed 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 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 Pet= er 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.
--00000000000066da0505c94e1d96--