zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <Peter.Stephenson@csr.com>
To: zsh-users@zsh.org
Subject: Re: zfinit problem in ksh emulation mode
Date: Wed, 28 Jul 2010 14:29:44 +0100	[thread overview]
Message-ID: <20100728142944.7a7c2a94@csr.com> (raw)
In-Reply-To: <AANLkTik1GPGh+erS9eHdjZBnZnsrFX7BiJVxWpo3G_Ud@mail.gmail.com>

On Wed, 28 Jul 2010 13:36:42 +0200
Jerry Rocteur <jerry.rocteur@gmail.com> 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.

> 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".

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


  reply	other threads:[~2010-07-28 13:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 11:36 Jerry Rocteur
2010-07-28 13:29 ` Peter Stephenson [this message]
2010-07-28 13:43   ` Jerry Rocteur
2010-07-28 15:19     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100728142944.7a7c2a94@csr.com \
    --to=peter.stephenson@csr.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).