diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-09-18 22:02:10 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-09-18 22:02:10 +0200 |
commit | 38f276a732238008a8d0e4a028a4f112bca56221 (patch) | |
tree | 4f2217fa5cbe6946fcb79c3eeb512a25c15e0a5b /plugins/docker/README.md | |
parent | bc9d4b89bb3985a250e5a702a0f2d76a8632cd8a (diff) | |
download | zsh-38f276a732238008a8d0e4a028a4f112bca56221.tar.gz zsh-38f276a732238008a8d0e4a028a4f112bca56221.tar.bz2 zsh-38f276a732238008a8d0e4a028a4f112bca56221.zip |
docker: document option-stacking setting
Fixes #9266
Diffstat (limited to 'plugins/docker/README.md')
-rw-r--r-- | plugins/docker/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/docker/README.md b/plugins/docker/README.md index 241a6a448..fab7aa8f1 100644 --- a/plugins/docker/README.md +++ b/plugins/docker/README.md @@ -10,3 +10,25 @@ plugins=(... docker) A copy of the completion script from the docker/cli git repo: https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker + +## Settings + +By default, the completion doesn't allow option-stacking, meaning if you try to +complete `docker run -it <TAB>` it won't work, because you're _stacking_ the +`-i` and `-t` options. + +[You can enable it](https://github.com/docker/cli/commit/b10fb43048) by **adding +the lines below to your zshrc file**, but be aware of the side effects: + +> This enables Zsh to understand commands like `docker run -it +> ubuntu`. However, by enabling this, this also makes Zsh complete +> `docker run -u<tab>` with `docker run -uapprox` which is not valid. The +> users have to put the space or the equal sign themselves before trying +> to complete. +> +> Therefore, this behavior is disabled by default. To enable it: +> +> ``` +> zstyle ':completion:*:*:docker:*' option-stacking yes +> zstyle ':completion:*:*:docker-*:*' option-stacking yes +> ``` |