cantino/mcfly

feature request: regex search

YAMLcase opened this issue · 7 comments

how doable would it be to add regex search to mcfly?

The search happens in SQLlite, so we could potentially use the REGEXP operator. How would you enter regexp mode?

In vim cmd mode, hit / is what seems natural to me. But the better way would probably be an environment variable setting and then you just use regex in the normal search line. I think people will either use it all the time or never depending on their comfort level with regex.

You can currently do % as a wildcard BTW. Does that help?

You can currently do % as a wildcard BTW. Does that help?

Oh yea, I found that last night and it helps a ton. Still, regex will shine when trying to find that vaguely remembered command from a year ago in the midst of 100's of similar iterations.

I'm open to contributions around this. It will need to be implemented in SQLite since that's where the search happens inside of McFly.

I can have a look at this. But REGEXP is not implemented in sqlite so will rely on external library / a custom function.