mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
49917: change sense of "Ignore insecure ..." answer and use "autoload -r"
This commit is contained in:
parent
bf3ae15f46
commit
53d6b47d92
3 changed files with 15 additions and 11 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2022-03-29 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 49917: Completion/compinit, Doc/Zsh/compsys.yo: change sense
|
||||||
|
of "Ignore insecure ..." answer to ignore the files rather than
|
||||||
|
ignore the problem. Use "autoload -r" for autoload paths.
|
||||||
|
|
||||||
2022-03-29 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
2022-03-29 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
* 49853 + 49882/49883: Src/subst.c, Test/D04parameter.ztst: make
|
* 49853 + 49882/49883: Src/subst.c, Test/D04parameter.ztst: make
|
||||||
|
|
|
@ -329,7 +329,7 @@ compdef() {
|
||||||
# and probably do autoloading.
|
# and probably do autoloading.
|
||||||
|
|
||||||
func="$1"
|
func="$1"
|
||||||
[[ -n "$autol" ]] && autoload -Uz "$func"
|
[[ -n "$autol" ]] && autoload -rUz "$func"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
case "$type" in
|
case "$type" in
|
||||||
|
@ -451,7 +451,7 @@ typeset _i_wdirs _i_wfiles
|
||||||
_i_wdirs=()
|
_i_wdirs=()
|
||||||
_i_wfiles=()
|
_i_wfiles=()
|
||||||
|
|
||||||
autoload -Uz compaudit
|
autoload -RUz compaudit
|
||||||
if [[ -n "$_i_check" ]]; then
|
if [[ -n "$_i_check" ]]; then
|
||||||
typeset _i_q
|
typeset _i_q
|
||||||
if ! eval compaudit; then
|
if ! eval compaudit; then
|
||||||
|
@ -467,19 +467,17 @@ Ignore insecure $_i_q and continue [y] or abort compinit [n]? "; then
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
_i_wfiles=()
|
|
||||||
_i_wdirs=()
|
|
||||||
else
|
|
||||||
(( $#_i_wfiles )) && _i_files=( "${(@)_i_files:#(${(j:|:)_i_wfiles%.zwc})}" )
|
|
||||||
(( $#_i_wdirs )) && _i_files=( "${(@)_i_files:#(${(j:|:)_i_wdirs%.zwc})/*}" )
|
|
||||||
fi
|
fi
|
||||||
|
fpath=(${fpath:|_i_wdirs})
|
||||||
|
(( $#_i_wfiles )) && _i_files=( "${(@)_i_files:#(${(j:|:)_i_wfiles%.zwc})}" )
|
||||||
|
(( $#_i_wdirs )) && _i_files=( "${(@)_i_files:#(${(j:|:)_i_wdirs%.zwc})/*}" )
|
||||||
fi
|
fi
|
||||||
typeset -g _comp_secure=yes
|
typeset -g _comp_secure=yes
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure compdump is available, even if we aren't going to use it.
|
# Make sure compdump is available, even if we aren't going to use it.
|
||||||
autoload -Uz compdump compinstall
|
autoload -RUz compdump compinstall
|
||||||
|
|
||||||
# If we have a dump file, load it.
|
# If we have a dump file, load it.
|
||||||
|
|
||||||
|
@ -538,7 +536,7 @@ if [[ -z "$_i_done" ]]; then
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
(\#autoload)
|
(\#autoload)
|
||||||
autoload -Uz "$_i_line[@]" ${_i_name}
|
autoload -rUz "$_i_line[@]" ${_i_name}
|
||||||
[[ "$_i_line" != \ # ]] && _compautos[${_i_name}]="$_i_line"
|
[[ "$_i_line" != \ # ]] && _compautos[${_i_name}]="$_i_line"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -570,6 +568,6 @@ if [[ ${_i_line[2]} = expand-or-complete ]] &&
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unfunction compinit compaudit
|
unfunction compinit compaudit
|
||||||
autoload -Uz compinit compaudit
|
autoload -RUz compinit compaudit
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -190,7 +190,7 @@ tt(compinit) will ask if the completion system should really be used. To
|
||||||
avoid these tests and make all files found be used without asking, use the
|
avoid these tests and make all files found be used without asking, use the
|
||||||
option tt(-u), and to make tt(compinit) silently ignore all insecure files
|
option tt(-u), and to make tt(compinit) silently ignore all insecure files
|
||||||
and directories use the option tt(-i). This security check is skipped
|
and directories use the option tt(-i). This security check is skipped
|
||||||
entirely when the tt(-C) option is given.
|
entirely when the tt(-C) option is given, provided the dumpfile exists.
|
||||||
|
|
||||||
findex(compaudit)
|
findex(compaudit)
|
||||||
The security check can be retried at any time by running the function
|
The security check can be retried at any time by running the function
|
||||||
|
|
Loading…
Reference in a new issue