Skip to content

Fix interactive shell - #2

Open
theoparis wants to merge 2 commits into
grpmsoft:mainfrom
theoparis:main
Open

theoparis wants to merge 2 commits into
grpmsoft:mainfrom
theoparis:main

Conversation

@theoparis

Copy link
Copy Markdown

Fixes #1

@kolkov

kolkov commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR @theoparis! The \r\033[2K render fix is spot-on — that's the correct portable approach for terminal line clearing.

However, before we review this further, could you try the feature/tea-exec-process branch? It already includes both of these fixes with a different architectural approach:

  1. Render fix — \r\033[2K is already implemented as an atomic write (clear+render in one string to prevent flickering on macOS Terminal.app)

  2. Command routing — instead of changing isInteractiveCommand(), we reworked the execution model based on UI mode:

    • Classic mode: all external commands → ExecProcessWithTTY (direct TTY, like bash)
    • Non-classic modes (Warp/Compact/Chat): all external commands → async capture for viewport display

    The concern with !isBuiltinCommand() is that it routes commands like ls, grep, git status through ExecProcess, which prevents output capture for viewport-based modes.

git checkout feature/tea-exec-process
go build -o gosh ./cmd/gosh
./gosh

The branch will be merged to main in the coming days. Would appreciate your feedback on macOS — feel free to base any further contributions on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

interactive shell displays incorrectly

2 participants