Last active
March 6, 2022 18:02
-
-
Save tuan/9e74b1650b120d192c068313a5db178f to your computer and use it in GitHub Desktop.
Alfred Safari History Search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite3 ~/Library/Safari/History.db "select json_object('items', json_group_array(json_object('quicklookurl', url, 'uid', title, 'title', title, 'subtitle', url, 'arg', url))) as json_result from (select v.title, i.url, i.visit_count_score from history_items i join history_visits v on (v.history_item = i.id and i.domain_expansion || v.title LIKE '%' || replace('{query}', ' ','%') || '%') group by v.title order by v.visit_time desc)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment