[zsh] minor edits

This commit is contained in:
Dmytro Meleshko 2020-11-30 19:29:30 +02:00
parent 643f996a94
commit d8cc8d3feb
2 changed files with 8 additions and 1 deletions

View file

@ -31,3 +31,5 @@ export JQ_COLORS="${(j.:.)jq_colors}"
unset jq_colors
export FZF_DEFAULT_OPTS='--preview-window=sharp'
export HOMEBREW_NO_AUTO_UPDATE=1

View file

@ -393,7 +393,12 @@ plugin() {
return 1
fi
local value; for value in "$plugin_dir/"${^@}; do
local value; for value in "$@"; do
if [[ -z "$value" ]]; then
value="${plugin_dir}"
else
value="${plugin_dir}/${value}"
fi
if eval "(( \${${var_name}[(ie)\$value]} > \${#${var_name}} ))"; then
case "$operator" in
prepend) eval "$var_name=(\"\$value\" \${$var_name[@]})" ;;