Function: majutsu-workspace--wash-list

majutsu-workspace--wash-list is a natively compiled function defined in majutsu-workspace.el.

Signature

(majutsu-workspace--wash-list SHOW-SINGLE ARGS)

Documentation

Wash jj workspace list output into workspace sections.

SHOW-SINGLE matches the behavior of majutsu-insert-workspaces.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-workspace.el
(defun majutsu-workspace--wash-list (show-single _args)
  "Wash `jj workspace list' output into workspace sections.
SHOW-SINGLE matches the behavior of `majutsu-insert-workspaces'."
  (let* ((entries (majutsu-workspace-parse-list-output
                   (buffer-substring (point-min) (point-max))
                   (majutsu-workspace--ensure-template-plan)))
         (visible (and entries (or show-single (length> entries 1)))))
    (delete-region (point-min) (point-max))
    (if (not visible)
        (magit-cancel-section)
      (magit-insert-heading (if (length> entries 1) "Workspaces" "Workspace"))
      (majutsu-workspace--insert-entries entries)
      (insert "\n"))))