Function: doom-modeline-env--get
doom-modeline-env--get is a natively compiled function defined in
doom-modeline-env.el.
Signature
(doom-modeline-env--get PROG ARGS CALLBACK)
Documentation
Start a sub process using PROG and apply the ARGS to the sub process.
Once it receives information from STDOUT, it closes off the subprocess and
passes on the information into the CALLBACK.
Example:
(doom-modeline-env--get
"ruby"
'("--version")
(lambda (line)
(message (doom-modeline-parser--ruby line)))
Source Code
;; Defined in /nix/store/1lcicrdd2r4b8rkc91nnn74ymk1jl6yd-emacs-packages-deps/share/emacs/site-lisp/elpa/doom-modeline-20260928.1632/doom-modeline-env.el
(defun doom-modeline-env--get (prog args callback)
"Start a sub process using PROG and apply the ARGS to the sub process.
Once it receives information from STDOUT, it closes off the subprocess and
passes on the information into the CALLBACK.
Example:
(doom-modeline-env--get
\"ruby\"
\\='(\"--version\")
(lambda (line)
(message (doom-modeline-parser--ruby line)))"
(when-let* ((proc (ignore-errors
(apply 'start-process
;; Flatten process-args into a single list so we can handle
;; variadic length args
(append
(list "doom-modeline-env" nil prog)
args))))
(parser callback))
(set-process-filter proc
(lambda (_proc line)
(ignore-errors
(funcall parser line))))))