Pārlūkot izejas kodu

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.
Eric Nielsen 5 gadi atpakaļ
vecāks
revīzija
d259e19dd8

+ 1 - 1
modules/git/functions/git-branch-delete-interactive

@@ -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

+ 1 - 1
modules/pacman/init.zsh

@@ -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