Closed (won't fix)
Project:
Drush
Version:
8.x-6.x-dev
Component:
Base system (internal API)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Jul 2012 at 16:40 UTC
Updated:
11 Sep 2013 at 11:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
deviantintegral commentedFirst bit of refactoring. Doesn't actually hook into drush_html_to_text yet.
Comment #2
deviantintegral commentedI ended up doing a few things for this:
Some of the code might be a little verbose for what it is, but I'm guessing that there will be other tags and terminal escapes that might be supported later. With the code as-is, it's relatively simple to add in new tag mappings into each function without having to hack through a regex.
The attached is from format-patch to make it easy to follow along, but feel free to squish or rebase as seen fit.
Comment #3
greg.1.anderson commentedThis is pretty awesome.
drush topic -y docs-bastionprints out styled text. n.b. -y forces drush to directly print the file to stdout. Without -y, drush paginates the output with 'less'. The output then looks like this:The ESC are rendered in inverse. If you use 'more' instead of 'less' (change drush_print_file, or make sure 'less' is not in your $PATH), then the output comes out correctly.
man bashcorrectly renders bold text et.al withlesspagination, so I am not sure why it is not working here.Comment #4
kenorb commentedComment #5
greg.1.anderson commentedIt would be great if someone could figure out a good way to automatically suppress the color when 'less' was in use, or make the output coloration look right in 'less'.
Comment #6
moshe weitzman commentedComment #7
moshe weitzman commentedAnyone available to push this along?
Comment #8
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.