MCPcopy Create free account
hub / github.com/BruceDevices/firmware / captureShellPromptLine

Function captureShellPromptLine

src/modules/wifi/clients.cpp:625–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625void 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
644int getTerminalCols() {
645 int usableWidth = tftWidth - (TERMINAL_PAD_X * 2);

Callers 1

renderSessionOutputFunction · 0.85

Calls 4

parseShellPromptLineFunction · 0.85
getQueuedPromptPrefixFunction · 0.85
withClientLockFunction · 0.85
getTerminalLiveInputFunction · 0.85

Tested by

no test coverage detected