diff --git a/SCHIZO/Commands/Output/CommandOutputStack.cs b/SCHIZO/Commands/Output/CommandOutputStack.cs index 01fcbff0..7e703a29 100644 --- a/SCHIZO/Commands/Output/CommandOutputStack.cs +++ b/SCHIZO/Commands/Output/CommandOutputStack.cs @@ -57,6 +57,7 @@ public void ModifyForConsoleNautilus(CommandExecutionContext ctx) { Sinks.Clear(); Sinks.Push(new SetResultSink(ctx)); + Sinks.Push(new SuppressOutputSink()); } /// diff --git a/SCHIZO/Commands/Output/SuppressOutputSink.cs b/SCHIZO/Commands/Output/SuppressOutputSink.cs new file mode 100644 index 00000000..2d7ffc4f --- /dev/null +++ b/SCHIZO/Commands/Output/SuppressOutputSink.cs @@ -0,0 +1,14 @@ +using SCHIZO.Helpers; + +namespace SCHIZO.Commands.Output; + +public sealed class SuppressOutputSink : ISink +{ + public bool TryConsume(ref object output) + { + if (MessageHelpers.SuppressOutput) + output = null; + + return false; + } +}