about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:15:29 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:15:29 +0000
commit3f7c2e25905cbbd83d5b09c3471c1134a7cb7d8f (patch)
tree9d2a11fb42a730c8703ca12ca4da872182aa6992 /Completion
parent6c702f18c4f568832f98a915a721596af9ed8a36 (diff)
downloadzsh-3f7c2e25905cbbd83d5b09c3471c1134a7cb7d8f.tar.gz
zsh-3f7c2e25905cbbd83d5b09c3471c1134a7cb7d8f.tar.xz
zsh-3f7c2e25905cbbd83d5b09c3471c1134a7cb7d8f.zip
moved from Completion/Commands/_correct_word
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Widget/_correct_word20
1 files changed, 20 insertions, 0 deletions
diff --git a/Completion/Base/Widget/_correct_word b/Completion/Base/Widget/_correct_word
new file mode 100644
index 000000000..11b37efb1
--- /dev/null
+++ b/Completion/Base/Widget/_correct_word
@@ -0,0 +1,20 @@
+#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.
+#
+# If configurations keys with the prefix `correctword_' are
+# given they override those starting with `correct_'.
+
+setopt localoptions ${_comp_options[@]}
+
+local curcontext="$curcontext"
+
+if [[ -z "$curcontext" ]]; then
+  curcontext="correct-word:::"
+else
+  curcontext="correct-word:${curcontext#*:}"
+fi
+
+_main_complete _correct