1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-02 13:26:03 +02:00

11044, 11260: DVORAK options for spell checking.

This commit is contained in:
Peter Stephenson 2000-05-08 15:56:37 +00:00
parent 3c04bfefda
commit 705fd24fd5
5 changed files with 33 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2000-05-08 Peter Stephenson <pws@cambridgesiliconradio.com>
* 11260: Doc/Zsh/options.yo: docs for 11044
* Hiroki Tamakoshi: 11044: Src/options.c, Src/utils.c, Src/zsh.h:
Option to use Dvorak keyboard in spell-checking.
2000-05-08 Geoff Wing <gcw@zsh.org>
* gcw: unposted: Etc/CONTRIBUTORS fix

View File

@ -326,6 +326,12 @@ do not report an error unless all the patterns
in a command have no matches.
Overrides tt(NULL_GLOB).
)
pindex(DVORAK)
item(tt(DVORAK))(
Use the Dvorak keyboard instead of the standard qwerty keyboard as a basis
for examining spelling mistakes for the tt(CORRECT) and tt(CORRECT_ALL)
options and the tt(spell-word) editor command.
)
pindex(EQUALS)
cindex(filename expansion, =)
item(tt(EQUALS) <Z>)(

View File

@ -210,6 +210,7 @@ static struct optname optns[] = {
{NULL, "promptvars", OPT_ALIAS, /* bash */ PROMPTSUBST},
{NULL, "stdin", OPT_ALIAS, /* ksh */ SHINSTDIN},
{NULL, "trackall", OPT_ALIAS, /* ksh */ HASHCMDS},
{NULL, "dvorak", 0, DVORAK},
{NULL, NULL, 0, 0}
};

View File

@ -2127,7 +2127,7 @@ static int
spdist(char *s, char *t, int thresh)
{
char *p, *q;
char *keymap =
const char qwertykeymap[] =
"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
\t1234567890-=\t\
\tqwertyuiop[]\t\
@ -2139,6 +2139,23 @@ spdist(char *s, char *t, int thresh)
\tASDFGHJKL:\"\n\t\
\tZXCVBNM<>?\n\n\t\
\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
const char dvorakkeymap[] =
"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
\t1234567890[]\t\
\t',.pyfgcrl/=\t\
\taoeuidhtns-\n\t\
\t;qjkxbmwvz\t\t\t\
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
\t!@#$%^&*(){}\t\
\t\"<>PYFGCRL?+\t\
\tAOEUIDHTNS_\n\t\
\t:QJKXBMWVZ\n\n\t\
\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
const char *keymap;
if ( isset( DVORAK ) )
keymap = dvorakkeymap;
else
keymap = qwertykeymap;
if (!strcmp(s, t))
return 0;

View File

@ -1431,6 +1431,7 @@ enum {
VERBOSE,
XTRACE,
USEZLE,
DVORAK,
OPT_SIZE
};