4

I'm trying to configure aspell version 3.1.20 to use the $XDG_CONFIG_HOME/aspell/ directory instead of ~/.aspell. According the the Arch Wiki, one can do so by setting the ASPELL_CONF environment variable to something like

"per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"

However, I'm Brazilian and I regurlarly use aspell to check spelling in both English and Portuguese. In other words, I need to specify multiple .pws and .prepl files (one for each language). I tried doing something along the lines of

export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl $XDG_CONFIG_HOME/aspell/pt_BR.pws; repl $XDG_CONFIG_HOME/aspell/pt_BR.prepl"

but I'm getting the following error messages:

$ aspell -l pt_BR check doc.txt
Error: Expected language "pt_BR" but got "en".

$ aspell -l en check doc.txt
Error: Expected language "pt_BR" but got "en".

How do I specify .pws and .prepl files for multiple languages?

Gark Garcia
  • 145
  • 3

1 Answers1

3

I just ran into the same problem. I think, I was able to solve this by moving all my .aspell* files into ~/.config/aspell/ and specifying

export ASPELL_CONF="home-dir $XDG_CONFIG_HOME/aspell/"

I am not sure, why does the Arch Wiki suggests specifying the path to every file separately. Maybe there is some edge case that I am not aware of, but for me the above approach worked flawlessly.

RuRo
  • 143
  • 6