From: Liu Hui <liuhui1610@gmail.com>
To: 63411@debbugs.gnu.org
Subject: bug#63411: [PATCH] pcomplete/systemctl cannot complete units for old versions of systemd
Date: Wed, 17 May 2023 16:53:13 +0800 [thread overview]
Message-ID: <CAOQTW-NRxGk8+33WDAkWUwVg5TcAHc+XDMTA_HOOrd1oODu35g@mail.gmail.com> (raw)
In-Reply-To: <CAOQTW-NzYNh6HBHTr52bwsT306p_C2XvAavaiPOjCvA-8cCwjQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 42 bytes --]
Here is the patch that fixes the problem.
[-- Attachment #2: 0001-Fix-systemd-unit-completion-for-old-versions-of-syst.patch --]
[-- Type: text/x-patch, Size: 988 bytes --]
From aaba4753ada1c003171d9a5342c87a945992e62f Mon Sep 17 00:00:00 2001
From: Liu Hui <liuhui1610@gmail.com>
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
next prev parent reply other threads:[~2023-05-17 8:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 9:47 bug#63411: 29.0.90; pcomplete/systemctl cannot complete units for old versions of systemd Liu Hui
2023-05-17 8:53 ` Liu Hui [this message]
2023-05-18 10:40 ` bug#63411: [PATCH] " Eli Zaretskii
2023-05-18 13:29 ` Liu Hui
2023-05-18 14:16 ` Eli Zaretskii
2023-05-18 18:57 ` Jim Porter
2023-05-20 15:02 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOQTW-NRxGk8+33WDAkWUwVg5TcAHc+XDMTA_HOOrd1oODu35g@mail.gmail.com \
--to=liuhui1610@gmail.com \
--cc=63411@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).