1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 12:48:01 +00:00

completion: Add completion for keg-only brewed curl when available

As curl bundled with macOS does not include `_curl` definitions, one
way to make `_curl` available is to install curl from Homebrew.

However, since curl from Hombrew is _keg-only_, its function path needs
to be explicitly included.
This commit is contained in:
Indrajit Raychaudhuri 2021-05-02 01:50:30 -05:00 committed by Indrajit Raychaudhuri
parent 509c5ca80f
commit e87a9b0a93

View File

@ -14,6 +14,13 @@ fi
# Add zsh-completions to $fpath.
fpath=("${0:h}/external/src" $fpath)
# Add completion for keg-only brewed curl when available.
if (( $+commands[brew] && ! $+functions[_curl] )) && \
[[ -d "${curl_prefix::="$(brew --prefix curl 2> /dev/null)"}" ]]; then
fpath=("${curl_prefix}/share/zsh/site-functions" $fpath)
unset curl_prefix
fi
#
# Options
#