This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Davide de Paolis
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)
This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Davide de Paolis

Davide de Paolis | Sciencx (2022-11-21T14:33:00+00:00) Enable AWS CLI Completer for increased productivity. Retrieved from https://www.scien.cx/2022/11/21/enable-aws-cli-completer-for-increased-productivity/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.