mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
Handle errors when aws_zsh_completer.sh not found
- Redirect `which` stderr output to /dev/null - Check for empty `_aws_zsh_completer_path` variable
This commit is contained in:
parent
7fabc8bca4
commit
eaa320a8c5
1 changed files with 2 additions and 2 deletions
|
|
@ -30,8 +30,8 @@ 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
|
||||
else
|
||||
_aws_zsh_completer_path=$(which aws_zsh_completer.sh)
|
||||
_aws_zsh_completer_path=$(which aws_zsh_completer.sh 2>/dev/null)
|
||||
fi
|
||||
|
||||
[ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
|
||||
[ -n "$_aws_zsh_completer_path" ] && [ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
|
||||
unset _aws_zsh_completer_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue