FS#30856 - zsh: missing compdef

Attached to Project: Arch Linux
Opened by John (gee) - Thursday, 26 July 2012, 07:45 GMT
Last edited by Eric Belanger (Snowman) - Sunday, 29 July 2012, 23:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Since 5.0.0-1, and same with 5.0.0-2, compdef has been not available:
/etc/zsh/zshrc:526: command not found: compdef
/etc/zsh/zshrc:527: command not found: compdef

Going back to 4.3.17-2 (the latest one before 5.0.0 was released) solves the problem.

Is this a missing dependency or something broke?

Thanks!
This task depends upon

Closed by  Eric Belanger (Snowman)
Sunday, 29 July 2012, 23:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  The config file change fixed the issue.
Comment by Pierre Schmitz (Pierre) - Thursday, 26 July 2012, 12:31 GMT
So "which compdef" has no output for you? This works fine for me; might be something wrong in your zshrc.
Comment by John (gee) - Thursday, 26 July 2012, 15:00 GMT
Could very well be.

I only have these:


compdef _pacman pacman-color=pacman
compdef _pacman yaourt=pacman
Comment by Daniel Wallace (gtmanfred) - Thursday, 26 July 2012, 15:03 GMT
don't compdef yaourt... there is a zsh-yaourt package in the aur, and there is also yaourt zsh completion in the aur package zsh-completion and zsh-completion-git
Comment by John (gee) - Thursday, 26 July 2012, 15:15 GMT
ok, I still get the same issue with the pacman-color line.
Is there something else I should do?

Thanks!
Comment by Daniel Wallace (gtmanfred) - Thursday, 26 July 2012, 15:19 GMT
put it after you have loaded compinit in your .zshrc

autoload -Uz compinit && compinit
you have to load the module that has compdef in it before you can use it
Comment by John (gee) - Thursday, 26 July 2012, 15:24 GMT
I have this already before:

is4 && autoload -U compinit && compinit

I am not sure what differences there are between your line and this one though, I have not looked at zshrc in years, but with yours it works.

What are the differences?

Thanks!
Comment by John (gee) - Thursday, 26 July 2012, 15:26 GMT
Oh I guess is4 was only calling this for version 4.x...
not sure about -U vs -Uz yet.
Comment by Daniel Wallace (gtmanfred) - Thursday, 26 July 2012, 15:33 GMT
possible that is4 was failing, as I just get command not found, so then anything after the && wasn't executing
Comment by John (gee) - Thursday, 26 July 2012, 15:47 GMT
Most likely yes.
I guess that is the risk of getting a config file from a template online and forgetting about it later...

Thank you for your help.

Loading...