From 6bdaf4e1745e78993c72660dea12b06e9aeece17 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 7 Jun 2000 06:47:40 +0000 Subject: setup options in bindable commands (11789) --- Completion/Commands/_correct_word | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'Completion/Commands/_correct_word') diff --git a/Completion/Commands/_correct_word b/Completion/Commands/_correct_word index db3023860..2d8d3065a 100644 --- a/Completion/Commands/_correct_word +++ b/Completion/Commands/_correct_word @@ -3,10 +3,19 @@ # Simple completion front-end implementing spelling correction. # The maximum number of errors is set quite high, and # the numeric prefix can be used to specify a different value. +# +# If configurations keys with the prefix `correctword_' are +# given they override those starting with `correct_'. -local oca="$compconfig[correct_accept]" -compconfig[correct_accept]=6n +setopt localoptions nullglob rcexpandparam extendedglob +unsetopt markdirs globsubst shwordsplit nounset ksharrays -_main_complete _correct +local curcontext="$curcontext" + +if [[ -z "$curcontext" ]]; then + curcontext="correct-word:::" +else + curcontext="correct-word:${curcontext#*:}" +fi -compconfig[correct_accept]=$oca +_main_complete _correct -- cgit 1.4.1