From aaba4753ada1c003171d9a5342c87a945992e62f Mon Sep 17 00:00:00 2001 From: Liu Hui Date: Wed, 17 May 2023 16:39:18 +0800 Subject: [PATCH] Fix systemd unit completion for old versions of systemd * lisp/pcmpl-linux.el (pcmpl-linux--systemd-units): Use '--no-legend' for compatibility. --- lisp/pcmpl-linux.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index 082072d87d2..589b4799c8d 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -119,7 +119,8 @@ pcmpl-linux--systemd-units (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))) -- 2.25.1