From e12eefeeb2862d23c8d2f7b790caaa73c0664780 Mon Sep 17 00:00:00 2001 From: rupa Date: Sun, 13 Sep 2015 16:35:17 -0400 Subject: [PATCH] use type in shell checks shouldn't change behavior, and should be faster on load. --- z.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/z.sh b/z.sh index da629ae..1cbe9b9 100644 --- a/z.sh +++ b/z.sh @@ -206,7 +206,7 @@ alias ${_Z_CMD:-z}='_z 2>&1' [ "$_Z_NO_RESOLVE_SYMLINKS" ] || _Z_RESOLVE_SYMLINKS="-P" -if compctl >/dev/null 2>&1; then +if type compctl >/dev/null 2>&1; then # zsh [ "$_Z_NO_PROMPT_COMMAND" ] || { # populate directory list, avoid clobbering any other precmds. @@ -230,7 +230,7 @@ if compctl >/dev/null 2>&1; then reply=(${(f)"$(_z --complete "$compl")"}) } compctl -U -K _z_zsh_tab_completion _z -elif complete >/dev/null 2>&1; then +elif type complete >/dev/null 2>&1; then # bash # tab completion complete -o filenames -C '_z --complete "$COMP_LINE"' ${_Z_CMD:-z}