Searching

Pref Setter has very powerful search capabilities. In the “Open Domain Quickly” window, you can use the search bar to quickly find the preferences you wish to edit. In the Document windows, you can use the search bar to quickly find particular keys or values. In the Find Panel, you can find particular keys or values in any preference file.

The search bars and Find panel allow regular expressions to be used, greatly enhancing your ability to search. For more information on regular expressions and how they work, visit http://www.regular-expressions.info.

Find Panel

Find Panel

The Find panel will search for the search string in all of the known preferences (everything listed in the “Open Domain Quickly” window).

In addition to using regular expressions in the search string, you can refine your search using the search options. They are:

In the above picture, I’ve set the search string to recent.*records$ With the options that are set, this translates to “search every key and value for the string ‘recent’ which is followed at some point by the string ‘records’ which is at the very end of the key or value. And search it by ignoring case.” This search string basically finds the key NSRecentDocumentRecords in any preference that has it. If there happend to be a value for some key in a preference named, say, “Recent results of this are proving to break all previous records” then that value would be returned as well.

The number of preference files you have affects the speed at which the Find panel returns results, as it has to read all of the preference files to see if it contains the search string.

The “Open Domain Quickly” Search Bar

“Open Domain Quickly” search bar

search menu

The “Open Domain Quickly” search bar allows you to quickly locate preferences rather than needing to scroll through the list to locate them.

The Search menu (pictured above right) will give you access to the 10 most recent searches, allow you to clear the searches, allow you to set whether or not case is ignored when searching, and to invert the search returning only those preferences which do not match the search string.

In the above picture of the “Open Domain Quickly” window, I’ve set the search string to .*night.*pref which translates to “search all domain names for one containing the string ‘night’ followed at some point by the string ‘pref’.” In this case, that matches Pref Setter’s own preference file.

Document Search Bar

Document Search Menu

Document search bar and menu

The document search bar allows you to quickly find keys / values without needing to scroll through the entire document looking for them.

The Search menu will give you access to the 10 most recent searches, allow you to clear the searches, allow you to set whether or not case is ignored when searching, to invert the search returning only those items which do not match the search string, and to set whether you search both keys and values, keys only, or values only.

In the above picture, I’ve set the search string to .*mouse\.[s|t] Whith the options that are set, this translates to “search every key and value for the string ‘mouse’ followed by a dot, with either an ‘s’ or a ‘t’ following it.” In the preference document open, NSGlobalDomain, this returns two of the keys containing mouse (there are actually a few more, depending on how your computer is set up).

If the search type is set to “Keys and Values”, unless both the key and value match the search term it will be returned. It is really only practical to invert the search if you are searching keys or values only.