* PATCH: vcs_info: Remove a few superfluous stat()s
@ 2012-01-19 14:45 Frank Terbeck
0 siblings, 0 replies; only message in thread
From: Frank Terbeck @ 2012-01-19 14:45 UTC (permalink / raw)
To: zsh-workers
The (( ${+commands[foo]} )) part should be save enough, to check for
existing commands.
Regards, Frank
diff --git a/Functions/VCS_Info/VCS_INFO_check_com b/Functions/VCS_Info/VCS_INFO_check_com
index d9f7a13..1b86593 100644
--- a/Functions/VCS_Info/VCS_INFO_check_com
+++ b/Functions/VCS_Info/VCS_INFO_check_com
@@ -9,7 +9,7 @@ case $1 in
[[ -x $1 ]] && return 0
;;
(*)
- (( ${+commands[$1]} )) && [[ -x ${commands[$1]} ]] && return 0
+ (( ${+commands[$1]} )) && return 0
esac
return 1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-19 14:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-19 14:45 PATCH: vcs_info: Remove a few superfluous stat()s Frank Terbeck
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).