Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG REPORT] Nonsensical behavior in response to Tab key



This is by no means all that could be said, but just to
get started...

BTW this is more of a zsh-users topic at this point and
there could well be people not on zsh-workers that have
some usage tips.

On 10/11/2022 14:55 php fan <php4fan@xxxxxxxxx> wrote:
> And often, in that situation, I get behavior that differs
> significantly from other shells. I understand that I have a bias
> towards considering the behavior I'm used to "right" and anything new
> (zsh's behavior) "wrong", but in most cases I can't understand the
> rationale behind zsh's behavior and I'm pretty sure that in many cases
> it's plain wrong.

Zsh is highly configurable and you'll need to understand the possibilities
and how to set it up closest to the way you want before going further
down this road.

I guess you're using some vanilla configuration, but you should certainly
make sure whatever is going on it's running "compinit", or you'll get
the old builtin behaviour, which is certainly not recommended.  See
below if this currently means nothing to you.

Apart from the shell options in the shell documentation (a pretty
dense read), you could look at the (somewhat dated --- it's many years
since I touched it --- but still mostly valid) online user guide,

https://zsh.sourceforge.io/Guide/zshguide06.html

See further down in section 6.3 if the reference to "compinit" meant nothing.

For a more professional production, see Oliver's notes in the From Bash
To Zsh book, available everywhere browsers are connected to booksellers.
https://www.bash2zsh.com

> 1) I am inside a directory that contains the following two directories:
> 
>     AddonsLab_LinkBack
>     AddonsLab_LinkChecker
> 
> plus many others with names starting with "AddonsLab_"
> 
> 2) I start typing "cd Addons" and hit the Tab key
> 
> As expected that gets partially autocompleted until "cd AddonsLab_" and stops
> 
> 3) I continue typing until I have "cd AddonsLab_Link" and I hit Tab again
>
> 1) It partially autocompletes to "cd AddonsLab_Linkc" ending with a
> lowercase "c". That makes no sense whatsoever.

That's certainly screwy, but you're not getting basic zsh behaviour here,
and I'm not going to try to speculate what is happening.  If you're
interested enough (sounds like you are) you'll need to backtrack a bit
and find out what configuration you do have.  Probably best to start from
my previous comments (others may have info suggestions).

Probably someone in these parts, or zsh-users, knows more about what's
set up on your distro, with which I'm not familiar.

pws




Messages sorted by: Reverse Date, Date, Thread, Author