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

tldr: Default search path #136

Closed
DUO-1337 opened this issue Aug 28, 2020 · 1 comment
Closed

tldr: Default search path #136

DUO-1337 opened this issue Aug 28, 2020 · 1 comment

Comments

@DUO-1337
Copy link

my os is Manjaro Linux x86_64
[ymcold@ymcold-vmwarevirtualplatform ~]$ strace.py tldr tar ... getpeername(3, 0x00007ffeb4090220, 0x00007ffeb409021c) = 0 getpid() = 1936 (0x0000000000000790) getpid() = 1936 (0x0000000000000790) getpid() = 1936 (0x0000000000000790) getpid() = 1936 (0x0000000000000790) getpid() = 1936 (0x0000000000000790) getpid() = 1936 (0x0000000000000790) write(3, 0x0000562fb2ff0db0, 517) = 517 (0x0000000000000205) read(3, 0x0000562fb2fe7b93, 5) = -104 ECONNRESET (Connection reset by peer) ioctl(3, 21537, 140731918909500) = 0 close(3) = 0 openat(-100, '/home/ymcold/.cache/tldr/pages/linux/tar.md', O_RDONLY|O_CLOEXEC (0o2000000), O_RDONLY) = -2 ENOENT (No such file or directory) Error fetching from tldr: <urlopen error [Errno 104] Connection reset by peer> write(2, 'Error fetching from tldr: <urlopen error [Errno 104] Connection reset by peer>\n', 79) = 79 (0x000000000000004f) ioctl(1, 21505, 140731918918048) = -25 ENOTTY (Inappropriate ioctl for device) rt_sigaction(SIGINT, 0x00007ffeb4092a50, 0x00007ffeb4092af0, 0x0000000000000008) = 0 sigaltstack(NULL, 0x00007ffeb4092d00) = 0 sigaltstack(0x00007f16e023ad20, NULL) = 0 exit_group(1) *** Process 1936 exited with code 1 ***
when i use tldr tar, it only search the ~/.cache/tldr/page/linux/, but tar.md ~/.cache/tldr/page/common;I think the the default search path should be /page/os and /page/commen ;

@MasterOdin
Copy link
Collaborator

MasterOdin commented Aug 5, 2021

Sorry for missing this issue. We already do first search for the OS specific page before falling back to common. However, as indicated in #118, we make network requests for each searched location. Instead, as stated there, we should check if we have any matching files on the filesystem first and use them before making network calls.

Closing this as I think it's just a duplicate.

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

No branches or pull requests

2 participants