1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-14 22:47:45 +08:00

Compare commits

..

No commits in common. "38f276a732238008a8d0e4a028a4f112bca56221" and "2bc1da7f377e78cdfa74190ffe5baf6c814d0fce" have entirely different histories.

3 changed files with 4 additions and 33 deletions

View File

@ -139,10 +139,10 @@ ZSH_THEME_RANDOM_CANDIDATES=(
)
```
If you only know which themes you don't like, you can add them similarly to an ignored list:
If you only know which themes you don't like, you can add them similarly to a blacklist:
```shell
ZSH_THEME_RANDOM_IGNORED=(pygmalion tjkirch_mod)
ZSH_THEME_RANDOM_BLACKLIST=(pygmalion tjkirch_mod)
```
### FAQ

View File

@ -10,25 +10,3 @@ 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
> ```

View File

@ -1,10 +1,3 @@
# Deprecate ZSH_THEME_RANDOM_BLACKLIST
if [[ -n "$ZSH_THEME_RANDOM_BLACKLIST" ]]; then
echo '[oh-my-zsh] ZSH_THEME_RANDOM_BLACKLIST is deprecated. Use `ZSH_THEME_RANDOM_IGNORED` instead.'
ZSH_THEME_RANDOM_IGNORED=($ZSH_THEME_RANDOM_BLACKLIST)
unset ZSH_THEME_RANDOM_BLACKLIST
fi
# Make themes a unique array
typeset -Ua themes
@ -18,8 +11,8 @@ else
"$ZSH_CUSTOM"/themes/*.zsh-theme(N:t:r)
"$ZSH"/themes/*.zsh-theme(N:t:r)
)
# Remove ignored themes from the list
for theme in random ${ZSH_THEME_RANDOM_IGNORED[@]}; do
# Remove blacklisted themes from the list
for theme in random ${ZSH_THEME_RANDOM_BLACKLIST[@]}; do
themes=("${(@)themes:#$theme}")
done
fi