jonsequitur / dotnet-repl

A polyglot REPL built on .NET Interactive
MIT License
730 stars 36 forks source link

Output is incorrect in bash #57

Closed ironsm4sh closed 1 year ago

ironsm4sh commented 2 years ago

When using powershell, the tool looks fine. but when using it from bash (such as git-bash or MSYS2) none of the dynamic outputs align correctly. image

Would it be possible to correct this or/and add a launch flag which cleans the output so that it is also usable in a CI/CD environment (no ANSI console)?

An example:

$> dotnet repl --notebook mynotebook.dib --exit-after-run --basic-output
Running notebook: mynotebook.dib
Installing Packages
| LibGit2Sharp, 0.27.0-preview-0182
| Microsoft.Build, 16.11.0

Your notebook output here...

$>
jonsequitur commented 2 years ago

This is definitely something we could do and #56 did introduce some code changes that bypass the Spectre.Console rendering in certain cases. It's implicit right now but could be made explicit like you're suggesting.

@patriksvensson Is this something Spectre.Console can support or is planning to support?

patriksvensson commented 2 years ago

@ironsm4sh Are you by any chance using "Ambiguous-width character" in your terminal? What terminal are you using?

ironsm4sh commented 1 year ago

Hey, sorry for taking such a long time. I do not have access to the computer I used at the time anymore, and I can not reproduce it using my current system. I was using ConEmu at the time.

That said, I do think there is value in an explicit mode with a minimal CLI output, for CI/CD environments. However, I do not have a usecase for that anymore, so I am closing this issue.

Thanks for your replies and attention.