Enable AWS CLI Completer for increased productivity

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,…


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.

Andrew Brown - AWS CLI Prompt

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!

AWS CLI Prompt command

and most importantly, its parameters!

AWS CLI Prompt 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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Enable AWS CLI Completer for increased productivity." Davide de Paolis | Sciencx - Monday November 21, 2022, https://www.scien.cx/2022/11/21/enable-aws-cli-completer-for-increased-productivity/
HARVARD
Davide de Paolis | Sciencx Monday November 21, 2022 » Enable AWS CLI Completer for increased productivity., viewed ,<https://www.scien.cx/2022/11/21/enable-aws-cli-completer-for-increased-productivity/>
VANCOUVER
Davide de Paolis | Sciencx - » Enable AWS CLI Completer for increased productivity. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/11/21/enable-aws-cli-completer-for-increased-productivity/
CHICAGO
" » Enable AWS CLI Completer for increased productivity." Davide de Paolis | Sciencx - Accessed . https://www.scien.cx/2022/11/21/enable-aws-cli-completer-for-increased-productivity/
IEEE
" » Enable AWS CLI Completer for increased productivity." Davide de Paolis | Sciencx [Online]. Available: https://www.scien.cx/2022/11/21/enable-aws-cli-completer-for-increased-productivity/. [Accessed: ]
rf:citation
» Enable AWS CLI Completer for increased productivity | Davide de Paolis | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.