1## vim:ft=zsh
2## Written by Frank Terbeck <ft@bewatermyfriend.org>
3## Distributed under the same BSD-ish license as zsh itself.
4
5setopt localoptions NO_shwordsplit
6
7case $1 in
8    (/*)
9        [[ -x $1 ]] && return 0
10        ;;
11    (*)
12        (( ${+commands[$1]} )) && return 0
13esac
14
15return 1
16