Search

Hook is primarily a context sensitive app, meaning that when you invoke Hook, it gives you information about the current context, as indicated in Hook’s title bar.

With Hook, when you copy a link or hook an item to another, Hook creates a bookmark in your Hook database. You can search your bookmarks as described next. (You can think of that as ‘searching your hooks’ or ‘searching for stuff you have previously linked’.)

Enter search mode with ⌘F or by clicking

To view Hook’s search field:

  1. invoke Hook as you normally would (e.g., with ⇧⌘SPACE) ,
  2. type ⌘F, or click on the 🔍 icon in the Hook window Title bar, or click on the Gear icon and select Find

How to exit search mode is described below.

Enter and execute your search query

Once you’re in the search field, enter your query and hit the return key.

Hook’s search currently only starts when you hit return. More like a typical web search than Spotlight , at this point. (We do intend provide search results “as you type” , in the future).

Search syntax

Hook’s search syntax is a bit different from Spotlight and launchers. Hook leverages the SQLite FT5 extension to support full text search.

Fuzzy matching with the * wildcard

Currently, Hook only returns search results that exactly match the terms you enter, unless you use a wildcard operator.

So if you want to find all bookmarks containing Hookproductivity you can’t just type Hook. But you can type Hook* which will find everything that starts with Hook.

For instance, that would return any bookmark containing “hookproductivity” and “Hooks” in their name or URL.

Restricting search to the bookmark’s address (URL) or name.

Each bookmark in Hook has name and a URL.

If you want to restrict your search to a particular kind of URL you can do so by using the url: parameter.

For example, if you want to

  1. find only emails, you can type: url:"hook://email" because email URLs have this form: hook://email. This would also get you in the ballpark: "url:/email"
  2. to find OmniFocus bookmarks, you could enter url:"omnifocus://"
  3. to find only https bookmarks, you could enter url:"https://"
  4. to find only bookmarks to files or folders, you could enter "hook://file" or cast your net a bit wider with url:"file/"

Maximum search results returned

Currently, there is a limit on the number of search results returned by Hook. It’s set to 50. We expect to remove that restriction.

Search for a phrase (exact string)

A phrase is an ordered list of space-separated words. You can concatenate words by using the “+” operator, or enclose the entire phrase in quotation mark.

Examples:

  • “omnifocus Travel”
  • Omnifocus + Travel

The above two queries are equivalent. They return any bookmark whose one of four properties matches “omnifocus travel”s

Anchor your search to the start of name or URL

To only find bookmarks whose URL or name starts with a particular string of text, use ^.

Examples:

url:^OmniFocus

that will find URLs starting with OmniFocus

name:^Hook

that will find bookmarks starting with Hook

Boolean Operations: AND, OR, NOT

Search criteria can be combined with boolean operators AND, OR, and NOT.

Examples:

url:^omnifocus AND title:myproject

The above query returns any link with its URL scheme starting with “omnifocus” whose title contains “myproject”

title:Canada OR title:USA

The above query returns any link whose title contains either “canada” or “usa”, case insensitive.

Canada NOT "British Columbia"

The above query returns any link with “canada” but not “british columbia””

Search is not casesensitive

Search is not case sensitive.

More search options

Hook search leverages SQLite FT5 full text extension. For the complete search syntax, please refer to SQLite FTS5 Extension

Using launchers (ObDev’s LaunchBar app or Alfred app)

Another way to search Hook’s bookmarks is to use launchers, as described here..

Hook modes

As of Hook 2.0, Hook has two modes: contextual retrieval mode and search mode. (Later we expect to blend them). This document describes search mode.

Switching out of search mode back into Context-sensitive mode

To get out of search mode, back into context mode, you can either

  1. type ⌃⌘F,
  2. Gear menu > Show Context, or
  3. Close Hook and reopen it (because the default is always Context-sensitive mode)

Version 2.0 of Hook now available. Click here for more information.