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_word12
-rw-r--r--Completion/Commands/_most_recent_file2
3 files changed, 14 insertions, 2 deletions
diff --git a/Completion/Commands/_correct_filename b/Completion/Commands/_correct_filename
index 72bac5f1b..53ed6d113 100644
--- a/Completion/Commands/_correct_filename
+++ b/Completion/Commands/_correct_filename
@@ -1,4 +1,4 @@
-#defkeycomp 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
new file mode 100644
index 000000000..db3023860
--- /dev/null
+++ b/Completion/Commands/_correct_word
@@ -0,0 +1,12 @@
+#compdef -k complete-word \C-xc
+
+# 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.
+
+local oca="$compconfig[correct_accept]"
+compconfig[correct_accept]=6n
+
+_main_complete _correct
+
+compconfig[correct_accept]=$oca
diff --git a/Completion/Commands/_most_recent_file b/Completion/Commands/_most_recent_file
index 5bd737fd2..c571483ca 100644
--- a/Completion/Commands/_most_recent_file
+++ b/Completion/Commands/_most_recent_file
@@ -1,4 +1,4 @@
-#defkeycomp complete-word \C-xm
+#compdef -k complete-word \C-xm
 
 # Complete the most recent file matching the pattern on the line so
 # far: globbing is active, i.e. *.txt will be expanded to the most recent