zsh-users
 help / color / mirror / code / Atom feed
From: "Peter Slížik" <peter.slizik@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: <Tab> completion does not insert a slash
Date: Mon, 16 Aug 2021 23:39:47 +0200	[thread overview]
Message-ID: <CAC-uhUB_2jfocrm8MsohFZGUeo3sXW-fEEugTP0yU6Ef688rUA@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bfH5w_U3CEvU9ea_wH6DsNVsurFNDcdiS=fvLyrOiFiA@mail.gmail.com>

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

>
>
> Are there any subdirectories inside src/python/ ?  The only case in
> which I can get this to reproduce is when there's nothing more to
> complete.
>

Yes, there are four subdirectories and a bunch of files.

% ls src/python/
API CMakeFiles CMakeLists.txt XYZ Makefile.am Apps, etc.

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).

# All the following provide the same result:
% cd src/pyt<Ctrl+D>
% cd src/python<Ctrl+D>
% cd src/python/<Ctrl+D>    # the final slash is transient
-- directory after cdablevar --
-- local directory --
python/

But in this case, the result is different.
% cd src/python/<Ctrl+D>    # the final slash is real
-- directory after cdablevar --
-- local directory --
API/         Apps/        CMakeFiles/  XYZ/

Maybe the behaviour is expected, but I would expect the transient slash to
work exactly the same way a real slash does.

After I've discovered the 'description' zstyle option, I'm observing how
the completion works and find it even more confusing.
For example, in my Ubuntu system, the standard 'watch' command is located
in /usr/bin. The /bin dir is actually a symlink to the /usr/bin/dir. And I
have an alias called 'which', which expands to itself and adds two extra
arguments.

% whence -a watch
watch --interval=0.3 tail -50
/usr/bin/watch
/bin/watch

BUT, 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

% wat<Ctrl+D>
-- external command --
-- alias --
-- parameter --
watch       watchbm     watchgnup

The <Ctrl+X>? log file is quite long (3961 lines); I'm not sure how to make
sense of it.

Best regards,
Peter

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

  reply	other threads:[~2021-08-16 21:41 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 [this message]
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-uhUB_2jfocrm8MsohFZGUeo3sXW-fEEugTP0yU6Ef688rUA@mail.gmail.com \
    --to=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).