craftwa.re

A walk outside the sandbox

Home Blog Cheat Sheets MacOS Tips Area 51 About

Safari Search For Substrings

|

Overview

By default you’ve probably noticed that when you search for a string in a webpage, Safari matches strings that are whole words or that appeared at the beginnings of words, but doesn’t find them within words. You can easily change that behaviour by modifying the following property:

$ defaults read com.apple.Safari FindOnPageMatchesWordStartsOnly
1
$ defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool FALSE
$ defaults read com.apple.Safari FindOnPageMatchesWordStartsOnly
0