Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26776 - zsh 4.1.X cannot tab-complete
Summary: zsh 4.1.X cannot tab-complete
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mamoru KOMACHI (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-16 23:39 UTC by Charlton Harrison
Modified: 2003-08-28 02:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
typescript file of my emerge output (for zsh-4.1.1) (typescript1,170.00 KB, text/plain)
2003-08-17 11:55 UTC, Charlton Harrison
Details
script output of the new zsh session with bug reproduced. (typescript2,9.20 KB, text/plain)
2003-08-17 11:58 UTC, Charlton Harrison
Details
output of emerge info on 3 different gentoo machines that have this problem (emerge_infos,4.06 KB, text/plain)
2003-08-17 17:10 UTC, Charlton Harrison
Details
My .zshrc file. (zshrc,5.45 KB, text/plain)
2003-08-18 08:07 UTC, Charlton Harrison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlton Harrison 2003-08-16 23:39:33 UTC
This occurs with both zsh-4.1.0-pre7 and zsh-4.1.1.  zsh-4.0.6-r4 and 4.0.7 do
not have this problem.

Reproducible: Always
Steps to Reproduce:
1. emerge app-shells/zsh
2. start a new zsh session
3. try tab-completion

Actual Results:  
^Mbach *ROOT* /root [1]>cd /usr/sh_normal:23: command not found: _set_command
_normal:25: command not found: _dispatch
are/zsh_normal:23: command not found: _set_command
_normal:25: command not found: _dispatch


Expected Results:  
bach *ROOT* /root [15]>cd /usr/share/zsh...
Comment 1 Charlton Harrison 2003-08-16 23:48:17 UTC
I have already been working with Mamoru KOMACHI <usata@gentoo.org> on this.  I also have the output of my emerge zsh available.
Comment 2 Kurt Lieber (RETIRED) gentoo-dev 2003-08-17 03:34:10 UTC
assigned to incorrect product (New Developers instead of Gentoo Linux)

re-assigning.
Comment 3 Charlton Harrison 2003-08-17 11:55:55 UTC
Created attachment 16217 [details]
typescript file of my emerge output (for zsh-4.1.1)

Here's the output I recorded of my emerge zsh-4.1.1.
Comment 4 Charlton Harrison 2003-08-17 11:58:55 UTC
Created attachment 16218 [details]
script output of the new zsh session with bug reproduced.

My new zsh-4.1.1 session with bug reproduced.
Comment 5 Charlton Harrison 2003-08-17 17:10:59 UTC
Created attachment 16239 [details]
output of emerge info on 3 different gentoo machines that have this problem
Comment 6 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-18 02:27:37 UTC
Hi, I created zsh binary package with all USE flags turned on 
(that means I made it statically).  The binary can be found at
http://dev.gentoo.org/~usata/GRP/zsh-4.1.1.tbz2
Please test it and report if this binary has the same problem.
(mv zsh-4.1.1.tbz2 /usr/portage/packages/All && emerge zsh-4.1.1.tbz2)
Comment 7 Charlton Harrison 2003-08-18 02:48:15 UTC
Nope,  still has same problem.
I copied the http://dev.gentoo.org/~usata/GRP/zsh-4.1.1.tbz2 file to /usr/portage/packages/All and then I emerged zsh-4.1.1.tbz2.
I then ran the new zsh (which reported "zsh 4.1.1 (i686-gentoo-linux-gnu)" when I did a zsh --version),  and I still had the same problem with the same messages coming up when I tried to do tab-completion.
Comment 8 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-18 03:15:07 UTC
If it doesn't solve the issue, probably it is a problem with your configuration file rather than compilation.  Do you mind attaching your .zshrc, .zshenv, .zlogin and .zprofile (if exists)?  
Comment 9 Charlton Harrison 2003-08-18 08:06:02 UTC
I believe you might be onto something.  When I move .zshrc to .zshrc.old and restart a zsh session,  I do not have the problem anymore...
Attached is my .zshrc file.
Comment 10 Charlton Harrison 2003-08-18 08:07:24 UTC
Created attachment 16270 [details]
My .zshrc file.

I'm using this .zshrc file on all of my systems.  So it's probably something in
here that's prompting/causing the problem.
Comment 11 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-19 04:43:01 UTC
I tried using zsh with your .zshrc but failed to reproduce the problem.
Can you do binary search (or whatever you like) your .zshrc and find 
what is broken?
Comment 12 Charlton Harrison 2003-08-19 08:38:20 UTC
It's these 2 lines in my .zshrc that seem to be prompting the problem:

## Set auto-completion
autoload -U compinit
compinit -C

If I comment these lines out,  zsh seems to work as expected.  Perhaps these lines do not follow the new zsh syntax or something?
Comment 13 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-19 08:56:38 UTC
I see.  From zshcompsys(1), it says:
"If the number of completion files changes, compinit will recognise this
and produce a new dump file. ... The check performed to see if there are 
new functions can be omitted by giving the option -C. In this case the
dump file will only be created if there isn't one already. ..."

So when you have a dump file (in 4.0.x layout) and use compinit with -C
option, zsh try to use the completion dump file even though its major
version has changed.  I think once you run compinit without -C (to 
re-create your completion dump file into 4.1.x layout), the problem
will be solved.  
Comment 14 Charlton Harrison 2003-08-19 12:01:42 UTC
You are right.

Once I removed my old .zcompdump file,  the problem went away.

I would recommend moving this bug to "resolved" status - but first, perhaps there should be a yellow-star (notice) after the new zsh has been emerged (in the ebuild) to remove all .zcompdump files?
Just a thought because otherwise there was no way I would have known.
Comment 15 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-20 03:23:16 UTC
I added a notice about completion for users upgrading from 4.0.x.
Thanks for helping the development with us :)
Comment 16 Owen Gunden 2003-08-27 22:48:52 UTC
Any chance someone can switch zsh 4.1.0-pre7 back to x86?  It was switched to ~x86 when this bug came up.  Thanks :).
Comment 17 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-08-28 02:20:28 UTC
Hi, I will change zsh-4.1.1 stable (I confirmed it is fairly stable now)
as soon as Bug #27392 is solved.  The problem is that zsh-4.x is
compiled with libpcre which is located in /usr/lib while zsh-4.x is
compiled without it, and we should either move zsh out of /bin or move
libpcre to /lib (if there is no other nice solution).  Any comments
are welcomed.  It's a kind of headache ;-(