Fix systemd unit completion for old versions of systemd

* lisp/pcmpl-linux.el (pcmpl-linux--systemd-units): Use '--no-legend'
for compatibility with older versions of systemctl.  (Bug#63411)
This commit is contained in:
Liu Hui 2023-05-17 16:39:18 +08:00 committed by Eli Zaretskii
parent 8c56557cd9
commit 6b60c8142e

View file

@ -119,7 +119,8 @@ Test is done using `equal'."
(with-temp-buffer
(apply #'call-process
"systemctl" nil '(t nil) nil
"list-units" "--full" "--legend=no" "--plain" args)
;; "--legend=no" doesn't exist before systemd v248
"list-units" "--full" "--no-legend" "--plain" args)
(goto-char (point-min))
(let (result)
(while (re-search-forward (rx bol (group (+ (not space)))