[BACK]Return to spell.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / spell

Annotation of src/usr.bin/spell/spell.1, Revision 1.4

1.4     ! jmc         1: .\" $OpenBSD: spell.1,v 1.3 2002/03/02 16:33:51 millert Exp $
1.1       millert     2: .\"
                      3: .\" Copyright (C) 1985, 1993, 1994
                      4: .\"    The Regents of the University of California.  All rights reserved.
                      5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\" 1. Redistributions of source code must retain the above copyright
                     10: .\"    notice, this list of conditions and the following disclaimer.
                     11: .\" 2. Redistributions in binary form must reproduce the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer in the
                     13: .\"    documentation and/or other materials provided with the distribution.
                     14: .\" 3. All advertising materials mentioning features or use of this software
                     15: .\"    must display the following acknowledgement:
                     16: .\"    This product includes software developed by the University of
                     17: .\"    California, Berkeley and its contributors.
                     18: .\" 4. Neither the name of the University nor the names of its contributors
                     19: .\"    may be used to endorse or promote products derived from this software
                     20: .\"    without specific prior written permission.
                     21: .\"
                     22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     25: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     32: .\" SUCH DAMAGE.
                     33: .\"
                     34: .\" Copyright (C) Caldera International Inc.  2001-2002.
                     35: .\" All rights reserved.
                     36: .\"
                     37: .\" Redistribution and use in source and binary forms, with or without
                     38: .\" modification, are permitted provided that the following conditions
                     39: .\" are met:
                     40: .\" 1. Redistributions of source code and documentation must retain the above
                     41: .\"    copyright notice, this list of conditions and the following disclaimer.
                     42: .\" 2. Redistributions in binary form must reproduce the above copyright
                     43: .\"    notice, this list of conditions and the following disclaimer in the
                     44: .\"    documentation and/or other materials provided with the distribution.
                     45: .\" 3. All advertising materials mentioning features or use of this software
                     46: .\"    must display the following acknowledgement:
                     47: .\"    This product includes software developed or owned by Caldera
                     48: .\"    International, Inc.
                     49: .\" 4. Neither the name of Caldera International, Inc. nor the names of other
                     50: .\"    contributors may be used to endorse or promote products derived from
                     51: .\"    this software without specific prior written permission.
                     52: .\"
                     53: .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
                     54: .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
                     55: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     56: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     57: .\" IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT,
                     58: .\" INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                     59: .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
                     60: .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     61: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
                     62: .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
                     63: .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     64: .\" POSSIBILITY OF SUCH DAMAGE.
                     65: .\"
                     66: .\"    @(#)spell.1     8.2 (Berkeley) 4/18/94
                     67: .\"
                     68: .Dd April 18, 1994
                     69: .Dt SPELL 1
                     70: .Os
                     71: .Sh NAME
                     72: .Nm spell
                     73: .Nd find spelling errors
                     74: .Sh SYNOPSIS
                     75: .Nm spell
                     76: .Op Fl biltvx
                     77: .Op Fl d Ar list
                     78: .Op Fl h Ar spellhist
1.3       millert    79: .Oo
                     80: .Fl m
                     81: .Ar m | s | e | a | l
                     82: .Oc
1.1       millert    83: .Op Fl s Ar stop
                     84: .Op + Ns Ar extra_list
1.3       millert    85: .Op Ar
1.1       millert    86: .Sh DESCRIPTION
                     87: .Nm spell
                     88: collects words from the named documents and looks them up in a spelling list.
                     89: Words that neither occur among nor are derivable (by applying certain
                     90: inflections, prefixes or suffixes) from words in the spelling list
                     91: are printed on the standard output.
                     92: .Pp
                     93: If no files are named, words are collected from the standard input.
                     94: .Nm
                     95: ignores most
                     96: .Xr troff 1 ,
                     97: .Xr tbl 1 ,
                     98: .Xr eqn 1
                     99: and
                    100: .Xr pic 1
                    101: constructions.
                    102: Copies of all output may be accumulated in the history file,
                    103: if one is specified.
                    104: .Pp
                    105: By default,
                    106: .Nm
                    107: (like
                    108: .Xr deroff 1 )
                    109: follows chains of included files (`.so' and `.nx' commands).
                    110: .Pp
                    111: The default spelling list is based on Webster's Second International
                    112: dictionary and should be fairly complete.
                    113: Words that appear in the
                    114: .Dq stop list
                    115: are immediately flagged as misspellings, regardless of whether or not
                    116: they exist in one of the word lists.
                    117: This helps filter out misspellings (e.g. thier=thy\-y+ier)
                    118: that would otherwise pass.
                    119: Additionally, the
                    120: .Pa british
                    121: file is also used as a stop list unless the
                    122: .Fl b
                    123: option is specified.
                    124: .Pp
                    125: Site administrators may add words to the local word list,
                    126: .Pa /usr/local/share/dict/words
                    127: or the local stop list,
                    128: .Pa /usr/local/share/dict/stop .
                    129: .Pp
                    130: All word (and stop) lists must be sorted in lexigraphical order
                    131: with case folded.
                    132: The simplest way to achieve this is to use
1.2       millert   133: .Dq sort -df .
1.1       millert   134: If the word files are incorrectly sorted,
                    135: .Nm
                    136: will not be able to operate correctly.
                    137: .Pp
                    138: The options are as follows:
                    139: .Bl -tag -width Ds
                    140: .It Fl b
                    141: Check British spelling.
                    142: Besides preferring
                    143: .Em centre , colour , speciality , travelled ,
                    144: etc., this option insists upon
                    145: .Fl ise
                    146: in words like
                    147: .Em standardise ,
                    148: Fowler and the OED to the contrary notwithstanding.
                    149: In this mode, American variants of words are added to the stop list.
                    150: .It Fl i
                    151: Instruct
                    152: .Xr deroff 1
                    153: to ignore `.so' and `.nx' commands.
                    154: .It Fl l
                    155: Use
1.4     ! jmc       156: .Xr delatex
1.1       millert   157: instead of
                    158: .Xr deroff 1
                    159: if it is present on the system.
                    160: .It Fl t
                    161: Use
1.4     ! jmc       162: .Xr detex
1.1       millert   163: instead of
                    164: .Xr deroff 1
                    165: if it is present on the system.
                    166: .It Fl v
                    167: Print all words not literally in the spelling list in addition to
                    168: plausible derivations from spelling list words.
                    169: .It Fl x
                    170: Print every plausible stem, prefixed with `='.
                    171: .It Fl d Ar word_list
                    172: Use the specified word list instead of the default system word list.
                    173: The word list must be sorted as specified above.
                    174: .It Fl h Ar spellhist
                    175: Store misspelled words in the specified history file.
                    176: The output of
                    177: .Li who -m
                    178: is appended to the history file after the list of misspelled words.
1.3       millert   179: .It Fl m
                    180: Enable support for common
                    181: .Xr troff 1
                    182: macro packages; this option is passed verbatim to
                    183: .Xr deroff 1 .
                    184: The
                    185: .Fl m
                    186: option takes the following arguments:
                    187: .Bl -tag -width Ds
                    188: .It a
                    189: recognize
                    190: .Xr man 7
                    191: macros.
                    192: .It e
                    193: recognize
                    194: .Xr me 7
                    195: macros.
                    196: .It m
                    197: recognize
                    198: .Xr me 7
                    199: macros.
                    200: .It s
                    201: recognize
                    202: .Xr me 7
                    203: macros.
                    204: .It l
                    205: recognize
                    206: .Xr mm 7
                    207: macros and delete
                    208: .Xr mm 7
                    209: lists.
                    210: .El
1.1       millert   211: .It Fl s Ar stop_list
                    212: Use the specified stop list instead of the default system stop list.
                    213: The stop list must be sorted as specified above.
                    214: .It + Ns Ar extra_list
                    215: Use
                    216: .Ar extra_list
                    217: in addition to the default word list.
                    218: The extra word list must be sorted as specified above.
                    219: .El
                    220: .Sh FILES
                    221: .Bl -tag -width /usr/local/share/dict/wordsxx -compact
                    222: .It Pa /usr/share/dict/words
                    223: Default spelling list
                    224: .It Pa /usr/share/dict/american
                    225: American spelling of certain words
                    226: .It Pa /usr/share/dict/british
                    227: British spelling of certain words
                    228: .It Pa /usr/share/dict/stop
                    229: Default stop list.
                    230: .It Pa /usr/local/share/dict/words
                    231: Local spelling list (optional)
                    232: .It Pa /usr/local/share/dict/stop
                    233: Local stop list (optional)
                    234: .It Pa /usr/libexec/spellprog
                    235: Binary executed by the shell script
                    236: .Pa /usr/bin/spell .
                    237: .El
                    238: .Sh SEE ALSO
                    239: .Xr deroff 1 ,
                    240: .Xr look 1 ,
                    241: .Xr sed 1 ,
                    242: .Xr sort 1 ,
1.3       millert   243: .Xr tee 1 ,
                    244: .Xr troff 1
1.1       millert   245: .Sh BUGS
                    246: The spelling list lacks many technical terms; new installations will
                    247: probably wish to monitor the output for several months to gather local
                    248: additions.
                    249: .Pp
                    250: British spelling was done by an American.
                    251: .Pp
                    252: In
                    253: .Fl x
                    254: mode it would be nicer if the stems were grouped with the appropriate word.
                    255: .Sh HISTORY
                    256: The
                    257: .Nm spell
                    258: command appeared in
                    259: .At v6 .
                    260: .Pp
                    261: Unlike historic versions, the
                    262: .Ox
                    263: .Nm
                    264: command does not use hashed word files.
                    265: Instead, it uses lexigraphically sorted files and the same technique as
                    266: .Xr look 1 .