Most OS have their warts and one particular annoying one about Windows is their failure to debug their search option. This allows you to find a file containing a particular word or phrase. It does not work.
I just did a scan of the internet and found over 1,000 inquiries about this exact same problem.
says one user in 2023. So I did a quick hack (uses stlib) that searches in a list of files.
(define findit
{A --> (list string) --> (list string)}
_ [] -> []
X [File | Files] -> (let Contents (trap-error (read-file-as-bytelist File)
(/. E (do (output "cannot read ~A~%" File) [])))
Message (output "read ~A~%" File)
(if (somewhere? (x->ascii X) Contents)
[File | (findit X Files)]
(findit X Files))))
(define somewhere?
{(list A) --> (list A) --> boolean}
_ [] -> false
ASCII Contents -> true where (prefix? ASCII Contents)
ASCII [_ | Contents] -> (somewhere? ASCII Contents))
This happily allowed me to track down what I was looking for
in 44,000 lines of code spread over 40 files in 0.125 sec. Bigger
and better cam be built but shared here for others who have
suffered under Windows with this.
Mark