Menu
Index

Contact
LinkedIn
GitHub
Atom Feed
Comments Atom Feed

Similar Articles

2009-09-21 18:57
Page allocation failures and other wierdness
2015-12-28 14:03
Home Lab Project: Network Bridges for KVM II - Flexible Bridges & VLANs
2009-10-31 11:03
Linux (Debian, Ubuntu) SNMP basics
2011-12-26 21:08
Debian Squeeze i386 to amd64 conversion
2012-03-06 09:00
Debian packaging for site deployment

Recent Articles

2018-05-15 16:48
Raspberry Pi Camera, IR Lights and more
2017-04-23 14:21
Raspberry Pi SD Card Test
2017-04-07 10:54
DNS Firewall (blackhole malicious, like Pi-hole) with bind9
2017-03-28 13:07
Kubernetes to learn Part 4
2017-03-23 16:09
Kubernetes to learn Part 3

Glen Pitt-Pladdy :: Blog

Ubuntu/Debian/Linux Mint and AWS CLI Autocomplete

Those of us using modern Linux distros take bash completion for granted, so it's extremely frustrating when something arrives on the scene that doesn't do it!

I've been using this on Linux Mint which is a Ubuntu/Debian derivative, but it's likely the same or very similar will work for Red Hat, CentOS, Fedora, Suse and other distros.

Making it work

It turns out that Amazon has already provided everything you need in the form of the aws_completer command, it's just that it's not hooked into bash. To fix that is very simple - just add to your ~/.bashrc (create one if needed) the following line, plus the comments are probably a good idea for in a few months when it doesn't make sense any more:

# AWS CLI completion as https://www.pitt-pladdy.com/blog/_20151025-080213_0000_Ubuntu_Debian_Linux_Mint_and_AWS_CLI_Autocomplete/
complete -C /usr/bin/aws_completer aws

Now the next time you spin up a shell and tab with the aws command you should get:

AWS CLI Bash autocomplete (tab)

Comments:




Note: Identity details will be stored in a cookie. Posts may not appear immediately