From: Eli Zaretskii <eliz@gnu.org>
To: Liu Hui <liuhui1610@gmail.com>
Cc: 63411@debbugs.gnu.org
Subject: bug#63411: [PATCH] pcomplete/systemctl cannot complete units for old versions of systemd
Date: Thu, 18 May 2023 13:40:29 +0300 [thread overview]
Message-ID: <83edndx6qq.fsf@gnu.org> (raw)
In-Reply-To: <CAOQTW-NRxGk8+33WDAkWUwVg5TcAHc+XDMTA_HOOrd1oODu35g@mail.gmail.com> (message from Liu Hui on Wed, 17 May 2023 16:53:13 +0800)
> From: Liu Hui <liuhui1610@gmail.com>
> Date: Wed, 17 May 2023 16:53:13 +0800
>
> Here is the patch that fixes the problem.
>
> 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
Thanks.
I'm not an expert on systemctl; would someone who uses that please
tell if this could have any downsides? E.g., is --no-legend expected
to be deprecated, perhaps resulting in a warning message or something?
If not, why did the systemd developers add another option with the
same semantics?
next prev parent reply other threads:[~2023-05-18 10:40 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 ` bug#63411: [PATCH] " Liu Hui
2023-05-18 10:40 ` Eli Zaretskii [this message]
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=83edndx6qq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63411@debbugs.gnu.org \
--cc=liuhui1610@gmail.com \
/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).