diff options
| author | Liu Hui | 2023-05-17 16:39:18 +0800 |
|---|---|---|
| committer | Eli Zaretskii | 2023-05-20 18:01:02 +0300 |
| commit | 6b60c8142ea10b774cd01db39f803f806df5fc5b (patch) | |
| tree | 05a75599d784d8e09d919c9310cba705c7cb1c96 | |
| parent | 8c56557cd9dff754b7f28f5fb919ca3b2c58ebf3 (diff) | |
| download | emacs-6b60c8142ea10b774cd01db39f803f806df5fc5b.tar.gz emacs-6b60c8142ea10b774cd01db39f803f806df5fc5b.zip | |
Fix systemd unit completion for old versions of systemd
* lisp/pcmpl-linux.el (pcmpl-linux--systemd-units): Use '--no-legend'
for compatibility with older versions of systemctl. (Bug#63411)
| -rw-r--r-- | lisp/pcmpl-linux.el | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ Test is done using `equal'." | |||
| 119 | (with-temp-buffer | 119 | (with-temp-buffer |
| 120 | (apply #'call-process | 120 | (apply #'call-process |
| 121 | "systemctl" nil '(t nil) nil | 121 | "systemctl" nil '(t nil) nil |
| 122 | "list-units" "--full" "--legend=no" "--plain" args) | 122 | ;; "--legend=no" doesn't exist before systemd v248 |
| 123 | "list-units" "--full" "--no-legend" "--plain" args) | ||
| 123 | (goto-char (point-min)) | 124 | (goto-char (point-min)) |
| 124 | (let (result) | 125 | (let (result) |
| 125 | (while (re-search-forward (rx bol (group (+ (not space))) | 126 | (while (re-search-forward (rx bol (group (+ (not space))) |