X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/379096a3a25f5b4847442f1ce3331430292f6209..5170c61b991ea676f0c3afc1aeb74d5148efe4f5:/disobedience/help.c diff --git a/disobedience/help.c b/disobedience/help.c index 5b708e8..ca5a8d8 100644 --- a/disobedience/help.c +++ b/disobedience/help.c @@ -31,7 +31,16 @@ void popup_help(const char *what) { if(!what) what = "index.html"; - byte_xasprintf(&path, "%s/%s", dochtmldir, what); +#if __APPLE__ + if(!strcmp(browser, "open")) + /* Apple's open(1) isn't really a web browser so needs some extra hints + * that it should see the argument as a URL. Otherwise it doesn't treat # + * specially. A better answer would be to identify the system web browser + * and invoke it directly. */ + byte_xasprintf(&path, "file:///%s/%s", dochtmldir, what); + else +#endif + byte_xasprintf(&path, "%s/%s", dochtmldir, what); if(!(pid = xfork())) { exitfn = _exit; if(!xfork()) {