[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting speller from a shell script
From: |
Benno Schulenberg |
Subject: |
Re: Setting speller from a shell script |
Date: |
Sun, 6 Nov 2022 09:34:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 |
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
Description: OpenPGP digital signature