Commit 856f0f46 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: use FOAM_DOC_BROWSER to specify alternative html document browser

- change from 'kde-open %f' to the desktop-agnostic 'firefox %f' as
  the default document browser.
parent 35afeb9b
......@@ -18,7 +18,7 @@ FoamFile
docBrowser "kde-open %f";
docBrowser "firefox %f";
......@@ -881,7 +881,12 @@ void Foam::argList::displayDoc(bool source) const
if (found)
string docBrowser(docDict.lookup("docBrowser"));
string docBrowser = getEnv("FOAM_DOC_BROWSER");
if (docBrowser.empty())
docDict.lookup("docBrowser") >> docBrowser;
// can use FOAM_DOC_BROWSER='application file://%f' if required
docBrowser.replaceAll("%f", docFile);
Info<< "Show documentation: " << docBrowser.c_str() << endl;
......@@ -37,7 +37,7 @@ Description
( "file1.txt" "file2.txt" ... "fileN.txt" )
The backslash-escaping has been used to avoid shell expansions.
The backslash-escaping is required to avoid interpretation by the shell.
@par Default command-line options
@param -case \<dir\> \n
......@@ -57,10 +57,14 @@ Description
global case.
- Adjustment of the valid (mandatory) arguments
- The document browser used is defined by the @b FOAM_DOC_BROWSER
environment variable or the <tt>Documentation/docBrowser</tt> entry
in the <tt>~OpenFOAM/controlDict</tt> file.
The \%f token is used as a placeholder for the file name.
- The valid (mandatory) arguments can be adjusted
by directly manipulating the argList::validArgs static member.
- Adjustment of the valid options
via the addOption/removeOption static methods or by directly
- The valid options can be adjusted
via the addOption/removeOption static methods instead of directly
manipulating the argList::validOptions static member.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment