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 16:19:12 +0100	[thread overview]
Message-ID: <20100728161912.08648daa@csr.com> (raw)
In-Reply-To: <AANLkTinJ-FCXpxALUWHRUVOMP+7bo_boHE3JM87FJQr5@mail.gmail.com>

On Wed, 28 Jul 2010 15:43:20 +0200
Jerry Rocteur <jerry.rocteur@gmail.com> 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 <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 15:49 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
2010-07-28 13:43   ` Jerry Rocteur
2010-07-28 15:19     ` Peter Stephenson [this message]

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=20100728161912.08648daa@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).