3 <title>Specifying Options - GNU Aspell 0.60.6.1</title>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta name="description" content="Aspell 0.60.6.1 spell checker user's manual.">
6 <meta name="generator" content="makeinfo 4.8">
7 <link title="Top" rel="start" href="index.html#Top">
8 <link rel="up" href="Customizing-Aspell.html#Customizing-Aspell" title="Customizing Aspell">
9 <link rel="next" href="The-Options.html#The-Options" title="The Options">
10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
12 This is the user's manual for Aspell
14 GNU Aspell is a spell checker designed to eventually replace Ispell.
15 It can either be used as a library or as an independent spell checker.
17 Copyright (C) 2000--2011 Kevin Atkinson.
19 Permission is granted to copy, distribute and/or modify this
20 document under the terms of the GNU Free Documentation License,
21 Version 1.1 or any later version published by the Free Software
22 Foundation; with no Invariant Sections, no Front-Cover Texts and
23 no Back-Cover Texts. A copy of the license is included in the
24 section entitled "GNU Free Documentation License".
26 <meta http-equiv="Content-Style-Type" content="text/css">
27 <style type="text/css"><!--
28 pre.display { font-family:inherit }
29 pre.format { font-family:inherit }
30 pre.smalldisplay { font-family:inherit; font-size:smaller }
31 pre.smallformat { font-family:inherit; font-size:smaller }
32 pre.smallexample { font-size:smaller }
33 pre.smalllisp { font-size:smaller }
34 span.sc { font-variant:small-caps }
35 span.roman { font-family:serif; font-weight:normal; }
36 span.sansserif { font-family:sans-serif; font-weight:normal; }
42 <a name="Specifying-Options"></a>
43 Next: <a rel="next" accesskey="n" href="The-Options.html#The-Options">The Options</a>,
44 Up: <a rel="up" accesskey="u" href="Customizing-Aspell.html#Customizing-Aspell">Customizing Aspell</a>
48 <h3 class="section">4.1 Specifying Options</h3>
50 <h4 class="subsection">4.1.1 At the Command Line</h4>
52 <p>All options specified at the command line have the following basic format:
54 <pre class="example"> --<var>option</var>[=<var>value</var>]
56 <p class="noindent">where the `<samp><span class="samp">=</span></samp>' can be replaced by whitespace.
58 <p>Some options also have single letter abbreviations of the form:
60 <pre class="example"> <var>letter</var> [<var>optional_whitespace</var> <var>value</var>]
62 <p>Any non-ASCII characters are expected to be in the encoding
63 specified by the current locale.
65 <p>To reset an option to the default value, prefix the option with a
66 `<samp><span class="samp">reset-</span></samp>' and don't specify a value.
68 <h5 class="subsubsection">4.1.1.1 Value options</h5>
70 <p>To specify a value option simply specify the option with its
71 corresponding value. For example to set the filter mode to TeX use
72 `<samp><span class="samp">--mode=tex</span></samp>'.
74 <p>If a value option has a single letter shortcut simply specify the single
75 letter shortcut with its corresponding value. For example to use a the
76 accented version of the American English dictionary use `<samp><span class="samp">-d
77 en_US-w_accents</span></samp>'.
79 <h5 class="subsubsection">4.1.1.2 Boolean options</h5>
81 <p>To enable a boolean option simply specify the option without any
82 corresponding value, or prefix it with an `<samp><span class="samp">enable-</span></samp>'. For example
83 to create a backup file use `<samp><span class="samp">--backup</span></samp>'. To disable a boolean
84 option prefix the option name with a `<samp><span class="samp">dont-</span></samp>' or `<samp><span class="samp">disable-</span></samp>'.
85 To avoid creating a backup file use `<samp><span class="samp">--dont-backup</span></samp>'. Boolean options
86 can also be set directly like a value option where the value is either
87 "true" or "false", for example `<samp><span class="samp">--backup=true</span></samp>'.
89 <p>If a boolean option has a single letter abbreviation simply give the
90 letter corresponding to either enabling or disabling the option
91 without any corresponding value. For example, to consider run-together
92 words valid use `<samp><span class="samp">-C</span></samp>' or to consider them invalid use
93 `<samp><span class="samp">-B</span></samp>'
95 <h5 class="subsubsection">4.1.1.3 List options</h5>
97 <p>To add a value to the list, prefix the option name with an
98 `<samp><span class="samp">add-</span></samp>' and then specify the value to add. For example, to add
99 the URL filter use `<samp><span class="samp">--add-filter url</span></samp>'. To remove a value from
100 a list option, prefix the option name with a `<samp><span class="samp">rem-</span></samp>' and then
101 specify the value to remove. For example, to remove the URL filter use
102 `<samp><span class="samp">--rem-filter url</span></samp>'. To remove all items from a list prefix the
103 option name with a `<samp><span class="samp">clear-</span></samp>' without specify any value. For
104 example, to remove all filters use `<samp><span class="samp">--clear-filter</span></samp>'.
106 <p>A list option can also be set directly, in which case it will be set to
107 a single value. To directly set a list option to multiple values prefix
108 the option name with a `<samp><span class="samp">lset-</span></samp>' and separate each value with a
109 `<samp><span class="samp">:</span></samp>'. For example, to use the URL and TeX filter use
110 `<samp><span class="samp">--lset-filter url:tex</span></samp>'.
112 <h4 class="subsection">4.1.2 Via a Configuration File</h4>
114 <p>Aspell can also accept options via a personal or global configuration
115 file. The exact files to used are specified by the options
116 <samp><span class="option">per-conf</span></samp> and <samp><span class="option">conf</span></samp> respectively but the personal
117 configuration file is normally <samp><span class="file">.aspell.conf</span></samp> located in the
118 <samp><span class="env">HOME</span></samp> directory and the global one is normally <samp><span class="file">aspell.conf</span></samp>
119 which is located in the <samp><span class="file">etc</span></samp> directory which is normally
120 <samp><span class="file">/usr/etc</span></samp> or <samp><span class="file">/usr/local/etc</span></samp>. To find out the particular
121 values for your particular system use <samp><span class="command">aspell dump config</span></samp>.
123 <p>Each line of the configuration file has the format:
125 <pre class="example"> <var>option</var> [<var>value</var>]
127 <p>There may be any number of spaces between the option and the value
128 however it can only be spaces, i.e. there is no `<samp><span class="samp">=</span></samp>' between the
129 option name and the value and there are no preceding `<samp><span class="samp">--</span></samp>' as
130 used on the command line.
132 <p>Comments may also be included by preceding them with a `<samp><span class="samp">#</span></samp>' as
133 anything from a `<samp><span class="samp">#</span></samp>' to a newline is ignored. Blank lines are also
136 <p>To include a literal `<samp><span class="samp">#</span></samp>' use `<samp><span class="samp">\#</span></samp>'. To include a literal
137 `<samp><span class="samp">\</span></samp>' use `<samp><span class="samp">\\</span></samp>'. Any other non-alpha character can also be
138 protected by a `<samp><span class="samp">\</span></samp>' if necessary.
140 <p>Any non-ASCII characters are expected to be in UTF-8.
142 <p>To reset an option to the default value prefix the option with a
143 `<samp><span class="samp">reset-</span></samp>' and don't specify a value.
145 <p>Values set in the personal configuration file override those in the
146 global file. Options specified at either the command line or via an
147 environment variable override those specified by either configuration
151 <b>Note:</b> Filters and corresponding options also may be assembled
152 inside a special meta filter file named <samp><var>metafilter</var><span class="file">.flt</span></samp>. A
153 filter has to be loaded via adding a <code>add-filter </code><var>filtername</var>
154 line to the meta filter file before its options may be specified.
157 <h5 class="subsubsection">4.1.2.1 Value options</h5>
159 <p>To specify a value option simply include the option followed by the
160 corresponding value. For example to set the default language to
161 German use <samp><span class="option">lang german</span></samp>.
163 <h5 class="subsubsection">4.1.2.2 Boolean options</h5>
165 <p>To specify a boolean option simply include the option followed by a
166 `<samp><span class="samp">true</span></samp>' to enable it or a `<samp><span class="samp">false</span></samp>' to disable it. For example
167 to allow run-together words use `<samp><span class="samp">run-together true</span></samp>'.
169 <h5 class="subsubsection">4.1.2.3 List options</h5>
171 <p>To add a value to the list, prefix the option name with an
172 `<samp><span class="samp">add-</span></samp>' and then specify the value to add. For example to add
173 the URL filter use `<samp><span class="samp">add-filter url</span></samp>'. To remove a value from
174 a list option prefix the option name with a `<samp><span class="samp">rem-</span></samp>' and then
175 specify the value to remove. For example, to remove the URL filter use
176 `<samp><span class="samp">rem-filter url</span></samp>'. To remove all items from a list prefix the
177 option name with a `<samp><span class="samp">clear-</span></samp>' without specifying any value. For
178 example, to remove all filters use `<samp><span class="samp">clear-filter</span></samp>'.
180 <p>A list option can also be set directly, in which case it will be set to
181 a single value. To directly set a list option to multiple values prefix
182 the option name with a `<samp><span class="samp">lset-</span></samp>' and separate each value with a
183 `<samp><span class="samp">:</span></samp>'. For example, to use the URL and TeX filter use
184 `<samp><span class="samp">lset-filter url:tex</span></samp>'. To include a literal `<samp><span class="samp">:</span></samp>' use
185 `<samp><span class="samp">\:</span></samp>'.
187 <h4 class="subsection">4.1.3 Setting Options via an Environment Variable</h4>
189 <p>The environment variable <samp><span class="env">ASPELL_CONF</span></samp> may also be used and it
190 overrides any options set in the configuration file. The format of
191 the string is exactly the same as the configuration file except that
192 semicolons (`<samp><span class="samp">;</span></samp>') are used instead of newlines.