Closed Quijx closed 1 year ago
Totally agree.
For example global getter Never get quit => exit(0); could be defined in a file that is imported by default that in turn imports dart:io.
Just put in https://github.com/fzyzcjy/dart_interactive/blob/master/packages/interactive/lib/src/runtime_support.dart#L1
Is your feature request related to a problem? Please describe. It would be nice to have a convenient built-in way to exit the repl. Entering
import 'dart:io';
and thenexit(0)
is not really that convenient. (Also it seems to do some weird stuff with the shell, for example i can't see any further input after the program terminates but that is likely a different issue.) The shourtcuts Ctrl+C (send sig TERM) or Ctrl+D (EOF) work but other repls have things likeexit()
aswell, so I think it would be nice to have too.Describe the solution you'd like For example global getter
Never get quit => exit(0);
could be defined in a file that is imported by default that in turn importsdart:io
.Describe alternatives you've considered Or it could be a function
Never quit() => exit(0)
.