Menu
Index

Contact
LinkedIn
GitHub
Atom Feed
Comments Atom Feed



Tweet

Similar Articles

28/12/2015 14:03
Home Lab Project: Network Bridges for KVM II - Flexible Bridges & VLANs
31/10/2009 11:03
Linux (Debian, Ubuntu) SNMP basics
21/09/2009 18:57
Page allocation failures and other wierdness
30/05/2016 13:09
Xenial LXC Container on Debian
20/06/2009 13:09
R1800 Gutenprint tricks
26/12/2011 21:08
Debian Squeeze i386 to amd64 conversion

Recent Articles

23/04/2017 14:21
Raspberry Pi SD Card Test
07/04/2017 10:54
DNS Firewall (blackhole malicious, like Pi-hole) with bind9
28/03/2017 13:07
Kubernetes to learn Part 4
23/03/2017 16:09
Kubernetes to learn Part 3
21/03/2017 15:18
Kubernetes to learn Part 2

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:




Are you human? (reduces spam)
Note: Identity details will be stored in a cookie. Posts may not appear immediately