From 63eb4e7e440945a63672492b99844c5feae0a60c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 22 Mar 2009 11:20:40 +0100 Subject: whichf: return 1 if no function definition file was found --- etc/functions/whichf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'etc/functions/whichf') diff --git a/etc/functions/whichf b/etc/functions/whichf index dc8d04b..01026c4 100755 --- a/etc/functions/whichf +++ b/etc/functions/whichf @@ -1,2 +1,7 @@ ## vim:ft=zsh -echo ${^fpath}/$1(-.N) +## locate the file corresponding to a function +if [[ -n $(echo ${^fpath}/$1(-.N)) ]] { + echo ${^fpath}/$1(-.N) +} else { + return 1 +} -- cgit v1.2.3