Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zfinit problem in ksh emulation mode
- X-seq: zsh-users 15204
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: zfinit problem in ksh emulation mode
- Date: Wed, 28 Jul 2010 16:19:12 +0100
- In-reply-to: <AANLkTinJ-FCXpxALUWHRUVOMP+7bo_boHE3JM87FJQr5@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <AANLkTik1GPGh+erS9eHdjZBnZnsrFX7BiJVxWpo3G_Ud@xxxxxxxxxxxxxx> <20100728142944.7a7c2a94@xxxxxxx> <AANLkTinJ-FCXpxALUWHRUVOMP+7bo_boHE3JM87FJQr5@xxxxxxxxxxxxxx>
On Wed, 28 Jul 2010 15:43:20 +0200
Jerry Rocteur <jerry.rocteur@xxxxxxxxx> 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@xxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author