Skip to content

Commit 0c42ef9

Browse files
committed
Update README zsh completion for bundled installer
The README's zsh section points to bin/aws_zsh_completer.sh, which is shipped via Package Manager installs (e.g. pip) but not by the bundled installer (zip/pkg). Bundled-installer users following the README hit "No such file or directory" when sourcing it. Keep the existing pip instructions and add a parallel block for bundled installs using the bashcompinit + complete -C approach documented in the AWS CLI User Guide. Both methods now coexist without removing the legacy path that pip users still rely on. Fixes aws#8957
1 parent 8ad9b4e commit 0c42ef9

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

README.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,27 @@ For tcsh::
8787

8888
You should add this to your startup scripts to enable it for future sessions.
8989

90-
For zsh please refer to ``bin/aws_zsh_completer.sh``. Source that file, e.g.
91-
from your ``~/.zshrc``, and make sure you run ``compinit`` before::
90+
For zsh (Package Manager, e.g. pip installs) please refer to
91+
``bin/aws_zsh_completer.sh``. Source that file, e.g. from your
92+
``~/.zshrc``, and make sure you run ``compinit`` before::
9293

9394
$ source bin/aws_zsh_completer.sh
9495

9596
For now the bash compatibility auto completion (``bashcompinit``) is used.
9697
For further details please refer to the top of ``bin/aws_zsh_completer.sh``.
9798

99+
For zsh (bundled installer, e.g. zip/pkg), use ``aws_completer``
100+
directly with ``bashcompinit``::
101+
102+
$ autoload bashcompinit && bashcompinit
103+
$ autoload -Uz compinit && compinit
104+
$ complete -C '/usr/local/bin/aws_completer' aws
105+
106+
Replace ``/usr/local/bin/aws_completer`` with the path returned by
107+
``which aws_completer`` if different. Add these commands to your
108+
``~/.zshrc`` to enable completion in future sessions.
109+
110+
98111
---------------
99112
Getting Started
100113
---------------

0 commit comments

Comments
 (0)