- Enhanced diagnostics command.
This commit is contained in:
Paul Beckingham 2011-03-20 17:12:47 -04:00
parent 81e6af427f
commit 7c9ebec557
3 changed files with 21 additions and 1 deletions

View file

@ -194,7 +194,18 @@ void handleDiagnostics (std::string& outs)
std::cout << " Regex: "
<< (context.config.getBoolean ("regex") ? "Enabled" : "Disabled")
<< "\n\n";
<< "\n";
// Determine rc.editor/$EDITOR/$VISUAL.
char* peditor;
if (context.config.get ("editor") != "")
std::cout << " rc.editor: " << context.config.get ("editor") << "\n";
else if ((peditor = getenv ("VISUAL")) != NULL)
std::cout << " $VISUAL: " << peditor << "\n";
else if ((peditor = getenv ("EDITOR")) != NULL)
std::cout << " $EDITOR: " << peditor << "\n";
std::cout << "\n";
// External commands.
std::cout << "External Utilities\n";
@ -279,6 +290,7 @@ void handleDiagnostics (std::string& outs)
<< context.getHeight ()
<< ")\n";
}
std::cout << "\n";
}