diff --git a/src/manual.c b/src/manual.c index 5f058ff..791df32 100644 --- a/src/manual.c +++ b/src/manual.c @@ -186,8 +186,14 @@ set_initial_history(char *name) pathFile = popen(buf, "r"); if (fgets(buf, sizeof(buf), pathFile)==NULL) { - fprintf(stderr, "Error executing command '%s'\n", buf); - exit(1); + /* Try without -W */ + snprintf(buf, sizeof(buf), "man -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); /* buf will be of the form "/usr/share/man/man1/sleep.1.gz". We