Skip to content

Add option to color all stderr output in red#885

Open
tmatilai wants to merge 1 commit intodirenv:masterfrom
tmatilai:color_stderr
Open

Add option to color all stderr output in red#885
tmatilai wants to merge 1 commit intodirenv:masterfrom
tmatilai:color_stderr

Conversation

@tmatilai
Copy link
Copy Markdown
Contributor

Add color_stderr configuration option. If set to true, everything printed in stderr is colored as red during the .envrc evaluation.

This makes the errors much more easier to notice.

I guess that piping the stderr through sed with process substitution might have some issues in some complex cases. But I can't think of any, and haven't found any issues in my use cases in almost a year of ~daily use. But maybe still make the feature opt-in?

It might also be more efficient to do the coloring in direnv, but unfortunately I'm not at the required level in Go to implement it without some guidance. And I'm not even sure it can be done there as the stdout is redirected into stderr in stdlib.

Depends on #884.

Add `color_stderr` configuration option. If set to `true`, everything
printed in stderr is colored as red during the `.envrc` evaluation.

This makes the errors much more easier to notice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant