Skip to content

Commit

Permalink
[zsh] disable security check in compinit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitmel committed Oct 31, 2021
1 parent 640784b commit 3675f47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zsh/plugins.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@ fi; unset rustup_bin
break
done; unset match

# In both branches, -u disables the "security" (see the manpage) check and -d
# specifies the path to a completion dump.
if (( $run_compdump )); then
print -r -- "$0: rebuilding zsh completion dump"
# -D flag turns off compdump loading
compinit -D -d "${ZSH_CACHE_DIR}/zcompdump"
compinit -u -D -d "${ZSH_CACHE_DIR}/zcompdump"
compdump
else
# -C flag disables some checks performed by compinit - they are not needed
# because we already have a fresh compdump
compinit -C -d "${ZSH_CACHE_DIR}/zcompdump"
compinit -u -C -d "${ZSH_CACHE_DIR}/zcompdump"
fi
unset run_compdump

Expand Down

0 comments on commit 3675f47

Please sign in to comment.