Don't need to use `array[@]` ouside double quotes

In  double  quotes,  array  elements  are put into separate words when
using `"${(@)array}"` or `"${array[@]}"`. See zshexpn(1).

Also according to the Zsh documentation, these forms preserve empty
elements of the array.
This commit is contained in:
Eric Nielsen 2018-11-19 19:43:21 -05:00
parent 268a570ae3
commit d259e19dd8
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ else
remotes=(${(f)"$(command git rev-parse --abbrev-ref ${^*:#-*}@{u} 2>/dev/null)"}) || remotes=()
fi
if command git branch --delete ${@} && \
(( ${#remotes[@]} )) && \
(( ${#remotes} )) && \
read -q "?Also delete remote branch(es) ${remotes} [y/N]? "; then
print
local remote

View File

@ -126,7 +126,7 @@ alias pacblame="${zpacman_frontend} -Qo"
#
# source helper functions/aliases
for helper in ${zpacman_helper[@]}; do
for helper in ${zpacman_helper}; do
if [[ -s ${0:h}/helper_${helper}.zsh ]]; then
source ${0:h}/helper_${helper}.zsh
else