mirror of https://gitlab.com/basile.b/dexed.git
added runnable console wrapper example
This commit is contained in:
parent
c41cbc5b52
commit
0787af2b9d
|
@ -0,0 +1,25 @@
|
||||||
|
module console;
|
||||||
|
|
||||||
|
/*
|
||||||
|
The most simple console wrappr'.
|
||||||
|
|
||||||
|
usage:
|
||||||
|
------
|
||||||
|
- Use Coedit menu, Compile and Run file to execute.
|
||||||
|
- use the "Process input widget to pass" commands.
|
||||||
|
- Don't forget that the Messages widget restricts the item count.
|
||||||
|
- type "exit" and press SEND to quit.
|
||||||
|
*/
|
||||||
|
void main(string args[])
|
||||||
|
{
|
||||||
|
import std.process;
|
||||||
|
//
|
||||||
|
version(Windows)
|
||||||
|
string prgname = "cmd";
|
||||||
|
else
|
||||||
|
version(Linux) string prgname = "xterm";
|
||||||
|
else
|
||||||
|
assert(0, "unsupported target");
|
||||||
|
//
|
||||||
|
prgname.spawnProcess.wait;
|
||||||
|
}
|
Loading…
Reference in New Issue