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

Allow subprocesses to show colors #26

Closed
pspeter3 opened this issue May 19, 2016 · 4 comments
Closed

Allow subprocesses to show colors #26

pspeter3 opened this issue May 19, 2016 · 4 comments

Comments

@pspeter3
Copy link

Right now modd overwrites the colors of subprocesses. It would be nice if those colors were preserved.

@ThomasWeiser
Copy link

ThomasWeiser commented Nov 6, 2016

modd doesn't remove the colors. Most programs will detect whether their output is being sent to a pipe and adjust accordingly, i.e. remove colorization codes.

There are some workarounds, discussed here:

For me unbuffer does the trick. On my linux distro it's included in the package expect. See here for OSX and here for Linux.

ThomasWeiser added a commit to participateapp/web-client that referenced this issue Nov 7, 2016
Elm compiler is able to produce helpfully colorized error messages.
Unfortunately these colors won't make it through webpack and elm-webpack-loader.

As a workaround we can optionally use modd alongside with webpack.

Even with modd elm-make will output color-codes only if output goes to a terminal,
not through a pipe. There are several ways to do this, see:
cortesi/modd#26

Here we use the utility `unbuffer` from the the tool `expect`, which is available
for most Linux distros and for OSX.
https://www.nist.gov/services-resources/software/expect
oliverbarnes pushed a commit to participateapp/web-client that referenced this issue Nov 9, 2016
Elm compiler is able to produce helpfully colorized error messages.
Unfortunately these colors won't make it through webpack and elm-webpack-loader.

As a workaround we can optionally use modd alongside with webpack.

Even with modd elm-make will output color-codes only if output goes to a terminal,
not through a pipe. There are several ways to do this, see:
cortesi/modd#26

Here we use the utility `unbuffer` from the the tool `expect`, which is available
for most Linux distros and for OSX.
https://www.nist.gov/services-resources/software/expect
@klauern
Copy link

klauern commented Jul 13, 2017

unbuffer worked for me. Is there any way to notify the user that this might be occurring and output some kind of helper ("You may need unbuffer to retain colorized output of subcommands")?

@frederikhors
Copy link
Contributor

Dear people, I'm on Windows and I'm using daemon: go run . with a simply default chi router.

Any hint for show colors?

@cortesi
Copy link
Owner

cortesi commented Dec 30, 2018

I've just added an explanatory note about colourized output to the README. Let me know if you feel that this needs any expansion or clarification.

@cortesi cortesi closed this as completed Dec 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants