feat(index): allow pass grep options
refactor(git): enhance line match