extend FPATH instead of clobbering it (otherwise completion is broken).

Also do that only for interactive shells.
This commit is contained in:
hjp 2007-03-01 11:57:44 +00:00
parent 9c7e6988ec
commit b769341c84
2 changed files with 10 additions and 1 deletions

View File

@ -19,7 +19,6 @@ setopt NO_PROMPT_CR
setopt PUSHD_IGNORE_DUPS setopt PUSHD_IGNORE_DUPS
fpath=(~/bin/func)
SAVEHIST=100 SAVEHIST=100
HISTSIZE=$SAVEHIST HISTSIZE=$SAVEHIST
HISTFILE=~/.zhistory HISTFILE=~/.zhistory

10
.zshrc
View File

@ -72,3 +72,13 @@ if [ -z "$EDITOR" ]
then then
export EDITOR=vi export EDITOR=vi
fi fi
# prepend local function dir if we have one.
#
# Important: Don't clobber FPATH. It's needed for completion and usually
# contains a lot of directories (at least on Debian systems) and you
# don't want to recreate that mess manually.
if [ -d ~/bin/func ]
then
FPATH=`preppath -v FPATH ~/bin/func`
fi