greenletters icon indicating copy to clipboard operation
greenletters copied to clipboard

Support for removal of terminal colour markup from output.

Open kwiknik opened this issue 11 years ago • 0 comments

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)+/,''))

kwiknik avatar Dec 18 '12 15:12 kwiknik