mirror of https://github.com/ohmyzsh/ohmyzsh.git
aws: improve check for aws_completer - unhardcode path (#9123)
Closes #9122 The current check is assuming that the aws_completer is installed globally, it then runs the command without that path I have aws_completer in ~/.local/bin/aws_completer This changes the check to see if the command exists instead of concerning itself with where it in installed. This test matches the behavior of just running the command.pull/9132/head
parent
a3740c3414
commit
db3d05fe71
|
@ -63,7 +63,7 @@ fi
|
||||||
# Load awscli completions
|
# Load awscli completions
|
||||||
|
|
||||||
# AWS CLI v2 comes with its own autocompletion. Check if that is there, otherwise fall back
|
# AWS CLI v2 comes with its own autocompletion. Check if that is there, otherwise fall back
|
||||||
if [[ -x /usr/local/bin/aws_completer ]]; then
|
if command -v aws_completer &> /dev/null; then
|
||||||
autoload -Uz bashcompinit && bashcompinit
|
autoload -Uz bashcompinit && bashcompinit
|
||||||
complete -C aws_completer aws
|
complete -C aws_completer aws
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue