zsh-users
 help / color / mirror / code / Atom feed
* ISP OS upgrade = zsh function-files not found
@ 2009-03-26  6:09 rj
  2009-03-26  6:49 ` Phil Pennock
  0 siblings, 1 reply; 8+ messages in thread
From: rj @ 2009-03-26  6:09 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 2710 bytes --]

I use zsh-4.3.9 on 2 ISPs: one is a NetBSD, the other FreeBSD.  The FreeBSD
just ugraded to FreeBSD 7.1-RELEASE #0, and, in doing so, from zsh-4.3.4 to
4.3.9.

Since the FreeBSD upgrade, at login I get:

/u/q/.zshrc:174: promptinit: function definition file not found
/u/q/.zshrc:177: is-at-least: function definition file not found
/u/q/.zshrc:178: compinit: function definition file not found
/u/q/.zshrc:179: colors: function definition file not found


In .zshrc I have:

171 # where to look for autoloaded function definitions:
172 fpath=(/usr/local/share/zsh/4.3.9/functions $HOME/.zfunc)
173
174 autoload -U promptinit; promptinit
175
176
177 autoload -U is-at-least; is-at-least
178 autoload -U compinit; compinit
179 autoload -U colors; colors


But that FreeBSD zsh function-defs directory,
/usr/local/share/zsh/4.3.9/functions, looks like this:

drwxr-xr-x 13 root wheel    512 Mar 23 14:24 ./
drwxr-xr-x  4 root wheel    512 Mar 23 14:24 ../
drwxr-xr-x  2 root wheel    512 Mar 23 14:24 Calendar/
-rw-r--r--  1 root wheel  80144 Mar 23 14:24 Calendar.zwc
drwxr-xr-x 14 root wheel   1024 Mar 23 14:24 Completion/
-rw-r--r--  1 root wheel 175240 Mar 23 14:24 Completion.zwc
drwxr-xr-x  2 root wheel    512 Mar 23 14:24 Exceptions/
-rw-r--r--  1 root wheel   1728 Mar 23 14:24 Exceptions.zwc
drwxr-xr-x  2 root wheel    512 Mar 23 14:24 MIME/
-rw-r--r--  1 root wheel  30792 Mar 23 14:24 MIME.zwc
drwxr-xr-x  2 root wheel    512 Mar 23 14:24 Misc/
-rw-r--r--  1 root wheel 126592 Mar 23 14:24 Misc.zwc
drwxr-xr-x  2 root wheel    512 Mar 23 14:24 Newuser/
-rw-r--r--  1 root wheel  53760 Mar 23 14:24 Newuser.zwc
drwxr-xr-x  2 root wheel   1024 Mar 23 14:24 Prompts/
-rw-r--r--  1 root wheel  80032 Mar 23 14:24 Prompts.zwc
drwxr-xr-x  2 root wheel    512 Mar 23 14:24 TCP/
-rw-r--r--  1 root wheel  73144 Mar 23 14:24 TCP.zwc
drwxr-xr-x  3 root wheel    512 Mar 23 14:24 VCS_Info/
-rw-r--r--  1 root wheel  21744 Mar 23 14:24 VCS_Info.zwc
drwxr-xr-x  2 root wheel   1024 Mar 23 14:24 Zftp/
-rw-r--r--  1 root wheel  99512 Mar 23 14:24 Zftp.zwc
drwxr-xr-x  2 root wheel   1536 Mar 23 14:24 Zle/
-rw-r--r--  1 root wheel 130472 Mar 23 14:24 Zle.zwc

In other words, it has subdirs in it.  Should it?  The functions dir on the
NetBSD system has no subdirs, just a long long list of individual
function-def files.  Do I need to tell the sysadmin to break out all the
subdirs into individual files?  If not, what do I need to do? Thanks.

-- 
       Think-tank cops & undercover cops; security, surveillance &
        secret service cops; cops walking the beat & cops driving
       through the street: it's a world full of cops.   --Paleface

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISP OS upgrade = zsh function-files not found
  2009-03-26  6:09 ISP OS upgrade = zsh function-files not found rj
@ 2009-03-26  6:49 ` Phil Pennock
  0 siblings, 0 replies; 8+ messages in thread
From: Phil Pennock @ 2009-03-26  6:49 UTC (permalink / raw)
  To: rj; +Cc: zsh-users

On 2009-03-26 at 02:09 -0400, rj wrote:
> I use zsh-4.3.9 on 2 ISPs: one is a NetBSD, the other FreeBSD.  The FreeBSD
> just ugraded to FreeBSD 7.1-RELEASE #0, and, in doing so, from zsh-4.3.4 to
> 4.3.9.

> In .zshrc I have:
> 
> 171 # where to look for autoloaded function definitions:
> 172 fpath=(/usr/local/share/zsh/4.3.9/functions $HOME/.zfunc)

> But that FreeBSD zsh function-defs directory,
> /usr/local/share/zsh/4.3.9/functions, looks like this:

> In other words, it has subdirs in it.  Should it?  The functions dir on the
> NetBSD system has no subdirs, just a long long list of individual
> function-def files.  Do I need to tell the sysadmin to break out all the
> subdirs into individual files?  If not, what do I need to do? Thanks.

It's a zsh configure-time option, --enable-function-subdirs, which the
FreeBSD port sets; that went in at:
  http://www.freebsd.org/cgi/cvsweb.cgi/ports/shells/zsh/Makefile.diff?r1=1.58;r2=1.59
ie, some years ago; the zsh-devel port was up until 4.1.1, so also went
some time ago.

What I tend to do is make $fpath unique and then just shove stuff into
it, so that I preserve the existing built-in default and don't need to
worry that repeated calls will extend $fpath.  So:

  typeset -U fpath
  fpath=(/earlier/stuff $fpath /later/stuff)

or for you, it could just be:

  typeset -U fpath
  fpath+=(~/.zfunc)

If you want to stick with specifying it manually, then:

  fpath=(
    /usr/local/share/zsh/site-functions
    /usr/local/share/zsh/$ZSH_VERSION/functions{,**/*(N/)}
    ~/.zfunc
    )

Regards,
-Phil


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISP OS upgrade = zsh function-files not found
  2009-03-27 19:43       ` Russell Hoover
@ 2009-03-28 15:25         ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 2009-03-28 15:25 UTC (permalink / raw)
  To: zsh-users

On Mar 27,  3:43pm, Russell Hoover wrote:
}
} Meanwhile I've commented-out this line in my .zshenv:
}       #export  FPATH=/usr/local/share/zsh/4.3.9/functions/:$HOME/.zfunc

Ah, yes, that would be somewhat important.

FPATH and fpath are "tied" together like PATH and path.  If you assign
to the FPATH variable, you're stepping on the value of fpath, which
explains the whole situation.

There's no reason to assign to FPATH instead of to fpath, either one
will copy its value to the other (appropriately splitting or joining
with colons as needed).  So if you want to use FPATH for some reason,

	FPATH+=:$HOME/.zfunc

There's also really no reason to export FPATH, because it's not used
by any program other than zsh and zsh will always reset it on startup
(and you can't combine += syntax and "export" in one statement).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISP OS upgrade = zsh function-files not found
  2009-03-27  7:15     ` Bart Schaefer
@ 2009-03-27 19:43       ` Russell Hoover
  2009-03-28 15:25         ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Russell Hoover @ 2009-03-27 19:43 UTC (permalink / raw)
  To: zsh-users


On Fri 03/27/09 at 12:15 AM -0700,
Bart Schaefer <schaefer@brasslantern.com> wrote:

> Ah.  Try removing ~/.zcompdump* (or removing $ZDOTDIR/.zcompdump* if
> you have set ZDOTDIR to point away from your home directory).


I do have a ~/.zcompdump file.  (I don't use a ZDOTDIR/.)  I changed the
name of ~/.zcompdump to something else, but at login I still get these
warnings:

/u/q/.zshrc:184: promptinit: function definition file not found
/u/q/.zshrc:187: is-at-least: function definition file not found
/u/q/.zshrc:188: compinit: function definition file not found
/u/q/.zshrc:189: colors: function definition file not found


This is with the following in .zshrc:

----------------------------------------------------------------
# where to look for autoloaded function definitions:

typeset -U fpath
fpath+=(~/.zfunc)

#fpath=(
#  /usr/local/share/zsh/site-functions
#  /usr/local/share/zsh/$ZSH_VERSION/functions{,**/*(N/)}
#  ~/.zfunc
#  )


#fpath=(/usr/local/share/zsh/4.3.9/functions $HOME/.zfunc)

autoload -U promptinit; promptinit
autoload -U is-at-least; is-at-least
autoload -U compinit; compinit
autoload -U colors; colors
#  red="%{${fg[red]}%}"
#  grey="%{${fg[grey]}%}"
#  blue="%{${fg[blue]}%}"

zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' add-space yes
zstyle ':completion:*:default' list-prompt '%S%l   %m   %p  %s'
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*'   force-list always


## add colors to completions:
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}

##  For maximum completion:
zstyle ':completion:*' completer _complete _list _oldlist _expand _ignored \
_match _correct _approximate _prefix
---------------------------------------------------------------------------

(The above is a portion of my .zshrc.)

Meanwhile I've commented-out this line in my .zshenv:
      #export  FPATH=/usr/local/share/zsh/4.3.9/functions/:$HOME/.zfunc

because it was meant to "go with" this (now commented-out) line in .zshrc:
      #fpath=(/usr/local/share/zsh/4.3.9/functions $HOME/.zfunc)

Here is my .zcompdump file:

-----------------------------------------------
  1 #files: 1*......version: 4.3.9
  2
  3 _comps=(
  4 'pkg_deinstall' '_pkgtools'
  5 'pkg_fetch' '_pkgtools'
  6 'pkg_glob' '_pkgtools'
  7 'pkg_sort' '_pkgtools'
  8 'pkg_which' '_pkgtools'
  9 'pkgdb' '_pkgtools'
 10 'portcvsweb' '_pkgtools'
 11 'portinstall' '_pkgtools'
 12 'ports_glob' '_pkgtools'
 13 'portsclean' '_pkgtools'
 14 'portsdb' '_pkgtools'
 15 'portupgrade' '_pkgtools'
 16 'portversion' '_pkgtools'
 17 )
 18
 19 _services=(
 20 )
 21
 22 _patcomps=(
 23 )
 24
 25 _postpatcomps=(
 26 )
 27
 28 _compautos=(
 29 )
 30
 31
 32 autoload -Uz _pkgtools
 33
 34 typeset -gUa _comp_assocs
 35 _comp_assocs=( '' )
-----------------------------------------------

Thanks for any further tips.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISP OS upgrade = zsh function-files not found
  2009-03-27  6:03   ` rj
@ 2009-03-27  7:15     ` Bart Schaefer
  2009-03-27 19:43       ` Russell Hoover
  0 siblings, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 2009-03-27  7:15 UTC (permalink / raw)
  To: zsh-users

On Mar 27,  2:03am, rj wrote:
}
} [shell:~]  [v4.3.9]  zsh  1002 --> zsh -ilc 'print -l $fpath'
} compaudit:74: _i_addfiles: assignment to invalid subscript range
} 
} A quick look at the /etc dir on that system appears to show that
} there are no zsh startup or config files in /etc . . . .

Ah.  Try removing ~/.zcompdump* (or removing $ZDOTDIR/.zcompdump* if
you have set ZDOTDIR to point away from your home directory).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISP OS upgrade = zsh function-files not found
  2009-03-27  5:04 ` Bart Schaefer
@ 2009-03-27  6:03   ` rj
  2009-03-27  7:15     ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: rj @ 2009-03-27  6:03 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 2132 bytes --]

On Thu 03/26/09 at 10:04 PM -0700,
Bart Schaefer <schaefer@brasslantern.com> wrote:

> What does
> 	zsh +o globalrcs -fc 'print -l $fpath'
> show?


[shell:~]  [v4.3.9]  zsh  1001 --> zsh +o globalrcs -fc 'print -l $fpath'
/usr/local/share/zsh/site-functions
/usr/local/share/zsh/4.3.9/functions
/usr/local/share/zsh/4.3.9/functions/Calendar
/usr/local/share/zsh/4.3.9/functions/Completion
/usr/local/share/zsh/4.3.9/functions/Exceptions
/usr/local/share/zsh/4.3.9/functions/MIME
/usr/local/share/zsh/4.3.9/functions/Misc
/usr/local/share/zsh/4.3.9/functions/Newuser
/usr/local/share/zsh/4.3.9/functions/Prompts
/usr/local/share/zsh/4.3.9/functions/TCP
/usr/local/share/zsh/4.3.9/functions/VCS_Info
/usr/local/share/zsh/4.3.9/functions/Zftp
/usr/local/share/zsh/4.3.9/functions/Zle
/u/q/.zfunc
[shell:~]  [v4.3.9]  zsh  1003 -->


Does it differ from what
> 	zsh -ilc 'print -l $fpath'
> shows?


Yes -- the difference is the addition (below) of the first line
(the line beginning:  compaudit:74: . . .)


[shell:~]  [v4.3.9]  zsh  1002 --> zsh -ilc 'print -l $fpath'
compaudit:74: _i_addfiles: assignment to invalid subscript range
/usr/local/share/zsh/site-functions
/usr/local/share/zsh/4.3.9/functions
/usr/local/share/zsh/4.3.9/functions/Calendar
/usr/local/share/zsh/4.3.9/functions/Completion
/usr/local/share/zsh/4.3.9/functions/Exceptions
/usr/local/share/zsh/4.3.9/functions/MIME
/usr/local/share/zsh/4.3.9/functions/Misc
/usr/local/share/zsh/4.3.9/functions/Newuser
/usr/local/share/zsh/4.3.9/functions/Prompts
/usr/local/share/zsh/4.3.9/functions/TCP
/usr/local/share/zsh/4.3.9/functions/VCS_Info
/usr/local/share/zsh/4.3.9/functions/Zftp
/usr/local/share/zsh/4.3.9/functions/Zle
/u/q/.zfunc
[shell:~]  [v4.3.9]  zsh  1003 -->


> If the functions are installed in a directory tree rather than in one
> flat directory, then the compiled-in fpath should reflect that (or
> someone has done something fishy).  It's more likely that one of the
> /etc/z* files is incorrectly stepping on the fpath.

A quick look at the /etc dir on that system appears to show that
there are no zsh startup or config files in /etc . . . .



[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISP OS upgrade = zsh function-files not found
  2009-03-26 18:31 rj
@ 2009-03-27  5:04 ` Bart Schaefer
  2009-03-27  6:03   ` rj
  0 siblings, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 2009-03-27  5:04 UTC (permalink / raw)
  To: zsh-users

On Mar 26,  2:31pm, rj wrote:
} 
} This:
}         typeset -U fpath
}         fpath+=(~/.zfunc)
} 
} results in this warning

What does
	zsh +o globalrcs -fc 'print -l $fpath'
show?  Does it differ from what
	zsh -ilc 'print -l $fpath'
shows?

If the functions are installed in a directory tree rather than in one
flat directory, then the compiled-in fpath should reflect that (or
someone has done something fishy).  It's more likely that one of the
/etc/z* files is incorrectly stepping on the fpath.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ISP OS upgrade = zsh function-files not found
@ 2009-03-26 18:31 rj
  2009-03-27  5:04 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: rj @ 2009-03-26 18:31 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

This:
        typeset -U fpath
        fpath+=(~/.zfunc)

results in this warning at login:

/u/q/.zshrc:185: promptinit: function definition file not found
/u/q/.zshrc:188: is-at-least: function definition file not found
/u/q/.zshrc:189: compinit: function definition file not found
/u/q/.zshrc:190: colors: function definition file not found

(Same as what I was getting before.)

This:
        fpath=(
          /usr/local/share/zsh/site-functions
          /usr/local/share/zsh/$ZSH_VERSION/functions{,**/*(N/)}
          ~/.zfunc
          )

results in this warning at login:

compaudit:74: _i_addfiles: assignment to invalid subscript range

which is new.

Thanks for any further tips.



[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-03-28 22:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26  6:09 ISP OS upgrade = zsh function-files not found rj
2009-03-26  6:49 ` Phil Pennock
2009-03-26 18:31 rj
2009-03-27  5:04 ` Bart Schaefer
2009-03-27  6:03   ` rj
2009-03-27  7:15     ` Bart Schaefer
2009-03-27 19:43       ` Russell Hoover
2009-03-28 15:25         ` Bart Schaefer

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