Function: tramp-apptainer--completion-function
tramp-apptainer--completion-function is an autoloaded and
byte-compiled function defined in tramp-container.el.gz.
Signature
(tramp-apptainer--completion-function METHOD)
Documentation
List Apptainer instances available for connection.
This function is used by tramp-set-completion-function, please
see its function help for a description of the format.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-container.el.gz
;;;###tramp-autoload
(defun tramp-apptainer--completion-function (method)
"List Apptainer instances available for connection.
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
(when-let* ((raw-list
(shell-command-to-string (concat program " instance list")))
;; Ignore header line.
(lines (cdr (split-string raw-list "\n" 'omit)))
(names (tramp-compat-seq-keep
(lambda (line)
(when (string-match
(rx bol (group (1+ (not space)))
(1+ space) (1+ (not space))
(1+ space) (1+ (not space)))
line)
(match-string 1 line)))
lines)))
(mapcar (lambda (name) (list nil name)) names))))