* Reset the shell — kill the current process and spawn a fresh one. * Useful when the shell gets stuck (e.g. an interactive prompt).
()
| 256 | * Useful when the shell gets stuck (e.g. an interactive prompt). |
| 257 | */ |
| 258 | async reset() { |
| 259 | this.stop(); |
| 260 | this._dead = false; |
| 261 | this.buffer = ''; |
| 262 | return await this.start(); |
| 263 | } |
| 264 | |
| 265 | /** |
| 266 | * Stop the shell process. Idempotent. |