From ea0ddb0fc6073be3d7d289e59b083f564dbd761f Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 12 May 1999 04:49:46 +0000 Subject: pws-18 --- Completion/Commands/_correct_filename | 2 +- Completion/Commands/_correct_word | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'Completion/Commands') diff --git a/Completion/Commands/_correct_filename b/Completion/Commands/_correct_filename index 53ed6d113..baef38edf 100644 --- a/Completion/Commands/_correct_filename +++ b/Completion/Commands/_correct_filename @@ -1,4 +1,4 @@ -#compdef -k complete-word \C-xc +#compdef -k complete-word \C-xC # Function to correct a filename. Can be used as a completion widget, # or as a function in its own right, in which case it will print the diff --git a/Completion/Commands/_correct_word b/Completion/Commands/_correct_word index db3023860..d0abcd4fe 100644 --- a/Completion/Commands/_correct_word +++ b/Completion/Commands/_correct_word @@ -3,10 +3,23 @@ # 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 +local oco="$compconfig[correct_original]" +local ocp="$compconfig[correct_prompt]" +local oci="$compconfig[correct_insert]" + +compconfig[correct_accept]="${compconfig[correctword_accept]-6n}" +compconfig[correct_original]="${compconfig[correctword_original]-$oco}" +compconfig[correct_prompt]="${compconfig[correctword_prompt]-$ocp}" +compconfig[correct_insert]="${compconfig[correctword_insert]}" _main_complete _correct -compconfig[correct_accept]=$oca +compconfig[correct_accept]="$oca" +compconfig[correct_original]="$oco" +compconfig[correct_prompt]="$ocp" +compconfig[correct_insert]="$oci" -- cgit 1.4.1