Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore insecure files and directories in compinit #633

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bin/antigen.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ antigen () {
fi

-antigen-set-default ANTIGEN_COMPDUMP "${ADOTDIR:-$HOME}/.zcompdump"
-antigen-set-default ANTIGEN_COMPINIT "compinit"
-antigen-set-default ANTIGEN_LOG /dev/null

# CLONE_OPTS uses ${=CLONE_OPTS} expansion so don't use spaces
Expand All @@ -476,7 +477,7 @@ antigen () {
if -antigen-interactive-mode; then
TRACE "Gonna create compdump file @ env-setup" COMPDUMP
autoload -Uz compinit
compinit -d "$ANTIGEN_COMPDUMP"
"$ANTIGEN_COMPINIT" -d "$ANTIGEN_COMPDUMP"
compdef _antigen antigen
else
(( $+functions[antigen-ext-init] )) && antigen-ext-init
Expand Down Expand Up @@ -790,7 +791,7 @@ antigen-apply () {
# the one that actually initializes completions.
TRACE "Gonna create compdump file @ apply" COMPDUMP
autoload -Uz compinit
compinit -d "$ANTIGEN_COMPDUMP"
"$ANTIGEN_COMPINIT" -d "$ANTIGEN_COMPDUMP"

# Apply all `compinit`s that have been deferred.
local cdef
Expand Down Expand Up @@ -1820,7 +1821,7 @@ antigen () {
typeset -gaU fpath path
fpath+=(${_fpath[@]}) path+=(${_PATH[@]})
_antigen_compinit () {
autoload -Uz compinit; compinit -d "$ANTIGEN_COMPDUMP"; compdef _antigen antigen
autoload -Uz compinit; "$ANTIGEN_COMPINIT" -d "$ANTIGEN_COMPDUMP"; compdef _antigen antigen
add-zsh-hook -D precmd _antigen_compinit
}
autoload -Uz add-zsh-hook; add-zsh-hook precmd _antigen_compinit
Expand Down
2 changes: 1 addition & 1 deletion src/commands/apply.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ antigen-apply () {
# the one that actually initializes completions.
TRACE "Gonna create compdump file @ apply" COMPDUMP
autoload -Uz compinit
compinit -d "$ANTIGEN_COMPDUMP"
"$ANTIGEN_COMPINIT" -d "$ANTIGEN_COMPDUMP"

# Apply all `compinit`s that have been deferred.
local cdef
Expand Down
2 changes: 1 addition & 1 deletion src/ext/cache.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ antigen () {
typeset -gaU fpath path
fpath+=(${_fpath[@]}) path+=(${_PATH[@]})
_antigen_compinit () {
autoload -Uz compinit; compinit -d "$ANTIGEN_COMPDUMP"; compdef _antigen antigen
autoload -Uz compinit; "$ANTIGEN_COMPINIT" -d "$ANTIGEN_COMPDUMP"; compdef _antigen antigen
add-zsh-hook -D precmd _antigen_compinit
}
autoload -Uz add-zsh-hook; add-zsh-hook precmd _antigen_compinit
Expand Down
3 changes: 2 additions & 1 deletion src/lib/env-setup.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
fi

-antigen-set-default ANTIGEN_COMPDUMP "${ADOTDIR:-$HOME}/.zcompdump"
-antigen-set-default ANTIGEN_COMPINIT "compinit"
-antigen-set-default ANTIGEN_LOG /dev/null

# CLONE_OPTS uses ${=CLONE_OPTS} expansion so don't use spaces
Expand All @@ -54,7 +55,7 @@
if -antigen-interactive-mode; then
TRACE "Gonna create compdump file @ env-setup" COMPDUMP
autoload -Uz compinit
compinit -d "$ANTIGEN_COMPDUMP"
"$ANTIGEN_COMPINIT" -d "$ANTIGEN_COMPDUMP"
compdef _antigen antigen
else
(( $+functions[antigen-ext-init] )) && antigen-ext-init
Expand Down