Sha256: 999b670d2963fffcf6f9704761453f71daddce7678ba57d794334603d2d20a7f
Contents?: true
Size: 503 Bytes
Versions: 8
Compression:
Stored size: 503 Bytes
Contents
#!/usr/bin/env ruby # # options # # line ix-highlight-line highlight a specific line # vertical ix-highlight-vertical highlight a particular column # highlight ix-highlight-match highlight whatever matches a regex # require 'isna' abort 'No pattern given' if ARGV[0].nil? trap('SIGINT') { } $stdout.sync = true STDIN.each_line do |line| ARGV.each do |arg| chunks = arg.split(':') puts line.gsub(/(#{chunks[0]})/i) { |x| $1.to_ansi.send(chunks[1].to_sym).to_s } end end
Version data entries
8 entries across 8 versions & 1 rubygems