!654 添加systemctl的service-log-level/target命令的自动提示补全
From: @protkhn Reviewed-by: @dillon_chen, @linfong Signed-off-by: @dillon_chen, @linfong
This commit is contained in:
commit
d4c822cb05
@ -0,0 +1,46 @@
|
|||||||
|
From 8bfc0e2d5ca09985900e8a2494b797f3086e9649 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Luca Boccassi <bluca@debian.org>
|
||||||
|
Date: Wed, 27 Dec 2023 16:59:03 +0100
|
||||||
|
Subject: [PATCH] bash completion: add systemctl service-log-level/target
|
||||||
|
|
||||||
|
(cherry picked from commit 79272d3098597686d9e796bd946ea272304fd720)
|
||||||
|
---
|
||||||
|
shell-completion/bash/systemctl.in | 18 ++++++++++++++++++
|
||||||
|
1 file changed, 18 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
|
||||||
|
index 03c3b701504..ef8cd8f4be2 100644
|
||||||
|
--- a/shell-completion/bash/systemctl.in
|
||||||
|
+++ b/shell-completion/bash/systemctl.in
|
||||||
|
@@ -236,6 +236,8 @@ _systemctl () {
|
||||||
|
[MACHINES]='list-machines'
|
||||||
|
[LOG_LEVEL]='log-level'
|
||||||
|
[LOG_TARGET]='log-target'
|
||||||
|
+ [SERVICE_LOG_LEVEL]='service-log-level'
|
||||||
|
+ [SERVICE_LOG_TARGET]='service-log-target'
|
||||||
|
[SERVICE_WATCHDOGS]='service-watchdogs'
|
||||||
|
)
|
||||||
|
|
||||||
|
@@ -365,6 +367,22 @@ _systemctl () {
|
||||||
|
comps='debug info notice warning err crit alert emerg'
|
||||||
|
elif __contains_word "$verb" ${VERBS[LOG_TARGET]}; then
|
||||||
|
comps='console journal kmsg journal-or-kmsg null'
|
||||||
|
+ elif __contains_word "$verb" ${VERBS[SERVICE_LOG_LEVEL]}; then
|
||||||
|
+ if __contains_word "$prev" ${VERBS[SERVICE_LOG_LEVEL]}; then
|
||||||
|
+ comps=$( __get_all_unit_files $mode "$cur" )
|
||||||
|
+ elif __contains_word "$prev" debug info notice warning err crit alert emerg; then
|
||||||
|
+ return 0
|
||||||
|
+ else
|
||||||
|
+ comps='debug info notice warning err crit alert emerg'
|
||||||
|
+ fi
|
||||||
|
+ elif __contains_word "$verb" ${VERBS[SERVICE_LOG_TARGET]}; then
|
||||||
|
+ if __contains_word "$prev" ${VERBS[SERVICE_LOG_TARGET]}; then
|
||||||
|
+ comps=$( __get_all_unit_files $mode "$cur" )
|
||||||
|
+ elif __contains_word "$prev" console journal kmsg journal-or-kmsg null; then
|
||||||
|
+ return 0
|
||||||
|
+ else
|
||||||
|
+ comps='console journal kmsg journal-or-kmsg null'
|
||||||
|
+ fi
|
||||||
|
elif __contains_word "$verb" ${VERBS[SERVICE_WATCHDOGS]}; then
|
||||||
|
comps='on off'
|
||||||
|
fi
|
||||||
@ -25,7 +25,7 @@
|
|||||||
Name: systemd
|
Name: systemd
|
||||||
Url: https://systemd.io/
|
Url: https://systemd.io/
|
||||||
Version: 255
|
Version: 255
|
||||||
Release: 14
|
Release: 15
|
||||||
License: MIT and LGPLv2+ and GPLv2+
|
License: MIT and LGPLv2+ and GPLv2+
|
||||||
Summary: System and Service Manager
|
Summary: System and Service Manager
|
||||||
|
|
||||||
@ -64,6 +64,7 @@ Patch6010: backport-user-util-validate-the-right-field.patch
|
|||||||
Patch6011: backport-fix-conf-parser-oom-check-issue.patch
|
Patch6011: backport-fix-conf-parser-oom-check-issue.patch
|
||||||
Patch6012: backport-unit-check-for-correct-function-in-vtable.patch
|
Patch6012: backport-unit-check-for-correct-function-in-vtable.patch
|
||||||
Patch6013: backport-fix-homed-log-message-typo-error.patch
|
Patch6013: backport-fix-homed-log-message-typo-error.patch
|
||||||
|
Patch6014: backport-bash-completion-add-systemctl-service-log-level-target.patch
|
||||||
|
|
||||||
Patch9008: update-rtc-with-system-clock-when-shutdown.patch
|
Patch9008: update-rtc-with-system-clock-when-shutdown.patch
|
||||||
Patch9009: udev-add-actions-while-rename-netif-failed.patch
|
Patch9009: udev-add-actions-while-rename-netif-failed.patch
|
||||||
@ -1643,6 +1644,9 @@ fi
|
|||||||
%{_libdir}/security/pam_systemd_loadkey.so
|
%{_libdir}/security/pam_systemd_loadkey.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 9 2024 Han Jinpeng <hanjinpeng@kylinos.cn> - 255-15
|
||||||
|
- Add bash completion for systemctl service-log-level/target
|
||||||
|
|
||||||
* Wed May 8 2024 Han Jinpeng <hanjinpeng@kylinos.cn> - 255-14
|
* Wed May 8 2024 Han Jinpeng <hanjinpeng@kylinos.cn> - 255-14
|
||||||
- backport: sync patches from systemd community
|
- backport: sync patches from systemd community
|
||||||
add backport-fix-conf-parser-oom-check-issue.patch
|
add backport-fix-conf-parser-oom-check-issue.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user