| 623 | } |
| 624 | |
| 625 | void captureShellPromptLine(const String &line) { |
| 626 | String context; |
| 627 | String prompt; |
| 628 | if (!parseShellPromptLine(line, context, prompt)) return; |
| 629 | |
| 630 | String previousPrompt = getQueuedPromptPrefix(); |
| 631 | withClientLock([&]() { |
| 632 | queuedPromptContext = context; |
| 633 | queuedPromptPrefix = prompt; |
| 634 | }); |
| 635 | |
| 636 | String liveInput = getTerminalLiveInput(); |
| 637 | if (liveInput.isEmpty()) { |
| 638 | if (commandBuffer == previousPrompt || commandBuffer == "> ") commandBuffer = prompt; |
| 639 | } else { |
| 640 | commandBuffer = prompt + liveInput; |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | int getTerminalCols() { |
| 645 | int usableWidth = tftWidth - (TERMINAL_PAD_X * 2); |
no test coverage detected