Days ago I was scrolling LinkedIn and noticed a video post from AWS Hero Andrew Brown.
A prompt/autocomplete for AWS CLI Prompt?!? Cool!
Is that available only within Cloud Shell he's using in the video?
As Andrew already mentions in the comments, you can use it everywhere you have AWS CLI, therefore I immediately tried it out, and it was mind-blowing.
Just type:
export AWS_CLI_AUTO_PROMPT=on-partial
in your terminal and everything you type next will be autocompleted ( or if there are more matches, the available matches will be prompted).
The cool thing is not that it autocompletes the available services - sure you can save some keystrokes if when typing aws dy
you can get it autocompleted to aws dynamodb
but that would not be so helpful.
No, it will prompt you all the available commands for that resource!
and most importantly, its parameters!
That is really cool, but... do I have to export that variable every time I launch a terminal window? of course not:
Basically, Open your shell of choice ( I use .zsh ) export the Completer path (not just the Prompt variable), reload it and tadaa!
PATH=/usr/local/bin/aws_completer:$PATH
Check the docs to find out how to set it up for your shell (bash, zsh and so on)
Top comments (5)
You can now also do:
And you'll be entiring an AWS repl that has nice autocomplete (and more)
cool! will check that out!
Wow!!! Thank you for sharing!
Wow, I wasnt aware.
Thats really cool.
Does anyone from AWS know when this will be the standard? ;)
dunno. this was also was surprised me. why isn't that the default setting?