greenletters
greenletters copied to clipboard
Support for removal of terminal colour markup from output.
Colourised terminal output prevents correct matching.
I've fixed this in greenletters.rb
by modifying the beginning of OutputTrigger#match_one
. This should be patched and the same change made to OutputTrigger#match_multiple
also.
def match_one(process)
#scanner = process.output_buffer
# Patched to strip term colour output from process stdout.
# Author:: N David Brown
scanner = StringScanner.new(process.output_buffer.string.gsub(/(\e\[([\d;]+)m)+/,''))