From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: PATCH: spelling correction
Date: Fri, 26 Mar 1999 14:58:38 +0100 [thread overview]
Message-ID: <9903261358.AA69406@ibmth.df.unipi.it> (raw)
Since we can now do spelling correction of a word directly, with the
separation of completion bits into completers, it might be as well to have
a command for it... it's a sort of generic version of _complete_filename,
which is not really necessary any more. It relies on the compconfig
settings used in _correct/_approximate for most things, but apart from
correct_accept I couldn't think of any to set specially here. (I can
imagine binding this to \e$. In fact, it's hard to imagine why I'd want to
use spell-word instead.)
--- Completion/Commands/_correct_filename.bak Fri Mar 26 14:47:03 1999
+++ Completion/Commands/_correct_filename Fri Mar 26 14:48:10 1999
@@ -1,4 +1,4 @@
-#defkeycomp complete-word \C-xc
+#defkeycomp 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
--- Completion/Commands/_correct_word.bak Fri Mar 26 14:46:53 1999
+++ Completion/Commands/_correct_word Fri Mar 26 14:47:16 1999
@@ -0,0 +1,12 @@
+#defkeycomp 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
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
reply other threads:[~1999-03-26 14:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9903261358.AA69406@ibmth.df.unipi.it \
--to=pws@ibmth.df.unipi.it \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).