Re: Setting speller from a shell script
Benno Schulenberg <[email protected]> Sun, 6 Nov 2022 09:34:17 +0100
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
Op 05-11-2022 om 14:13 schreef Find Marbles: > I know that a speller can be set in the nanorc as set speller "aspell -x -c" > > However is it possible to set it from a shell script? I did a set speller > "home/findmarbles/spellchecker.sh" in the nanorc. You will want to have a leading slash too: "/home...". > spellchecker.sh is a simple: > > #!/usr/bin/env bash > aspell -x -c Aspell needs an argument. Pass it on with $1: aspell -x -c $1 (Also, make sure spellchecker.sh is executable.) It is also possible to use the SPELL environment variable. In that case, make sure that _no_ nanorc file sets the speller command -- SPELL is a fallback, it does not override a nanorc setting. You can then simply do: export SPELL="aspell -x -c" (Personally I always add the -l option plus a language code, to make sure aspell checks the spelling for the correct language.) Benno
OpenPGP_signature
(application/pgp-signature, 840 B) - not displayed