Consensys / surya

A set of utilities for exploring Solidity contracts
Apache License 2.0
1.08k stars 119 forks source link

Option to remove text output coloring #55

Closed maurelian closed 5 years ago

maurelian commented 5 years ago

This would simplify copying and sharing output. Eslint uses --no-color for this.

chronaeon commented 5 years ago

This would be a useful option because the colored encoding messes up the appearance of the output when surya describe is piped into plaintext using >

GNSPS commented 5 years ago

This doesn't seem urgent. Maybe set a milestone for after the refactoring of the codebase?

maurelian commented 5 years ago

Yeah, super low pri.

chronaeon commented 5 years ago

You can get rid of the coloring by piping Surya's output through sed, like so: surya describe somefiles.sol | sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g"

GNSPS commented 5 years ago

This is addressed now with a --no-color flag in the CLI, and a parameter in all the modules exported that use color. 🎉