From b4a2d51e57b1f50db4b9e489652daf35f1e583d0 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 11 Dec 2008 09:53:12 +0000 Subject: Frank Terbeck: 26125: add "command" style to VCS_INFO --- Functions/VCS_Info/VCS_INFO_check_com | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Functions/VCS_Info/VCS_INFO_check_com') diff --git a/Functions/VCS_Info/VCS_INFO_check_com b/Functions/VCS_Info/VCS_INFO_check_com index 6d65360d5..d9f7a1330 100644 --- a/Functions/VCS_Info/VCS_INFO_check_com +++ b/Functions/VCS_Info/VCS_INFO_check_com @@ -4,5 +4,12 @@ setopt localoptions NO_shwordsplit -(( ${+commands[$1]} )) && [[ -x ${commands[$1]} ]] && return 0 +case $1 in + (/*) + [[ -x $1 ]] && return 0 + ;; + (*) + (( ${+commands[$1]} )) && [[ -x ${commands[$1]} ]] && return 0 +esac + return 1 -- cgit 1.4.1