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

Functions, sourcing and compinit: function definition file not found.



Hi all,

I'm having a bit of a weird problem here that I hope you can help me
with. I've got a fairly simple function called "reload" which looks like
this:
if [[ "$#*" -eq 0 ]]; then
		source ${zdotdir}/.zshenv
		source ${zdotdir}/.zshrc
	else
		local fn
		for fn in "$@"; do
			unfunction $fn
			autoload -U $fn
		done
	fi

The second half works just fine: calling "reload some_function" works as
expected, but the first half throws a funny error:

  /home/borior/.zshrc:106: compinit: function definition file not found

Now line 106 looks a bit like this:

   102  zshrc_load_status "completions"
   103
   104  # Load completions
   105  autoload -U compinit
   106  compinit -u

The really odd part of this story comes when I tell you that "source ${zdotdir}/.zshrc" works absolutely fine from the shell. No
error from compinit whatsoever.

This is zsh 4.3.2 (i386-portbld-freebsd6.1), but IIRC it's replicable on
other systems and versions of zsh.

Any ideas would be much appreciated (especially if you could CC to me
directly, as I'm not subscribed to the ML).

Regards,
Nick

Attachment: pgpbsJ5uTYNOR.pgp
Description: PGP signature



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