about summary refs log tree commit diff
path: root/Completion/Commands
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-05-12 04:49:46 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-05-12 04:49:46 +0000
commitea0ddb0fc6073be3d7d289e59b083f564dbd761f (patch)
treed1e3f1be8624d47e7e8a75838f9e84885a17a484 /Completion/Commands
parent53d36e795b26a945048e7a87a1a91224f8e1663a (diff)
downloadzsh-ea0ddb0fc6073be3d7d289e59b083f564dbd761f.tar.gz
zsh-ea0ddb0fc6073be3d7d289e59b083f564dbd761f.tar.xz
zsh-ea0ddb0fc6073be3d7d289e59b083f564dbd761f.zip
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"