Skip to content

Last line of output not displayed when command output has no trailing newline #43

@ramrunner

Description

@ramrunner

Hi there!
While using the rc shell linked against libbestline i discovered that when running cat on files that the last line doesn't end in 0x0a, the line doesn't get emitted. I am attaching a file that reproduces it (it's a base64 of random bytes that i truncated to remove the newline). It seems that shells like bash or zsh don't demonstrate this problem since they either print-and-remove special marker chars or emit newlines.
In rc the problem goes away if you cat test.b64 && echo , or pipe to a pager.

test.b64.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions