]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix systemd unit completion for old versions of systemd
authorLiu Hui <liuhui1610@gmail.com>
Wed, 17 May 2023 08:39:18 +0000 (16:39 +0800)
committerEli Zaretskii <eliz@gnu.org>
Sat, 20 May 2023 15:01:02 +0000 (18:01 +0300)
* lisp/pcmpl-linux.el (pcmpl-linux--systemd-units): Use '--no-legend'
for compatibility with older versions of systemctl.  (Bug#63411)

lisp/pcmpl-linux.el

index 082072d87d23030e52a92321cf75e0e73391e6b0..589b4799c8d9533700aa64fd57bd4be4c8589e06 100644 (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)))