aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el25
1 files changed, 17 insertions, 8 deletions
diff --git a/pearl.el b/pearl.el
index 9aebcef..6076c81 100644
--- a/pearl.el
+++ b/pearl.el
@@ -4168,15 +4168,24 @@ an id), or `pearl--filter-any' (any assignee, no scoping)."
(team-id (and (not (pearl--filter-sentinel-value-p team-name))
(pearl--get-team-id-by-name team-name)))
(open (pearl--read-yes-no "Open issues only? "))
+ ;; Multi-select, like the Labels prompt: pick one or several states.
+ ;; One picked -> a string (`:state' scalar); several -> a list
+ ;; (`state.name.in'); none -> no state constraint.
(state (and team-id
- (let ((s (completing-read
- "State: "
- (pearl--completion-table-keep-order
- (pearl--with-sentinel pearl--filter-any
- (mapcar (lambda (st) (cdr (assoc 'name st)))
- (pearl--team-states team-id))))
- nil t)))
- (unless (pearl--filter-sentinel-value-p s) s))))
+ (let ((picked
+ (cl-remove
+ pearl--filter-any
+ (completing-read-multiple
+ "States (comma-separated): "
+ (pearl--completion-table-keep-order
+ (pearl--with-sentinel pearl--filter-any
+ (mapcar (lambda (st) (cdr (assoc 'name st)))
+ (pearl--team-states team-id))))
+ nil t)
+ :test #'string=)))
+ (cond ((null picked) nil)
+ ((= 1 (length picked)) (car picked))
+ (t picked)))))
(project (and team-id
(let ((p (completing-read
"Project: "