Skip to content

Commit af4bd29

Browse files
committed
Fix PowerShell#387: Add foreground colors and prefixes to Write-* command output
1 parent f04fc5f commit af4bd29

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/PowerShellEditorServices/Session/SessionPSHostUserInterface.cs

+9-6
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,10 @@ public override void WriteDebugLine(string message)
338338
if (this.consoleHost != null)
339339
{
340340
this.consoleHost.WriteOutput(
341-
message,
341+
"DEBUG: " + message,
342342
true,
343-
OutputType.Debug);
343+
OutputType.Debug,
344+
foregroundColor: ConsoleColor.Yellow);
344345
}
345346
}
346347

@@ -349,9 +350,10 @@ public override void WriteVerboseLine(string message)
349350
if (this.consoleHost != null)
350351
{
351352
this.consoleHost.WriteOutput(
352-
message,
353+
"VERBOSE: " + message,
353354
true,
354-
OutputType.Verbose);
355+
OutputType.Verbose,
356+
foregroundColor: ConsoleColor.Blue);
355357
}
356358
}
357359

@@ -360,9 +362,10 @@ public override void WriteWarningLine(string message)
360362
if (this.consoleHost != null)
361363
{
362364
this.consoleHost.WriteOutput(
363-
message,
365+
"WARNING: " + message,
364366
true,
365-
OutputType.Warning);
367+
OutputType.Warning,
368+
foregroundColor: ConsoleColor.Yellow);
366369
}
367370
}
368371

0 commit comments

Comments
 (0)