From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4236 invoked by alias); 28 Jul 2010 13:29:55 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15202 Received: (qmail 2753 invoked from network); 28 Jul 2010 13:29:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Wed, 28 Jul 2010 14:29:44 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: zfinit problem in ksh emulation mode Message-ID: <20100728142944.7a7c2a94@csr.com> In-Reply-To: References: Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Jul 2010 13:29:44.0452 (UTC) FILETIME=[F0F10C40:01CB2E58] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.71.0.128 On Wed, 28 Jul 2010 13:36:42 +0200 Jerry Rocteur 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 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