From: "Peter Slížik" <peter.slizik@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: <Tab> completion does not insert a slash
Date: Wed, 11 Aug 2021 22:03:24 +0200 [thread overview]
Message-ID: <CAC-uhUB6jM9=8AAGHwmPkuM=tfgZtXJ9XVDnrLqrWR0q_DtBHg@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bn3Jt8N=L5oy9f2suDk8WDr26yx-53+n1XmkG+dQ+eZg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2387 bytes --]
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<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 the result of 'sr<ctrl+x h>' and 'src/py<ctrl+x h>'.
% cd sr<ctrl+x h>
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<ctrl+x h>
tags in context :completion::complete:cd::
named-directories (_cd)
local-directories (_cd)
% cd src/python/<ctrl+x h>
(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
сре, 4. авг 2021. у 19:26 Bart Schaefer <schaefer@brasslantern.com> је
написао/ла:
> On Wed, Aug 4, 2021 at 9:50 AM Peter Slížik <peter.slizik@gmail.com>
> 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 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.
>
[-- Attachment #2: Type: text/html, Size: 3446 bytes --]
next prev parent reply other threads:[~2021-08-11 20:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 15:02 Peter Slížik
2021-08-04 15:45 ` Bart Schaefer
2021-08-04 16:49 ` Peter Slížik
2021-08-04 17:26 ` Bart Schaefer
2021-08-11 20:03 ` Peter Slížik [this message]
2021-08-11 20:23 ` Peter Slížik
2021-08-11 22:20 ` Bart Schaefer
2021-08-16 21:39 ` Peter Slížik
2021-08-16 21:41 ` Peter Slížik
2021-08-16 22:17 ` Bart Schaefer
2021-08-17 8:57 ` Peter Slížik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAC-uhUB6jM9=8AAGHwmPkuM=tfgZtXJ9XVDnrLqrWR0q_DtBHg@mail.gmail.com' \
--to=peter.slizik@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).