Textualize / rich-cli

Rich-cli is a command line toolbox for fancy output in the terminal
https://www.textualize.io
MIT License
2.99k stars 77 forks source link

`rich --print` always adds an extra newline #80

Open schwa opened 1 year ago

schwa commented 1 year ago

I'd expect rich --print to always preserve the lines of the input file. However rich --print always seems to add a newline. It would be great if no newlines were added during rich --print. I'd also recommend the addition of a -n flag that works like the same flag in echo to remove automatic line endings.

> echo -n | wc -l
       0
> echo | wc -l
       1
> echo -n | rich - --print | wc -l
       1
> echo | rich - --print | wc -l
       2
> echo -n | rich - --print --soft | wc -l
       1
> echo | rich - --print --soft | wc -l
       2