4 ms·
That's fair, I see many examples in this thread where people pass an exact string directly to grep, as you do. I'm an avid grepper, but my grep tool [1] transl
by medstrom 2y ago
That's fair, I see many examples in this thread where people pass an exact string directly to grep, as you do. I'm an avid grepper, but my grep tool [1] translates spaces to ".*?", so I would just type "func lart(" in that example and it would work.
An incremental grep tool with just this one transformation rule gets you a lot more mileage out of grep.
[1] https://github.com/minad/consult/blob/screenshots/consult-line.png?raw=true https://github.com/minad/consult/blob/screenshots/consult-li...
EDIT: Better demo https://jumpshare.com/s/zMENBSr2LwwauJVjo1wS https://jumpshare.com/s/zMENBSr2LwwauJVjo1wS
- kragen 2y agothat's going to find all the functions that take an argument named lart or of a lart type too, but it also sounds like a thing i really want to try
- vitus 2y agoAlso, anything that contains "func" and "lart" as a substring, e.g. foobar(function), blart(baz). It's not far off from my manually-constructed patterns when I want to make sure I find a function definition (and am willing to tolerate some false positives), but I personally prefer fine-grained control over when it's in use.