LoginSignup
1
0

More than 5 years have passed since last update.

AWS command lineのautocompleteの設定

Posted at

背景

AWSの依存度が高くなる一方なので、awscliを使う機会が増え続けます。commandが長くて、autocompleteが欲しくなります。

公式ドキュメント

インストール説明

pip3を使ってインストールした。

pip3 install awscli
pip3 install awscli --upgrade --user

問題

簡単だと思いますが、aws_completerがどこにあるかがわからない。

FO-602:bin user-name$ which aws_completer
FO-602:bin user-name$ whereis aws_completer
FO-602:bin user-name$ locate aws_completer

全くない

FO-602:bin user-name$ pip3 show awscli
Name: awscli
Version: 1.15.64
Summary: Universal Command Line Environment for AWS.
Home-page: http://aws.amazon.com/cli/
Author: Amazon Web Services
Author-email: UNKNOWN
License: Apache License 2.0
Location: /Users/user-name/Library/Python/3.6/lib/python/site-packages
Requires: docutils, colorama, rsa, botocore, s3transfer, PyYAML
You are using pip version 9.0.3, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
FO-602:bin user-name$ find  /Users/feng.zhang/Library/Python/3.6/lib/python/site-packages/ -name  aws_completer
FO-602:bin user-name$ 

それでもない

FO-602:bin user-name$ ls /Users/user-name/Library/Python/3.6/
bin lib
FO-602:bin user-name$ ls /Users/user-name/Library/Python/3.6/bin/
__pycache__           aws_bash_completer    jp.py                 pyrsa-encrypt         pyrsa-priv2pub        rst2html.py           rst2latex.py          rst2odt_prepstyles.py rst2xetex.py
aws                   aws_completer         pyrsa-decrypt         pyrsa-encrypt-bigfile pyrsa-sign            rst2html4.py          rst2man.py            rst2pseudoxml.py      rst2xml.py
aws.cmd               aws_zsh_completer.sh  pyrsa-decrypt-bigfile pyrsa-keygen          pyrsa-verify          rst2html5.py          rst2odt.py            rst2s5.py             rstpep2html.py

見つけた。

設定

complete -C '/Users/user-name/Library/Python/3.6/bin/aws_completer' aws
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0