From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89 invoked by alias); 28 Jul 2010 15:49:03 -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: 15204 Received: (qmail 9452 invoked from network); 28 Jul 2010 15:48:57 -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 16:19:12 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: zfinit problem in ksh emulation mode Message-ID: <20100728161912.08648daa@csr.com> In-Reply-To: References: <20100728142944.7a7c2a94@csr.com> 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 15:19:12.0806 (UTC) FILETIME=[3BFC5460:01CB2E68] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.68.0.115 On Wed, 28 Jul 2010 15:43:20 +0200 Jerry Rocteur wrote: > Thanks Peter, I can't change all the installation, I did try the -Uz > zfinit but then it failed with zfparams: function not defined. You can copy zfinit somewhere earlier in your FPATH, which you might need to set explicitly in your script (fpath doesn't work in ksh mode). > > 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 You don't need compctl. I think the problem is simply that it's not autoloaded (as a builtin from a library) in ksh mode. This a rather different issue and compctl is thouroughly out of date anyway; I probably need to check if compctl is present. This should be harmless, in fact. Index: Functions/Zftp/zfinit =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfinit,v retrieving revision 1.3 diff -p -u -r1.3 zfinit --- Functions/Zftp/zfinit 28 Jul 2010 13:33:59 -0000 1.3 +++ Functions/Zftp/zfinit 28 Jul 2010 15:18:28 -0000 @@ -34,7 +34,8 @@ autoload -Uz zfstat zftp_chpwd zftp_prog # zftp completions: only use these if new-style completion is not # active. # -if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)_zf*]} ]]; then +if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)_zf*]} ]] && + (compctl >/dev/null 2>&1); then # only way of getting that noglob out of the way: this is unnecessary with # widget-based completion setopt completealiases -- 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