run<T> method
T
run<T>(
- T body()
Runs body with this as Terminal.current and the prompt mode
worked out from it.
Implementation
T run<T>(T Function() body) {
final previous = PromptMode.forced;
PromptMode.current = interactive ? PromptMode.rich : PromptMode.line;
try {
return Terminal.use(this, body);
} finally {
PromptMode.current = previous;
}
}