From cca4072c374836c549086485fc498764cb854281 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 30 Mar 2020 16:42:05 +0200 Subject: [PATCH] Fix handling of FPATH --- .zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.zshrc b/.zshrc index 0c0f63b..542968d 100644 --- a/.zshrc +++ b/.zshrc @@ -121,7 +121,16 @@ fi # don't want to recreate that mess manually. if [ -d ~/bin/func ] then + export FPATH FPATH=`preppath -v FPATH ~/bin/func` + # We also have to mark all functions explicitely as undefined, + # or zsh won't look for them. (Is this new? I thought that zsh would + # automatically search for unknown commands in FPATH, too. Maybe + # there's an option for that.) + for f in ~/bin/func/* + do + typeset -fu $(basename $f) + done fi # for new style completion: