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

Re: compinit and promptinit fail on virtual terminal

On Mon, 14 Sep 2009, Stephan Friedrichs wrote:

> Hi,
> whenever I start zsh in gnome-terminal or xterm, I get this error:
>  /home/igel/.zshrc:2: compinit: function definition file not found
>  /home/igel/.zshrc:3: promptinit: function definition file not found
>  /home/igel/.zshrc:3: command not found: prompt
> The funny thing is, that when starting zsh on a TTY, (or via 'su' in a
> 'screen' on a virtual terminal) it works just fine. A simple .zshrc to
> reproduce the problem looks like this:
>  autoload -U compinit promptinit
>  compinit
>  promptinit; prompt gentoo
> I have no clue about the origin of the error, there have been no updates
>  of zsh itself, zsh-completion or the terminals. I never modified
> /etc/zsh/zprofile. The error just started happening after a reboot.
> Rebuilding zsh didn't help.

If it helps narrow it down, I don't have this problem on Gentoo (also 
amd64) w/ app-shells/zsh-4.3.10.  But a difference is that I don't have 
zsh-completion installed (I use paludis, not portage).

I noticed that zsh-completion has a version number of '20080310', which 
predates the release of both 4.3.9 and 4.3.10 (so your downgrade to 4.3.9 
might not have avoided some interaction between the two).  Try backing off 
to 4.3.6 to see if it still occurs [scratch that, try 4.3.4-r1; even 4.3.6 
was late March, 2008].  Maybe just try removing zsh-completion entirely, 
to see if it's the problem.

Otherwise, my question would be, what other .zsh files might you have?  I 
didn't pare it down to the minimal .zshrc you posted (I've got too much 
else going on in mine), but your first post on the Gentoo forum thread 
looked like it was searching in .config/zsh/modules in your home 
directory, which seems odd to me.


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