Closed Taitava closed 1 year ago
This feature is quite complete, I think. But I have one problem that I need to think about. If both stdout
and stderr
contain output, sometimes they will be outputted in a bit wrong order.
Example:
echo Line0
[Console]::Error.WriteLine("Error line1")
[Console]::Error.WriteLine("Error line2")
echo Line1
echo Line2
echo Line3
echo Line4
echo Line5
echo Line6
echo Line7
echo Line8
echo Line9
Sometimes Error line1 and Error line2 are processed after Line1, or even later. According to my quick research, it looks like there's no way to guarantee the output order:
I have only tested this in PowerShell.
I'll continue thinking about this.
I have one problem that I need to think about. If both
stdout
andstderr
contain output, sometimes they will be outputted in a bit wrong order....
I'll continue thinking about this.
I have decided not to search for any solutions for this problem - at least at this time. This feature can be released even with this problem existing.
Documentation is done. Still needs tests.
Still need to make tests for the following output channels:
All tests are now created. The feature should be ready now, and will be released in 0.17.0
.
Released now.
Discussed in https://github.com/Taitava/obsidian-shellcommands/discussions/64
So far, output has been handled after the whole shell command execution process has finished. That's perfectly fine for most shell commands, if they run quickly.
I will add a choice to start handling output before a shell command has finished executing. It will allow e.g. to get output text inserted to current note in multiple phases during a single shell command executon process.
The traditional way will also be still available, and it will stay as a default output handling mode.
128 gave me some implementation ideas: https://github.com/Taitava/obsidian-shellcommands/pull/128/files?diff=unified&w=0.
TODO: