Function: majutsu-remote-candidate-data
majutsu-remote-candidate-data is a natively compiled function defined
in majutsu-remote.el.
Signature
(majutsu-remote-candidate-data &optional DIRECTORY)
Documentation
Return completion payload for Git remote names in DIRECTORY.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-remote.el
(defun majutsu-remote-candidate-data (&optional directory)
"Return completion payload for Git remote names in DIRECTORY."
(let ((default-directory (or directory default-directory))
(entries (make-hash-table :test #'equal))
candidates)
(condition-case _
(dolist (line (or (majutsu-jj-lines "git" "remote" "list") '()))
(when-let* ((entry (majutsu-remote--parse-list-line line))
(name (plist-get entry :name)))
(unless (gethash name entries)
(push name candidates))
(puthash name entry entries)))
(error nil))
(list :category 'majutsu-remote
:candidates (nreverse candidates)
:entries entries
:annotation-suffix-function
(majutsu-remote--completion-suffix-function entries))))