-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing man page fails when info not found #12
Comments
I came here to report the same issue... the point is that some implementations of man (ie man-db, used by most distros) have a non-standard "-W" option, others (in my case, mandoc on voidlinux) do not. snprintf(buf, sizeof(buf), "man -w -W %s %s", ManOptions, name);
pathFile = popen(buf, "r");
if (fgets(buf, sizeof(buf), pathFile)==NULL)
{
/* Try without -W */
snprintf(buf, sizeof(buf), "man -w -W %s %s", ManOptions, name);
pathFile = popen(buf, "r");
if (fgets(buf, sizeof(buf), pathFile)==NULL)
{
fprintf(stderr, "Error executing command '%s'\n", buf);
exit(1);
}
}
pclose(pathFile); Should have no functional change as "-W" shows catpages which are no longer widespread afaik. |
I've run into this same issue on both NixOS and Void Linux. (it worked fine on Arch) I'm going to try building from source with this patch to see if it fixes it. |
…allow that Fixes baszoetekouw#12. Change courtesy of loreb: baszoetekouw#12 (comment)
@whitelynx perfect, thank you. |
The call to the man program has man -W and there is no option for man -W causing an error.
In manual.c at line 185 looks like the problem:
snprintf(buf, sizeof(buf), "man -w -W %s %s", ManOptions, name);
Maybe -C for configuration. This is a problem when the info page is not found.
The text was updated successfully, but these errors were encountered: