I was looking for a script that I knew had a specific shell command, so I did a search using open quickly. No results were returned. I did the same search in Finder and found several.
Here’s a screen shot:
What’s up with that?
I was looking for a script that I knew had a specific shell command, so I did a search using open quickly. No results were returned. I did the same search in Finder and found several.
Here’s a screen shot:
What’s up with that?
My understanding of the Finder’s find command is that it returns hits for documents that contain all the terms in your search string. They do not have to be localized (i.e. part of the same statement). Script Debugger, by contrast, emits results where the hits are sufficiently far apart to be part of different statements.
For example, if I search for ‘do shell script "uu’ here, the finder gives me this:
Whereas Script Debugger gives me this:
The difference is that the ‘31) Display system info’ script contains do shell script "system_profiler SPHardwareDataType"
and set InfoString to InfoString & "Hardware UUID: " & HardwareUUID of HardwareValues & return & return
. The Finder considers the presence of ‘do shell script’ in one statement and ‘UU’ in another a valid hit while Script Debugger does not.
You can try experimenting with variations on your search “do shell script”, “kill”, etc. and see how Script Debugger responds vs the Finder.
Finally, there can be cases where Spotlight gets its self terribly confused and needs to re-index.