Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: The default $fpath
On Sep 7, 9:40pm, Peter Stephenson wrote:
}
} You can already set fpath the way you want in an initialisation file.
Exactly.
} The proposal is simply to provide a directory where there's some
} reasonable chance it will be found by all installations of the shell on
} the same system regardless of configuration.
Actually, I think the proposal is to provide a directory where all OTHER
softwares' configuration systems can install shell functions so that they
are found by all installations of zsh on ANY system, regardless of the
local-zsh-builder's and/or system-zsh-packager's idea of the path to the
functions provided by zsh itself.
} [...] If this builtin default becomes configurable
} to use different directories the whole advantage is lost; it's far better
} to use common run-time code to ensure a non-default directory.
This point, however, holds true either way. I just think it's impossible
to promise that the directory will exist; certainly the zsh installer
should not unilaterally create it.
} I'd really like to know if there are any problems caused by *this*
} proposal, adding /usr/local/share/zsh/site-functions to the compiled-in
} path.
I can't think of any; presumably the configure-time (?) code for this
would resemble
if [ X$ac_default_prefix != X/usr/local ]
then fixed_sitefndir=/usr/local/zsh/site-functions
elif [ X$tzsh_name != Xzsh ]
then fixed_sitefndir=/usr/local/zsh/site-functions
else fixed_sitefndir=''
fi
and then zsh.mdd would use something like
echo '#define FIXED_FPATH_DIR "'$(fixed_sitefndir)'"' >> zshpaths.h.tmp;
and finally somewhere in Src/init.c the fpath would be prefixed with the
value of FIXED_FPATH_DIR if it is non-empty.
The worst that happens is that /usr/local is a remote file system (which
would seem rather unlikely) and zsh gets slowed down every time fpath is
searched for a directory there that doesn't exist.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author