summaryrefslogtreecommitdiff
path: root/Completion/Base/Widget
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-05-29 11:59:50 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-05-29 11:59:50 +0000
commit4a7abbfdd6c68616143bae840333adeed5ad0066 (patch)
tree2bc3f4bf439c78ee7e1135361bc86d2d708c0125 /Completion/Base/Widget
parent1bb5d5aeb5565215aa3359874d7701045926b1b7 (diff)
downloadzsh-4a7abbfdd6c68616143bae840333adeed5ad0066.tar.gz
zsh-4a7abbfdd6c68616143bae840333adeed5ad0066.zip
use `eval $_comp_setup' in all entry points of the completion system to not only set up the options, but also redirect stdin and ignore trap handlers for ZERR (14530)
Diffstat (limited to 'Completion/Base/Widget')
-rw-r--r--Completion/Base/Widget/_bash_completions2
-rw-r--r--Completion/Base/Widget/_complete_debug4
-rw-r--r--Completion/Base/Widget/_complete_help4
-rw-r--r--Completion/Base/Widget/_correct_word2
-rw-r--r--Completion/Base/Widget/_expand_word2
-rw-r--r--Completion/Base/Widget/_history_complete_word2
-rw-r--r--Completion/Base/Widget/_next_tags2
7 files changed, 7 insertions, 11 deletions
diff --git a/Completion/Base/Widget/_bash_completions b/Completion/Base/Widget/_bash_completions
index 6980e8bfd..7abb654d4 100644
--- a/Completion/Base/Widget/_bash_completions
+++ b/Completion/Base/Widget/_bash_completions
@@ -25,7 +25,7 @@
# that will not have been overridden, so you should add '~' to the
# list of keys at the top of the for-loop.
-setopt localoptions ${_comp_options[@]}
+eval "$_comp_setup"
local key=$KEYS[-1] expl
diff --git a/Completion/Base/Widget/_complete_debug b/Completion/Base/Widget/_complete_debug
index acdb48fd8..6f670c8a9 100644
--- a/Completion/Base/Widget/_complete_debug
+++ b/Completion/Base/Widget/_complete_debug
@@ -1,8 +1,6 @@
#compdef -k complete-word \C-x?
-setopt localoptions ${_comp_options[@]}
-
-setopt localtraps noerrexit ; trap - ZERR
+eval "$_comp_setup"
(( $+_debug_count )) || integer -g _debug_count
local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count]
diff --git a/Completion/Base/Widget/_complete_help b/Completion/Base/Widget/_complete_help
index bfbfa3222..ffbcf0caa 100644
--- a/Completion/Base/Widget/_complete_help
+++ b/Completion/Base/Widget/_complete_help
@@ -1,9 +1,7 @@
#compdef -k complete-word \C-xh
_complete_help() {
- setopt localoptions ${_comp_options[@]}
-
- exec </dev/null # ZLE closes stdin, which can cause errors
+ eval "$_comp_setup"
local _sort_tags=_help_sort_tags text i j k tmp
typeset -A help_funcs help_tags help_sfuncs help_styles
diff --git a/Completion/Base/Widget/_correct_word b/Completion/Base/Widget/_correct_word
index 11b37efb1..fe2fbfeb1 100644
--- a/Completion/Base/Widget/_correct_word
+++ b/Completion/Base/Widget/_correct_word
@@ -7,7 +7,7 @@
# If configurations keys with the prefix `correctword_' are
# given they override those starting with `correct_'.
-setopt localoptions ${_comp_options[@]}
+eval "$_comp_setup"
local curcontext="$curcontext"
diff --git a/Completion/Base/Widget/_expand_word b/Completion/Base/Widget/_expand_word
index 48ce87ede..1e8ddb21b 100644
--- a/Completion/Base/Widget/_expand_word
+++ b/Completion/Base/Widget/_expand_word
@@ -2,7 +2,7 @@
# Simple completion front-end implementing expansion.
-setopt localoptions ${_comp_options[@]}
+eval "$_comp_setup"
local curcontext="$curcontext"
diff --git a/Completion/Base/Widget/_history_complete_word b/Completion/Base/Widget/_history_complete_word
index 1142f2f91..fe2a846db 100644
--- a/Completion/Base/Widget/_history_complete_word
+++ b/Completion/Base/Widget/_history_complete_word
@@ -15,7 +15,7 @@
# range -- range of history words to complete
_history_complete_word () {
- setopt localoptions ${_comp_options[@]}
+ eval "$_comp_setup"
local expl direction stop curcontext="$curcontext"
diff --git a/Completion/Base/Widget/_next_tags b/Completion/Base/Widget/_next_tags
index 29196a14d..0620a1f99 100644
--- a/Completion/Base/Widget/_next_tags
+++ b/Completion/Base/Widget/_next_tags
@@ -3,7 +3,7 @@
# Main widget.
_next_tags() {
- setopt localoptions ${_comp_options[@]}
+ eval "$_comp_setup"
local ins ops="$PREFIX$SUFFIX"