Closed ividyon closed 1 year ago
@ividyon , I don't understand this problem well, could you make it clearer by giving an example of what you want?
There are:
PromptPlus.WriteLine("text")
PromptPlus.SingleDash("text")
PromptPlus.DoubleDash("text")
// ...
for the regular PromptPlus console output.
This console output is directed to the stdout
stream.
There is also
PromptPlus.Error.WriteLine("text")
to direct lines to the stderr
stream, which is good practice for diagnostic output from a console application.
But there are no:
PromptPlus.Error.SingleDash("text")
PromptPlus.Error.DoubleDash("text")
// ...
and other such printing functions.
Perfect, I understand!
@ividyon , 'm working on this implementation.
The implementation so far looks like this:
//write to standard error output stream for any output included within 'using'
using (PromptPlus.OutputError())
{
PromptPlus.DoubleDash("anytext");
PromptPlus.WriteLine("Test");
}
That's a very good way of solving it!
Fixed scheduled for publication 4.0.6
I noticed that PromptPlus.Error seems to only support WriteLine in terms of output. However PromptPlus has other interesting methods, such as Write, DoubleDash, SingleDash etc. I believe those should also be supported for the
outerr
stream.