I think of "repo search" as seeing all source files as a sequence of characters. "code search" has more structure.
It would be powerful to combine the two. I was trying to search for calls to map and I wanted to do a regex over the second argument to any map calls. So I start writing the following regex:
map\(.*, ...
but that .* isn't quite right, because I do not want to match any ,. Well, I don't want to match any that occur at the argument list level, but if they occur within something else, e.g.:
map(get_function(a, ,b), ...
then it should match.
If I instead start at code search, there are way too many hits for map.
I think of "repo search" as seeing all source files as a sequence of characters. "code search" has more structure.
It would be powerful to combine the two. I was trying to search for calls to
map
and I wanted to do a regex over the second argument to any map calls. So I start writing the following regex:map\(.*, ...
but that
.*
isn't quite right, because I do not want to match any,
. Well, I don't want to match any that occur at the argument list level, but if they occur within something else, e.g.:map(get_function(a, ,b), ...
then it should match.
If I instead start at code search, there are way too many hits for
map
.