lib/hook/hookapp.rb
# Search boomark names/titles. Return array of bookmark hashes.
Search boomark names/titles. Return array of bookmark hashes.
Search boomark names / titles . Return array of bookmark hashes .
def search_name(search)
    `osascript <<'APPLESCRIPT'
      set searchString to "#{search.strip}"
      tell application "Hook"
        set _marks to every bookmark whose name contains searchString
        set _out to {}
        repeat with _hook in _marks
          set _out to _out & (name of _hook & "||" & address of _hook & "||" & path of _hook)
        end repeat
        set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "^^"}
        set _output to _out as string
        set AppleScript's text item delimiters to astid
        return _output
      end tell
    APPLESCRIPT`.strip.split_hooks
  end
def search_name ( search ) ` osascript <<'APPLESCRIPT'
      set searchString to " #{ search . strip } "
      tell application "Hook"
        set _marks to every bookmark whose name contains searchString
        set _out to {}
        repeat with _hook in _marks
          set _out to _out & (name of _hook & "||" & address of _hook & "||" & path of _hook)
        end repeat
        set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "^^"}
        set _output to _out as string
        set AppleScript's text item delimiters to astid
        return _output
      end tell
    APPLESCRIPT ` . strip . split_hooks end
Search boomark names/titles.
Search boomark names / titles .
search
<not_specific>