diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-22 11:20:40 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-22 11:20:40 +0100 |
commit | 63eb4e7e440945a63672492b99844c5feae0a60c (patch) | |
tree | 059c13a1b4b80274a5a8606e474e223c5ec110c0 /etc/functions/whichf | |
parent | e6a363514b8d1f113f280d4a011ad8a996613c84 (diff) |
whichf: return 1 if no function definition file was found
Diffstat (limited to 'etc/functions/whichf')
-rwxr-xr-x | etc/functions/whichf | 7 |
1 files changed, 6 insertions, 1 deletions
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 +} |