1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-11 13:01:28 +02:00

38289: "builtin enable" in $_comp_setup to avoid accidentally invoking external command of the same name

This commit is contained in:
Barton E. Schaefer 2016-04-15 21:39:04 -07:00
parent 67c0174093
commit 5e71690c19
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2016-04-15 Barton E. Schaefer <schaefer@zsh.org>
* 38289: Completion/compinit: "builtin enable" in $_comp_setup
to avoid accidentally invoking external command of the same name
2016-04-14 Oliver Kiddle <opk@zsh.org> 2016-04-14 Oliver Kiddle <opk@zsh.org>
* Han Pingtian: 38219: Completion/Zsh/Context/_subscript: * Han Pingtian: 38219: Completion/Zsh/Context/_subscript:

View file

@ -167,11 +167,11 @@ _comp_options=(
typeset -gH _comp_setup='local -A _comp_caller_options; typeset -gH _comp_setup='local -A _comp_caller_options;
_comp_caller_options=(${(kv)options[@]}); _comp_caller_options=(${(kv)options[@]});
setopt localoptions localtraps localpatterns ${_comp_options[@]}; setopt localoptions localtraps localpatterns ${_comp_options[@]};
local IFS=$'\'\ \\t\\r\\n\\0\'' local IFS=$'\'\ \\t\\r\\n\\0\'';
enable -p \| \~ \( \? \* \[ \< \^ \# builtin enable -p \| \~ \( \? \* \[ \< \^ \# 2>/dev/null;
exec </dev/null; exec </dev/null;
trap - ZERR trap - ZERR;
local -a reply local -a reply;
local REPLY' local REPLY'
# These can hold names of functions that are to be called before/after all # These can hold names of functions that are to be called before/after all