about summary refs log tree commit diff
path: root/Functions/VCS_Info/VCS_INFO_check_com
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-12-11 09:53:12 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-12-11 09:53:12 +0000
commitb4a2d51e57b1f50db4b9e489652daf35f1e583d0 (patch)
treeec0ce579ca82b5498ee579f415cc81d838702dd2 /Functions/VCS_Info/VCS_INFO_check_com
parent37a4dce4bc5b38a686516e22d0dc81a90b757d91 (diff)
downloadzsh-b4a2d51e57b1f50db4b9e489652daf35f1e583d0.tar.gz
zsh-b4a2d51e57b1f50db4b9e489652daf35f1e583d0.tar.xz
zsh-b4a2d51e57b1f50db4b9e489652daf35f1e583d0.zip
Frank Terbeck: 26125: add "command" style to VCS_INFO
Diffstat (limited to 'Functions/VCS_Info/VCS_INFO_check_com')
-rw-r--r--Functions/VCS_Info/VCS_INFO_check_com9
1 files changed, 8 insertions, 1 deletions
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