my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

3 years ago
  1. # Docker plugin
  2. This plugin adds auto-completion for [docker](https://www.docker.com/).
  3. To use it add `docker` to the plugins array in your zshrc file.
  4. ```zsh
  5. plugins=(... docker)
  6. ```
  7. A copy of the completion script from the docker/cli git repo:
  8. https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker
  9. ## Settings
  10. By default, the completion doesn't allow option-stacking, meaning if you try to
  11. complete `docker run -it <TAB>` it won't work, because you're _stacking_ the
  12. `-i` and `-t` options.
  13. [You can enable it](https://github.com/docker/cli/commit/b10fb43048) by **adding
  14. the lines below to your zshrc file**, but be aware of the side effects:
  15. > This enables Zsh to understand commands like `docker run -it
  16. > ubuntu`. However, by enabling this, this also makes Zsh complete
  17. > `docker run -u<tab>` with `docker run -uapprox` which is not valid. The
  18. > users have to put the space or the equal sign themselves before trying
  19. > to complete.
  20. >
  21. > Therefore, this behavior is disabled by default. To enable it:
  22. >
  23. > ```
  24. > zstyle ':completion:*:*:docker:*' option-stacking yes
  25. > zstyle ':completion:*:*:docker-*:*' option-stacking yes
  26. > ```