|
From: | Find Marbles |
Subject: | Re: Setting speller from a shell script |
Date: | Sun, 6 Nov 2022 15:04:18 +0100 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |