zsh-users
 help / color / mirror / code / Atom feed
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, 4 Aug 2021 18:49:59 +0200	[thread overview]
Message-ID: <CAC-uhUA3dDDKQzdSNp9iBDU=X2tUSZcGpZ9iXRvZXyhBvz+v4g@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7aBE=yhf2jQYxCJW_QZO+xTjRXDk_X0WusS2fBVaEdi0w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

Ok, my suspicion is that the problem occurs if the completed name can
expand to both a named directory and a local directory.

My directory structure:
/workdirs/projects/myproject/src/python/mymodule/submodule

# Define a named directory
src=/workdirs/projects/myproject/src
: src

# cd inside the tree
cd /workdirs/projects/myproject

# try to go deeper
cd sr<Tab>      # completes 'sr' to 'cd src' (without a slash)
cd src<Tab>    # another tab - emits a bell sound
cd src<Tab>    # yet another tab - add a slash: 'src/'

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?
I'm using a lot of named directories, they are very convenient. In fact,
they are the main reason I switched to zsh.

Peter

Here,

сре, 4. авг 2021. у 17:45 Bart Schaefer <schaefer@brasslantern.com> је
написао/ла:

> On Wed, Aug 4, 2021 at 8:02 AM Peter Slížik <peter.slizik@gmail.com>
> wrote:
> >
> > As I said, I have a lot of settings in my .zshrc and I don't know which
> of them could make the change in completion behavior. Could you kindly
> point me where to start or how to trace the problem?
>
> The place to start is nearly always to first type ctrl+x h instead of
> tab, to get a description of the context, and if that doesn't help,
> type ctrl+x question-mark in place of tab, to invoke completion
> debugging, which leaves a trace file in /tmp.
>

[-- Attachment #2: Type: text/html, Size: 2260 bytes --]

  reply	other threads:[~2021-08-04 16:51 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 [this message]
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
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-uhUA3dDDKQzdSNp9iBDU=X2tUSZcGpZ9iXRvZXyhBvz+v4g@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).