Skip to content

completion-boundaries support  #448

@clemera

Description

@clemera

See comment by @minad:

I tried your checko example from above again and it would actually nice if there would be some limited support for completion boundaries in Selectrum.

(defun grep-test (string pred action)
  (if (eq (car-safe action) 'boundaries)
      (cons 'boundaries
            (cons
             (if-let (pos (seq-position string ?#))
                 (1+ pos)
               (length string)) 0))
    (complete-with-action action '(alpha beta gamma) "" pred)))

If you enter grep#filter, then "grep" is ignored by completion and "filter" is used for completion. This allows also to TAB cycle through the results in default completion which is an improvement over the status quo in consult-grep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions