Add exists command

This command shows whether or not the given url is known to CLark.
This commit is contained in:
Tom Willemsen 2013-03-23 13:38:19 +01:00
parent dd47751a43
commit cbe1830f83

View file

@ -140,6 +140,17 @@ BM should be a list containing the url and name of the bookmark."
(insert-bookmark url name description)
(add-tags tags))))
(defcommand exists
"Check if a bookmark exists in the database."
(if (execute-single *db* "SELECT rowid FROM bookmark WHERE url = ?"
(car args))
(progn
(format t "yes~%")
0)
(progn
(format t "no~%")
1)))
(defcommand help
"Show help message."
(declare (ignore args))