mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-09-29 22:46:06 +02:00
fix(docker): create completions cache directory when plugin loads
Co-authored-by: mcornella <1441704+mcornella@users.noreply.github.com>
This commit is contained in:
co-authored by
mcornella
parent
8e5be2cb3a
commit
4cdd45338c
@@ -48,6 +48,10 @@ fi
|
|||||||
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
||||||
0="${${(M)0:#/*}:-$PWD/$0}"
|
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||||
|
|
||||||
|
# Ensure cache completions dir exists when the plugin is loaded directly
|
||||||
|
# (e.g. antigen, where oh-my-zsh.sh might not run).
|
||||||
|
command mkdir -p "$ZSH_CACHE_DIR/completions"
|
||||||
|
|
||||||
# If the completion file doesn't exist yet, we need to autoload it and
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
# bind it to `docker`. Otherwise, compinit will have already done that.
|
# bind it to `docker`. Otherwise, compinit will have already done that.
|
||||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_docker" ]]; then
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_docker" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user