diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-11-21 23:20:29 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-11-21 23:20:29 +0100 |
commit | ec6c924f8791926693a515524b27eb805be50f63 (patch) | |
tree | 2018e2599e767adcbf81f021060e1daa4d0dc355 /etc/functions/check_com | |
parent | e7ad146b035856a747781fa4fb823a24aa3f5842 (diff) |
Remove check_com function
Diffstat (limited to 'etc/functions/check_com')
-rw-r--r-- | etc/functions/check_com | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/etc/functions/check_com b/etc/functions/check_com deleted file mode 100644 index 21de466..0000000 --- a/etc/functions/check_com +++ /dev/null @@ -1,32 +0,0 @@ -## vim:ft=zsh -## Check for a command/function -## Usage: check_com [-c] <command> -## Taken from the grml zshrc - http://grml.org -local -i comonly - -if [[ ${1} == '-c' ]] ; then - (( comonly = 1 )) - shift -else - (( comonly = 0 )) -fi - -if (( ${#argv} != 1 )) ; then - printf 'usage: check_com [-c] <command>\n' >&2 - return 1 -fi - -if (( comonly > 0 )) ; then - [[ -n ${commands[$1]} ]] && return 0 - return 1 -fi - -if [[ -n ${commands[$1]} ]] \ - || [[ -n ${functions[$1]} ]] \ - || [[ -n ${aliases[$1]} ]] \ - || [[ -n ${reswords[(r)$1]} ]] ; then - - return 0 -fi - -return 1 |