0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ARM版homebrewでインストールしたaws cliのコマンド補完を有効にする方法

Posted at

aws公式の手順が分かりづらかったのでまとめました。

環境

- M1 mac
- zsh
- ARM版homebrew
- aws cli v2

手順

  1. aws_completerのパスを確認する。

$ which aws_completer

/opt/homebrew/bin/aws_completer

1. /usr/local/binにシンボリックリンクを作成する

    ```
$ cd /usr/local/bin
$ ln -s /opt/homebrew/bin/aws_completer
  1. .zshrcに設定を追加する

$ vim ~/.zshrc

autoload bashcompinit && bashcompinit
autoload -Uz compinit && compinit
compinit
complete -C '/usr/local/bin/aws_completer' aws

1. 確認する

$ source ~/.zshrc
$ aws dynamodb [TAB]
batch-execute-statement describe-table restore-table-to-point-in-time
batch-get-item describe-table-replica-auto-scaling scan
batch-write-item describe-time-to-live tag-resource
create-backup disable-kinesis-streaming-destination transact-get-items
create-global-table enable-kinesis-streaming-destination transact-write-items
create-table execute-statement untag-resource
delete-backup execute-transaction update-continuous-backups
delete-item export-table-to-point-in-time update-contributor-insights
delete-table get-item update-global-table
describe-backup list-backups update-global-table-settings
describe-continuous-backups list-contributor-insights update-item
describe-contributor-insights list-exports update-table
describe-endpoints list-global-tables update-table-replica-auto-scaling



# 参考
[公式ドキュメント](https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-configure-completion.html#cli-command-completion-windows)
[AWS CLI v2のコマンド補完を有効にする](https://qiita.com/charon/items/3788ea6d48adc23ae1dd)
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?