Skip to content

Commit 9e0b80a

Browse files
author
Pavel Strashkin
committed
Add aws_bash_completer
Just to be fair (there is one for zsh already, right?), consistent with other tools that provide bash completer script out of the box, and to help other projects like Homebrew (Homebrew/legacy-homebrew#46781).
1 parent 0aa62d6 commit 9e0b80a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ Command Completion
6969

7070
The aws-cli package includes a very useful command completion feature.
7171
This feature is not automatically installed so you need to configure it manually.
72-
To enable tab completion for bash use the built-in command ``complete``::
72+
To enable tab completion for bash either use the built-in command ``complete``::
7373

7474
$ complete -C aws_completer aws
7575

76+
Or add ``bin/aws_bash_completer`` file under ``/etc/bash_completion.d``,
77+
``/usr/local/etc/bash_completion.d`` or any other ``bash_completion.d`` location.
78+
7679
For tcsh::
7780

7881
$ complete aws 'p/*/`aws_completer`/'

bin/aws_bash_completer

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Typically that would be added under /etc/bash_completion.d,
2+
# /usr/local/etc/bash_completion.d, etc.
3+
4+
# Adopted from bash completion for ant
5+
have aws_completer && \
6+
complete -C aws_completer aws

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
packages=find_packages(exclude=['tests*']),
3131
package_data={'awscli': ['data/*.json', 'examples/*/*.rst',
3232
'examples/*/*/*.rst', 'topics/*.rst',
33-
'topics/*.json']},
33+
'topics/*.json', 'bin/aws_bash_completer']},
3434
install_requires=requires,
3535
extras_require={
3636
':python_version=="2.6"': [

0 commit comments

Comments
 (0)