From 048e09225a45a69423cdb41c4beed0650d78d97a Mon Sep 17 00:00:00 2001 From: Philipp Wahala Date: Sat, 27 Feb 2016 22:13:55 +0100 Subject: [PATCH] Fix homebrew aws slow initialization due Saves ~310ms --- plugins/aws/aws.plugin.zsh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index d31052f83..545692416 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -1,11 +1,3 @@ -_homebrew-installed() { - type brew &> /dev/null -} - -_awscli-homebrew-installed() { - brew list awscli &> /dev/null -} - export AWS_HOME=~/.aws function agp { @@ -27,8 +19,8 @@ function aws_profiles { compctl -K aws_profiles asp -if _homebrew-installed && _awscli-homebrew-installed ; then - _aws_zsh_completer_path=$(brew --prefix awscli)/libexec/bin/aws_zsh_completer.sh +if [ -f /usr/local/opt/awscli/libexec/bin/aws_zsh_completer.sh ]; then + _aws_zsh_completer_path=/usr/local/opt/awscli/libexec/bin/aws_zsh_completer.sh else _aws_zsh_completer_path=$(which aws_zsh_completer.sh) fi