Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compaudit:74: _i_addfiles: assignment to invalid subscript range



rj wrote:
> Here's one, though, where I'm out of my depth:  when I start zsh on Ubuntu,
> I'm getting this warning:
> 
>         compaudit:74: _i_addfiles: assignment to invalid subscript range

That probably means the subscript is zero.  I think the problem is
equivalent to this one:

% test=()
% for i in {1..$#test}; do print $i; done
1
0

It's looping over a non-existent and a not-even-valid entry for an empty
array, which is not very helpful.  That number is then being used as
a subscript for the empty array.  I'm not actually sure the syntax
{1..0} should be doing that, I don't think we've ever defined what it
does.

The reason why you see this ($_i_addfiles is empty) is the same one as
the following...

> I looked at the compaudit file but have no clue what to do there.  Also,
> when I tab to complete anything, I get this:
> 
>         zsh:4: _main_complete: function definition file not found
> 
> I have this in my .zshrc:
> 
> # where to look for autoloaded function definitions:
> fpath=( /usr/share/zsh/functions/* )

fpath doesn't descend subdirectories.  If, for some reason, you can't
use the default fpath, which will include wherever the files are
supposed to be installed (this is the preferred solution), try

fpath=( /usr/share/zsh/functions/**/*(/) )

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