inheritance tree
Open.pipe Open.text
| |
`----+----'
|
Shell
class definition
Provides an interface to interactive commandline programs like a shell or an interpreter. Start interactive program with the method init (see below), close it with the method close. The Shell object features cmd and args bind the respective init arguments.
More specialised classes (e.g. an interface to Common Lisp) may be obtained by subclasses..
class Shell (Inheritance-free)
feat args cmd
- cmd(Cmd)
Feed Cmd (a VS) to the interactive program. Use one of the output/show methods to retrieve results.
Please note that the output/show methods are exclusive (i.e., once some result is output one way, it is output again.).
- init(args:Args cmd:Cmd)
Start interactive program Cmd (VS) with Args (list of VSs). The default is the shell "sh" with args ["-s"] for reading from standard input. See the test file for examples for other interactive commands (e.g., the interactive ruby shell or a Common Lisp compiler).
- outputLine($)
Return the next line (a string) of any result. In case the shell has died, nil is returned.
- showAll()
Show any results and output of each command fed to the shell at stdout.
end