Menu
Index

Contact
Atom Feed
Comments Atom Feed

Similar Articles

2009-10-31 11:03
Linux (Debian, Ubuntu) SNMP basics
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-06-20 13:09
R1800 Gutenprint tricks
2012-03-03 13:54
Simple Gtk Audio Real Time Analyser (RTA)

Recent Articles

2019-07-28 16:35
git http with Nginx via Flask wsgi application (git4nginx)
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

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)