mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
Detect aws cli completion file from RPM (#6424).
This commit is contained in:
parent
e273cf004e
commit
74459a9818
1 changed files with 7 additions and 1 deletions
|
|
@ -21,6 +21,10 @@ _awscli-homebrew-installed() {
|
|||
[ -r $_brew_prefix/libexec/bin/aws_zsh_completer.sh ] &> /dev/null
|
||||
}
|
||||
|
||||
_awscli-rpm-installed() {
|
||||
which rpm &>/dev/null && rpm -q --quiet awscli
|
||||
}
|
||||
|
||||
export AWS_HOME=~/.aws
|
||||
|
||||
function agp {
|
||||
|
|
@ -44,9 +48,11 @@ compctl -K aws_profiles asp
|
|||
|
||||
if _homebrew-installed && _awscli-homebrew-installed ; then
|
||||
_aws_zsh_completer_path=$_brew_prefix/libexec/bin/aws_zsh_completer.sh
|
||||
elif _awscli-rpm-installed; then
|
||||
_aws_zsh_completer_path="/usr/share/zsh/site-functions/aws_zsh_completer.sh"
|
||||
else
|
||||
_aws_zsh_completer_path=$(which aws_zsh_completer.sh)
|
||||
fi
|
||||
|
||||
[ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
|
||||
[ -r $_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