dcffc895806f5c2aaade3fce09772e1c9f52504e

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

aws: fix array assignment in asp function

Older zsh versions require this syntax change.
Fixes #8525

Diff

 1diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
 2index 231ac5ad26dcfb9f861a48c03349b4cda536155a..567311372ea71fe00ef81933e32a64e338698cff 100644
 3--- a/plugins/aws/aws.plugin.zsh
 4+++ b/plugins/aws/aws.plugin.zsh
 5@@ -10,7 +10,8 @@ function asp() {
 6     return
 7   fi
 8 
 9-  local available_profiles=($(aws_profiles))
10+  local -a available_profiles
11+  available_profiles=($(aws_profiles))
12   if [[ -z "${available_profiles[(r)$1]}" ]]; then
13     echo "${fg[red]}Profile '$1' not found in '${AWS_CONFIG_FILE:-$HOME/.aws/config}'" >&2
14     echo "Available profiles: ${(j:, :)available_profiles:-no profiles found}${reset_color}" >&2