Skip to content

gum spin full command output is printed if no ttyΒ #1011

@vt-alt

Description

@vt-alt

Description

$ gum spin --show-error date
$ gum spin --show-error date | cat
Thu Jan 29 05:25:28 AM UTC 2026

This is unexpected behavior, as the script which works quietly on tty produces a lot of (not needed) output if redirected to a file, and there is not way to disable it. For example we run make build command, it is quiet if script is on tty, but a lot of text if redirected.

It is possible to redirect gum spin output to /dev/null, but stderr output is still visible and it sometimes interferes incorrectly with the rest of output:

$ gum spin --title='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' -- bash -c 'sleep 1; date >&2' >/dev/null
Thu Jan 29 08:38:40 AM MSK 2026aaaaaaaaaaaaaaaaa

And there is no output if no >/dev/null redirect.

Additionally, as feature request, I would suggest option which prints --title line once if output is not tty (without repeating). This will make output similar nevertheless tty or not.

Version

0.17.0

Environment

linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions