Skip to content

umaumax/cgrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cgrep

color enhanced grep

how to use

# regex
git grep --color=always . | cgrep '(".*")' 'yellow' | cgrep '(%[0-9]*[dsf])' 'magenta' | cgrep '([0-9]+)' green

# fixed string
echo 'ヽ(*゜д゜)ノ' | cgrep -F '゜' blue

how to install

go get -u "github.com/umaumax/cgrep/..."

color format info

NOTE

  • 色が重なった場合には後勝ち
  • ()に対応して,色がつく,,区切りで色を指定
    • 色指定を空文字にすると色設定をskip
  • 一文字ごとに色がついているが,それは不要では?
    • fzfは1文字ごとではなくとも該当した文字の色を保持する(fzyは保持しない)

TODO

  • ansi文字出力の効率化(1文字ごとに色情報を出力している)

ISSUE

git grep --color=always . | cgrep '(".*")' 'yellow:white' | cgrep '(%[0-9]*[dsf])' 'magenta+B' | cgrep '([0-9]+)' green

としたときに,背景の白がlineの終端まで続いてしまっている問題がある

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages