* Writes the configured `prompt` to a new line in `output`. * @param {boolean} [preserveCursor] * @returns {void}
(preserveCursor)
| 427 | * @returns {void} |
| 428 | */ |
| 429 | prompt(preserveCursor) { |
| 430 | if (this.paused) this.resume(); |
| 431 | if (this.terminal && process.env.TERM !== 'dumb') { |
| 432 | if (!preserveCursor) this.cursor = 0; |
| 433 | this[kRefreshLine](); |
| 434 | } else { |
| 435 | this[kWriteToOutput](this[kPrompt]); |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | [kQuestion](query, cb) { |
| 440 | if (this.closed) { |
no test coverage detected