backdrop-contrib / backdrop-drush-extension

A set of commands and boot class for Drush and Backdrop CMS.
GNU General Public License v2.0
13 stars 18 forks source link

Introduce a new `drush_colorize_output()` function, to help consistently add color to output text. #220

Closed klonos closed 4 years ago

klonos commented 4 years ago

This came up in #218:

...perhaps we should introduce a drush_colorize_output($output, $color) function to be re-used in other places?

serundeputy commented 4 years ago

thanks @klonos ! PR: https://github.com/backdrop-contrib/backdrop-drush-extension/pull/221

Added a drush_chalk(string $output, string $color) to format pieces of output strings.

I went with drush_chalk because it is not just color it can make text bold and anything you can do with trerminal formatting.

Here is an example:

image

serundeputy commented 4 years ago

Merged. this will ship w/ 1.4.0.