Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make hunspell look in XDG_DATA_DIRS for dictionaries #637

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthewbauer
Copy link

Some dictionaries may exist but only show up under XDG_DATA_DIRS. For
instance, $HOME/.local/share/hunspell could contain some dictionaries.

This patch adds each directory in the hunspell subdir of each
XDG_DATA_DIRS to the lookup path.

Some dictionaries may exist but only show up under XDG_DATA_DIRS. For
instance, $HOME/.local/share/hunspell could contain some dictionaries.

This patch adds each directory in the hunspell subdir of each
XDG_DATA_DIRS to the lookup path.
@@ -2044,6 +2044,13 @@ int main(int argc, char** argv) {
if (getenv("DICPATH")) {
path_std_str.append(getenv("DICPATH")).append(PATHSEP);
}
if (getenv("XDG_DATA_DIRS")) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at it, the basedir spec should probably be followed to the point (also support XDG_DATA_HOME and fall back to $HOME/.local/share and /usr/local/share/:/usr/share/ respectively).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants