Skip to content

"gum log" does not preserve newlines in text #1109

Description

@larsks

Description

I was hoping to replace echo in a script with gum log, but given a string with newlines, like this:

example="this
is
a
test
"

Running echo "$example" produces:

this
is
a
test

While running gum log "$example" produces:

thisisatest

This was surprising given gum log's obvious use as a replacement for echo in shell scripts.

Version

gum version v0.17.0

Environment

fedora 44 + foot + tmux

Activity

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

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