[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57673: [PATCH] Parse --help messages for pcomplete
From: |
Lars Ingebrigtsen |
Subject: |
bug#57673: [PATCH] Parse --help messages for pcomplete |
Date: |
Wed, 14 Sep 2022 21:48:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Augusto Stoffel <arstoffel@gmail.com> writes:
> I've attached a patch to be applied (and squashed) on top of what I sent
> previously. Let me know if this is inconvenient and I'll send the whole
> thing.
I'd prefer the whole thing in one patch.
[...]
> + ("start"
> + (pcomplete-here
> + (pcmpl-linux--systemd-units context "--state"
> "inactive,failed")))
> + ((or "restart" "stop")
> + (pcomplete-here
> + (pcmpl-linux--systemd-units context "--state" "active")))
But... subcmd isn't used here in the new lines, either, so does that
really fix the warning?
> Hum, I don't know how to fix this. The long line is the function
> signature, which is created mechanically by cl-defun and displays all
> the default values of the keyword arguments.
>
> The formatting is horrible:
>
> (pcomplete-from-help COMMAND &rest ARGS &key (MARGIN (rx bol (+ " ")))
> (ARGUMENT (rx "-" (+ (any "-" alnum)) (32 "="))) (METAVAR (rx (32 " ")
> (or (+ (any alnum "_-")) (seq "[" (+? nonl) "]") (seq "<" (+? nonl)
> ">") (seq "{" (+? nonl) "}")))) (SEPARATOR (rx ", " symbol-start))
> (DESCRIPTION (rx (* nonl) (* "\n" (>= 9 " ") (* nonl)))) NARROW-START
> NARROW-END)
>
> But the information is good to have, because you need to know what these
> regexps are in order to use the function.
Oh, yeah, that's pretty bad... we should probably fix that in the
cl-defun macro, I guess, so this doesn't have to be fixed in this patch.
- bug#57673: [PATCH] Parse --help messages for pcomplete, (continued)
- bug#57673: [PATCH] Parse --help messages for pcomplete, Stefan Monnier, 2022/09/08
- bug#57673: [PATCH] Parse --help messages for pcomplete, Augusto Stoffel, 2022/09/08
- bug#57673: [PATCH] Parse --help messages for pcomplete, Stefan Monnier, 2022/09/08
- bug#57673: [PATCH] Parse --help messages for pcomplete, Augusto Stoffel, 2022/09/10
- bug#57673: [PATCH] Parse --help messages for pcomplete, Stefan Monnier, 2022/09/10
- bug#57673: [PATCH] Parse --help messages for pcomplete, Augusto Stoffel, 2022/09/10
- bug#57673: [PATCH] Parse --help messages for pcomplete, Augusto Stoffel, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete, Lars Ingebrigtsen, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete, Augusto Stoffel, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete,
Lars Ingebrigtsen <=
- bug#57673: [PATCH] Parse --help messages for pcomplete, Augusto Stoffel, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete, Lars Ingebrigtsen, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete, Stefan Monnier, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete, Lars Ingebrigtsen, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete, Augusto Stoffel, 2022/09/14
- bug#57673: [PATCH] Parse --help messages for pcomplete, Stefan Monnier, 2022/09/14