mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 16:18:00 +00:00
completion: Unset local variable outside condition block
Unset `curl_prefix` outside condition block so that it is always cleared. Also, avoid `brew --prefix <foo>` since it is triggering ruby in fallback flow when `<foo>` is not present. Also, apply minor formatting tweaks.
This commit is contained in:
parent
37443368c1
commit
f1e24d3fd8
@ -12,14 +12,14 @@ if [[ $TERM == 'dumb' ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Add zsh-completions to $fpath.
|
# Add zsh-completions to $fpath.
|
||||||
fpath=("${0:h}/external/src" $fpath)
|
fpath=(${0:h}/external/src $fpath)
|
||||||
|
|
||||||
# Add completion for keg-only brewed curl when available.
|
# Add completion for keg-only brewed curl when available.
|
||||||
if (( $+commands[brew] )) \
|
if (( $+commands[brew] )) \
|
||||||
&& [[ -d "${curl_prefix::="$(brew --prefix curl 2> /dev/null)"}" ]]; then
|
&& [[ -d "${curl_prefix::="$(brew --prefix 2> /dev/null)"/opt/curl}" ]]; then
|
||||||
fpath=("$curl_prefix/share/zsh/site-functions" $fpath)
|
fpath=($curl_prefix/share/zsh/site-functions $fpath)
|
||||||
unset curl_prefix
|
|
||||||
fi
|
fi
|
||||||
|
unset curl_prefix
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options
|
# Options
|
||||||
|
Loading…
Reference in New Issue
Block a user