From 0f790e66e278261421be6bb2b1285564f929469a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 15 Mar 2017 13:49:50 +0000 Subject: In URIs in apropos(1) result tables, only write the manpath if it does not match the default. --- cgi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cgi.c b/cgi.c index e9d1a080..e336a51d 100644 --- a/cgi.c +++ b/cgi.c @@ -653,9 +653,12 @@ pg_searchres(const struct req *req, struct manpage *r, size_t sz) for (i = 0; i < sz; i++) { printf(" \n" " " - "", - scriptname, *scriptname == '\0' ? "" : "/", - req->q.manpath, r[i].file); + "q.manpath, req->p[0])) + printf("%s/", req->q.manpath); + printf("%s\">", r[i].file); html_print(r[i].names); printf("\n" " "); -- cgit