Continuing the discussion from Best Practices for GUI Scripting:
@sphil et al:
I started a new topic about "Mac Search Tools" so we don't continue to pollute the other topic.
I have to admit I am surprised how must interest and debate has been generated about the macOS Spotlight search tool. But since it seems to be so hot, let's continue to discuss it here.
First, I think you completely missed my point about "powerful" varies according to the eyes of the beholder.
Maybe Spotlight is the same on both of our Macs (assuming we have the same macOS), but that is not the point. My point is how each us understand and use the tool, and what we expect of it. Every tool has its uses, benefits, and limitations. You wouldn't try to extract a screw using s sledge hammer, would you? LOL But I would hope that you'd understand how powerful a sledge hammer can be.
So, to your request that I search for "csrutil", I did just that and got this:
which I found very informative, but I'm guessing that you were expecting it to launch the Terminal command-line tool
csrutil. I was not expecting that.
However, I did find lots of great info about it from a variety of sources:
- Your LNS post that I got in my Outlook email
- Discussion about it on StackExchange
- Several of my Evernote Notes where I had referenced the command
All of this came up instantly (<< 1 sec). I view this as very powerful because with one simple command I found a number of valuable, relevant resources, all without having to use multiple search tools/apps.
Now, about the "eye of the beholder". I'm guessing that you use Terminal and shell scripts a lot. So you might expect Spotlight to give you info about all of the many bash commands. I don't think Spotlight was designed for that because (and I'm just guessing here) most users don't need and don't user Terminal commands. If you do, then you already know about other sources that document all of these commands.
So, if "in your eyes" you don't find the info that Spotlight provides, then that's fine. Don't use it. Perhaps you don't find it powerful, but I and others do.
BTW, both @ShaneStanley and @ccstone have published several very power ASObjC search scripts for finding files/folders. I use those tools when I have that specific need.
One final note. Several people have mentioned that HoudaSpot uses the Spotlight index, but eliminates a number of Spotlight limitations. I plan to check it out.