Skip to content

orb <command> output flashes then disappears on OrbStack 0e182b501fcd9e05b99ffb363fce03610390c400 (v2.2.1) #2597

Description

@vkobel

Describe the bug

This is still reproducible on OrbStack 2.2.1 (2020100), despite #2519 being closed.

Running a one-shot command through orb , such as orb ls , briefly displays output and then restores the terminal's previous screen. The command output is therefore lost from both the visible terminal and scrollback

To Reproduce

  1. Run: orb ls
  2. Observe the listing flash briefly and then disappear.
  3. Compare with: orb ls | cat, The output remains visible when stdout is not a TTY.

I captured the terminal output and it ends with the alternate-screen teardown sequence: ESC[?47;1047;1048;1049l

Expected behavior

One-shot commands invoked as orb <command> should leave their output in the normal terminal buffer and scrollback, as ssh host command and docker exec do. Only the interactive orb shell should need terminal-screen management.

Diagnostic report (REQUIRED)

No response

Screenshots and additional context (optional)

• OrbStack: 2.2.1 (2020100)
• Related issue: #2519
• The issue is triggered when orb 's output is attached to a TTY.
• Redirecting stdin alone does not help: orb ls </dev/null

• Piping output prevents the issue:
orb ls | cat

Temporary zsh workaround for non-interactive commands:

function orb() {
    if [ $# -eq 0 ]; then
        command orb
    else
        command orb "$@" </dev/null 2>&1 | cat
        return $pipestatus[1]
    fi
}

This is only suitable for one-shot commands; it intentionally avoids allocating a terminal for commands with arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions