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

Re: zfinit problem in ksh emulation mode



On Wed, Jul 28, 2010 at 15:29, Peter Stephenson <Peter.Stephenson@xxxxxxx>wrote:

> On Wed, 28 Jul 2010 13:36:42 +0200
> Jerry Rocteur <jerry.rocteur@xxxxxxxxx> wrote:
> > I have a problem running zfinit in ksh emulation ( running zsh as a
> > link from /usr/bin/ksh )
> >
> > When I try:
> >
> > user@zambezi: autoload -U zfinit
> > user@zambezi: zfinit
> > zsh: zfinit: function not defined by file
>
> "autoload -Uz zfinit" is a better bet, to force zsh-style autoload.
>
> Unfortunately we're not very consistent about using those flags in the
> distributed functions, so while it'll probably run it might not do the
> trick with the other zftp functions since zfinit currently runs just
> "autoload -U ..." with the effects you've just seen.  I'll apply a very
> boring patch that fixes up every autoload under Functions in the
> distribution, unless anybody knows of an exception (which would surprise
> me).
>
> Until then, you might want to modify zfinit by hand to replace all the
> "autoload -U"s with "autoload -Uz".  After that you might be OK, since I
> was more successful with putting "emulate -L zsh" at the top of functions.
>

Thanks Peter, I can't change all the installation, I did try the -Uz zfinit
but then it failed with zfparams: function not defined.

I may be out of luck until they install an updated copy here!

> Is there some option I can set in my script so that when my script
> > runs as:
> >
> > #!/usr/bin/ksh
> >
> > That this will work ...
>
> The obvious one to try is "unsetopt kshautoload".
>
> I tried it but then when running zfinit I get:

zfinit:42: command not found: compctl
zfinit:50: command not found: compctl
zfinit:51: command not found: compctl
zfinit:52: command not found: compctl
zfinit:53: command not found: compctl
zfinit:58: command not found: compctl
zfinit:67: command not found: compctl

I can still write the scripts to run on my system but will have to wait for
a new version of zsh here before I can write production scripts

Thanks for the answer!

Cheers,

Jerry


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