Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
d16adb6a
Commit
d16adb6a
authored
Apr 29, 2019
by
dorons
Committed by
Marc Cornellà
Apr 29, 2019
Browse files
aws: fix path resolution of aws completion for Ubuntu (#7812)
parent
f5b2d9c7
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/aws/aws.plugin.zsh
View file @
d16adb6a
...
@@ -67,11 +67,18 @@ _awscli-homebrew-installed() {
...
@@ -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
# Homebrew
if
_awscli-homebrew-installed
;
then
_aws_zsh_completer_path
=
$_brew_prefix
/libexec/bin/aws_zsh_completer.sh
_aws_zsh_completer_path
=
$_brew_prefix
/libexec/bin/aws_zsh_completer.sh
else
# 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
_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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment