When running orb <command> (e.g., orb php -v), the command output flashes briefly on screen and then disappears. The terminal returns to its previous state, and the output cannot be scrolled back.
Reproduced on:
- Terminal.app
- iTerm2
- Ghostty
Root cause:
orb allocates a PTY and enters the alternate screen buffer when executing commands. Upon command exit, it sends a ^[[?1049l (rmcup / exit alternate screen) sequence, which restores the terminal to its pre-command state. The command output, written to the alternate screen, is effectively discarded.
Escape sequence captured (at exit):
(along with a full set of terminal attribute resets: mouse tracking off, bracketed paste off, cursor show, etc.)
Expected behavior:
- For non-interactive, one-shot commands like
orb php -v, the output should remain on screen and accessible in scrollback, just like running the command directly on the host.
- An option like
--no-tty or --keep-output would be appreciated for cases where the user doesn't need a full PTY.
Workaround:
Piping the output (e.g., orb php -v | cat) bypasses TTY allocation and avoids the issue, but this is unintuitive.
Environment:
- OrbStack: 2.2.1 (2020100)
- macOS
When running
orb <command>(e.g.,orb php -v), the command output flashes briefly on screen and then disappears. The terminal returns to its previous state, and the output cannot be scrolled back.Reproduced on:
Root cause:
orballocates a PTY and enters the alternate screen buffer when executing commands. Upon command exit, it sends a^[[?1049l(rmcup / exit alternate screen) sequence, which restores the terminal to its pre-command state. The command output, written to the alternate screen, is effectively discarded.Escape sequence captured (at exit):
(along with a full set of terminal attribute resets: mouse tracking off, bracketed paste off, cursor show, etc.)
Expected behavior:
orb php -v, the output should remain on screen and accessible in scrollback, just like running the command directly on the host.--no-ttyor--keep-outputwould be appreciated for cases where the user doesn't need a full PTY.Workaround:
Piping the output (e.g.,
orb php -v | cat) bypasses TTY allocation and avoids the issue, but this is unintuitive.Environment: