From c5b97ad933be4fd639088130e39d874a0aa71fb3 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Sun, 23 May 2021 19:35:55 -0500 Subject: [PATCH] completion: Skip completion lookup for key-only brewed curl Skip lookup for `_curl` completion function to avoid fallback completion having higher priority. --- modules/completion/init.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 0c303a8..0500ef8 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -7,7 +7,7 @@ # # Return if requirements are not found. -if [[ "$TERM" == 'dumb' ]]; then +if [[ $TERM == 'dumb' ]]; then return 1 fi @@ -15,7 +15,7 @@ fi fpath=("${0:h}/external/src" $fpath) # Add completion for keg-only brewed curl when available. -if (( $+commands[brew] && ! $+functions[_curl] )) \ +if (( $+commands[brew] )) \ && [[ -d "${curl_prefix::="$(brew --prefix curl 2> /dev/null)"}" ]]; then fpath=("$curl_prefix/share/zsh/site-functions" $fpath) unset curl_prefix