From b769341c84ce1bf6cf68055afe2fa66f13cbb9ce Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 1 Mar 2007 11:57:44 +0000 Subject: [PATCH] extend FPATH instead of clobbering it (otherwise completion is broken). Also do that only for interactive shells. --- .zshenv | 1 - .zshrc | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.zshenv b/.zshenv index 74fb2b6..df108b7 100644 --- a/.zshenv +++ b/.zshenv @@ -19,7 +19,6 @@ setopt NO_PROMPT_CR setopt PUSHD_IGNORE_DUPS -fpath=(~/bin/func) SAVEHIST=100 HISTSIZE=$SAVEHIST HISTFILE=~/.zhistory diff --git a/.zshrc b/.zshrc index 98be603..4e2de61 100644 --- a/.zshrc +++ b/.zshrc @@ -72,3 +72,13 @@ if [ -z "$EDITOR" ] then export EDITOR=vi 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