anicode icon indicating copy to clipboard operation
anicode copied to clipboard

add option for word-boundary based match

Open igalic opened this issue 7 years ago • 0 comments

i realized the feature that i most use in anicode[1] is grep's word-boundaries feature to limit the amount of characters it matches…

$ anicode dog

matches all DOGRA characters[2]

whereas '\bdog\b' matches…

$ anicode '\bdog\b'
1) ⺨   CJK RADICAL DOG
2) ⽝   KANGXI RADICAL DOG
3) 🌭   HOT DOG
4) 🐕   DOG
5) 🐶   DOG FACE

which, most of the time, is what i want.

That's the equivalent of passing -w to grep, so perhaps we should expose this option

igalic avatar Aug 18 '18 08:08 igalic