Browse Source

* libelcouch.el (libelcouch-choose-instance): New function

elexandria
Damien Cassou 3 years ago
parent
commit
57118398e4
No known key found for this signature in database GPG Key ID: A7123815F5DCE914
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      libelcouch.el

+ 9
- 0
libelcouch.el View File

@ -147,6 +147,15 @@ considered to have failed."
:database database))))
(or document database instance)))
(defun libelcouch-choose-instance ()
"Ask user for a CouchDB instance among `libelcouch-couchdb-instances'."
(let* ((instances (libelcouch-instances))
(instance-name (completing-read "CouchDB instance: "
(mapcar #'libelcouch-entity-name instances)
nil
t)))
(cl-find instance-name instances :test #'string= :key #'libelcouch-entity-name)))
;;; Private helpers


Loading…
Cancel
Save