about summary refs log tree commit diff
path: root/Completion/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Commands')
-rw-r--r--Completion/Commands/_correct_filename2
-rw-r--r--Completion/Commands/_correct_word17
2 files changed, 16 insertions, 3 deletions
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"