9930dd6e49df5630ac23c68b85465f0bb801d17f

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

Message

aws: use function keyword in function definitions

Fixes #7886

Diff

 1diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
 2index 5f5bf9bbbb3770ff25e4ac915ca47d0ae983fc9e..231ac5ad26dcfb9f861a48c03349b4cda536155a 100644
 3--- a/plugins/aws/aws.plugin.zsh
 4+++ b/plugins/aws/aws.plugin.zsh
 5@@ -1,9 +1,9 @@
 6-agp() {
 7+function agp() {
 8   echo $AWS_PROFILE
 9 }
10 
11 # AWS profile selection
12-asp() {
13+function asp() {
14   if [[ -z "$1" ]]; then
15     unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
16     echo AWS profile cleared.
17@@ -22,7 +22,7 @@ asp() {
18   export AWS_EB_PROFILE=$1
19 }
20 
21-aws_change_access_key() {
22+function aws_change_access_key() {
23   if [[ -z "$1" ]]; then
24     echo "usage: $0 <profile>"
25     return 1
26@@ -38,18 +38,18 @@ aws_change_access_key() {
27   aws iam list-access-keys
28 }
29 
30-aws_profiles() {
31+function aws_profiles() {
32   [[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1
33   grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'
34 }
35 
36-_aws_profiles() {
37+function _aws_profiles() {
38   reply=($(aws_profiles))
39 }
40 compctl -K _aws_profiles asp aws_change_access_key
41 
42 # AWS prompt
43-aws_prompt_info() {
44+function aws_prompt_info() {
45   [[ -z $AWS_PROFILE ]] && return
46   echo "${ZSH_THEME_AWS_PREFIX:=<aws:}${AWS_PROFILE}${ZSH_THEME_AWS_SUFFIX:=>}"
47 }
48@@ -61,7 +61,7 @@ fi
49 
50 # Load awscli completions
51 
52-_awscli-homebrew-installed() {
53+function _awscli-homebrew-installed() {
54   # check if Homebrew is installed
55   (( $+commands[brew] )) || return 1
56