Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANSI colored output in captured stdout #2144

Closed
fonsp opened this issue Jun 1, 2022 · 3 comments · Fixed by #2148
Closed

ANSI colored output in captured stdout #2144

fonsp opened this issue Jun 1, 2022 · 3 comments · Fixed by #2148
Labels
enhancement New feature or request frontend Concerning the HTML editor good first issue Good for newcomers logging About `@info`, `@warn`, etc

Comments

@fonsp
Copy link
Owner

fonsp commented Jun 1, 2022

Originally posted by @diegozea in #894 (comment)

I found this while using programs designed for the terminal, distributed in the Julia ecosystem as jll packages. For example:

# ╔═╡ 4c4d8eaa-87ae-4f2b-8f33-4cced2cc824c
using FastME_jll

# ╔═╡ 0505615f-bf25-4316-923e-eb4dcef34129
fastme() do _fastme
	run(`$_fastme -h`)
end

Here the problem is not only color code but also bold character and other things I have no idea about:
Pluto:
image

Terminal:

image

@fonsp
Copy link
Owner Author

fonsp commented Jun 1, 2022

This is different from #894 because stdout/stderr is captured and displayed as a log. This should be relatively easy to implement, take a look at how we use AnsiUp in https://github.com/fonsp/Pluto.jl/blob/v0.19.5/frontend/components/PkgTerminalView.js .

@fonsp fonsp added enhancement New feature or request good first issue Good for newcomers frontend Concerning the HTML editor logging About `@info`, `@warn`, etc labels Jun 1, 2022
@fonsp
Copy link
Owner Author

fonsp commented Jun 1, 2022

@HirumalPriyashan maybe? ☺️

@diegozea
Copy link
Contributor

Thanks! It works perfectly now 😃

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Concerning the HTML editor good first issue Good for newcomers logging About `@info`, `@warn`, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants