mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-11-11 11:11:50 -05:00
fix(docker): create completions cache dir if missing (#14188)
Closes #13679 Co-Authored-By: Markus Towara <mtowara@gmail.com>
This commit is contained in:
@@ -48,6 +48,11 @@ fi
|
|||||||
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
||||||
0="${${(M)0:#/*}:-$PWD/$0}"
|
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||||
|
|
||||||
|
# Make sure the cache directory exists; when the plugin is loaded by a
|
||||||
|
# standalone plugin manager (e.g. antigen) the core is not sourced, so
|
||||||
|
# $ZSH_CACHE_DIR/completions may not have been created yet (#13679).
|
||||||
|
[[ -d "$ZSH_CACHE_DIR/completions" ]] || 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