CmdDiagnostics: Reports $EDITOR/$VISUAL

This commit is contained in:
Paul Beckingham 2016-03-17 18:16:19 -04:00
parent 7434ad59c2
commit 3ffc98dfea

View file

@ -120,6 +120,13 @@ int CmdDiagnostics (Log& log)
<< (env ? env : "-")
<< "\n";
// Determine rc.editor/$EDITOR/$VISUAL.
char* peditor;
if ((peditor = getenv ("VISUAL")) != NULL)
out << " $VISUAL: " << peditor << "\n";
else if ((peditor = getenv ("EDITOR")) != NULL)
out << " $EDITOR: " << peditor << "\n";
out << "\n";
std::cout << out.str ();
log.write ("info", out.str ());