zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Peter Slížik" <peter.slizik@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: <Tab> completion does not insert a slash
Date: Mon, 16 Aug 2021 15:17:31 -0700	[thread overview]
Message-ID: <CAH+w=7aC2YDym40K3rY=OnFVjSjqYW29EY+U3trXyVdo0J0FFg@mail.gmail.com> (raw)
In-Reply-To: <CAC-uhUB_2jfocrm8MsohFZGUeo3sXW-fEEugTP0yU6Ef688rUA@mail.gmail.com>

On Mon, Aug 16, 2021 at 2:40 PM Peter Slížik <peter.slizik@gmail.com> wrote:
>
> What strikes me is that the completion provides different results depending on whether the final slash is real or "transient" (hopefully I'm using correct terminology).
>
> Maybe the behaviour is expected, but I would expect the transient slash to work exactly the same way a real slash does.

No, it doesn't.  The transient slash is just showing you that this is
in fact a directory.  You still actually have to type either a slash,
or one non-tab character after the slash, to make it "real" before
completion will proceed deeper down the tree, otherwise you're just
cycling the menu at the preceding input position.

> After I've discovered the 'description' zstyle option, I'm observing how the completion works and find it even more confusing.
> [...] trying to complete it in a command position identifies it either as a named directory, or as a parameter. (?!)
>
> % wa<Ctrl+D>
> -- external command --
> -- executable file --
> -- builtin command --
> -- alias --
> -- parameter --
> -- named directory --
> wait         wallpapers/  wapps        watchbm
> wall         wapi         watch        watchgnupg

The descriptions here are showing you every place from which a
completion string was gathered, but then all the completions are
lumped together at the end.  (That is, you get all the descriptions,
and then all the completions.)  If you actually want the completion
strings to appear immediately after each description, you have to add

zstyle ':completion:*' group-name ""


  parent reply	other threads:[~2021-08-16 22:18 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
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 [this message]
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='CAH+w=7aC2YDym40K3rY=OnFVjSjqYW29EY+U3trXyVdo0J0FFg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=peter.slizik@gmail.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).