From ef2ef880e2f29662c11a5422da11b293d1c1fe15 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Wed, 14 Sep 2022 21:35:00 +0200 Subject: [PATCH] Fix to Warning: Unused lexical variable `subcmd' --- lisp/pcmpl-linux.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index a2195c1e88..023c655a2a 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -158,6 +158,12 @@ pcomplete/systemctl (pcomplete-here (pcomplete-from-help "systemctl --help"))) ;; TODO: suggest only relevant units to each subcommand + ("start" + (pcomplete-here + (pcmpl-linux--systemd-units context "--state" "inactive,failed"))) + ((or "restart" "stop") + (pcomplete-here + (pcmpl-linux--systemd-units context "--state" "active"))) (_ (pcomplete-here (completion-table-in-turn (pcmpl-linux--systemd-units context "--all") -- 2.37.3