[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.15

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