Skip to content

tldr --list ingnores language-specific cache directories #238

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

Closed
frenzymadness opened this issue Mar 4, 2024 · 0 comments · Fixed by #239
Closed

tldr --list ingnores language-specific cache directories #238

frenzymadness opened this issue Mar 4, 2024 · 0 comments · Fixed by #239

Comments

@frenzymadness
Copy link
Contributor

The problem is on this line:

path = get_cache_dir() / 'pages' / platform

I think that if a language is explicitly set, tldr should use its cache directory.

For example:

# LANG=zh_CN tldr lspci
…
# LANG=cs_CZ tldr cd
…
# ls -la /root/.cache/tldr/
total 0
drwxr-xr-x. 4 root root 56 Mar  4 12:30 .
drwxr-xr-x. 3 root root 48 Mar  4 12:25 ..
drwxr-xr-x. 3 root root 36 Mar  4 12:30 pages.cs
drwxr-xr-x. 3 root root 34 Mar  4 12:25 pages.zh

# LANG=zh_CN tldr --list
[]
# LANG=cs_CZ tldr --list
[]

I'm using the latest release.

frenzymadness added a commit to frenzymadness/tldr-python-client that referenced this issue Mar 4, 2024
frenzymadness added a commit to frenzymadness/tldr-python-client that referenced this issue Mar 4, 2024
frenzymadness added a commit to frenzymadness/tldr-python-client that referenced this issue Mar 27, 2024
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 a pull request may close this issue.

1 participant