mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 05:40:08 +00:00
aws: fix path resolution of aws completion for Ubuntu (#7812)
This commit is contained in:
parent
f5b2d9c7ce
commit
d16adb6a9f
1 changed files with 12 additions and 5 deletions
|
@ -67,11 +67,18 @@ _awscli-homebrew-installed() {
|
||||||
# get aws_zsh_completer.sh location from $PATH
|
# get aws_zsh_completer.sh location from $PATH
|
||||||
_aws_zsh_completer_path="$commands[aws_zsh_completer.sh]"
|
_aws_zsh_completer_path="$commands[aws_zsh_completer.sh]"
|
||||||
|
|
||||||
# otherwise check if installed via Homebrew
|
# otherwise check common locations
|
||||||
if [[ -z $_aws_zsh_completer_path ]] && _awscli-homebrew-installed; then
|
if [[ -z $_aws_zsh_completer_path ]]; then
|
||||||
_aws_zsh_completer_path=$_brew_prefix/libexec/bin/aws_zsh_completer.sh
|
# Homebrew
|
||||||
else
|
if _awscli-homebrew-installed; then
|
||||||
_aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh
|
_aws_zsh_completer_path=$_brew_prefix/libexec/bin/aws_zsh_completer.sh
|
||||||
|
# Ubuntu
|
||||||
|
elif [[ -e /usr/share/zsh/vendor-completions/_awscli ]]; then
|
||||||
|
_aws_zsh_completer_path=/usr/share/zsh/vendor-completions/_awscli
|
||||||
|
# RPM
|
||||||
|
else
|
||||||
|
_aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -r $_aws_zsh_completer_path ]] && source $_aws_zsh_completer_path
|
[[ -r $_aws_zsh_completer_path ]] && source $_aws_zsh_completer_path
|
||||||
|
|
Loading…
Reference in a new issue