1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00

zsh: drop unused code

The verbs were commented, so the completion functions wouldn't be
invoked anyway.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-11-16 12:24:27 +01:00
parent 22375a271e
commit 5a87425c61

View File

@ -1,32 +1,11 @@
#compdef systemd-analyze #compdef systemd-analyze
# SPDX-License-Identifier: LGPL-2.1-or-later # SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_systemd-analyze_log-level] )) ||
_systemd-analyze_log-level() {
local -a _levels
_levels=(debug info notice warning err crit alert emerg)
_describe -t level 'logging level' _levels || compadd "$@"
}
(( $+functions[_systemd-analyze_log-target] )) ||
_systemd-analyze_log-target() {
local -a _targets
_targets=(console journal kmsg journal-or-kmsg null)
_describe -t target 'logging target' _targets || compadd "$@"
}
(( $+functions[_systemd-analyze_verify] )) || (( $+functions[_systemd-analyze_verify] )) ||
_systemd-analyze_verify() { _systemd-analyze_verify() {
_sd_unit_files _sd_unit_files
} }
(( $+functions[_systemd-analyze_service-watchdogs] )) ||
_systemd-analyze_service-watchdogs() {
local -a _states
_states=(on off)
_describe -t state 'state' _states || compadd "$@"
}
(( $+functions[_systemd-analyze_cat-config] )) || (( $+functions[_systemd-analyze_cat-config] )) ||
_systemd-analyze_cat-config() { _systemd-analyze_cat-config() {
_files -W '(/run/systemd/ /etc/systemd/ /usr/lib/systemd/)' -P 'systemd/' _files -W '(/run/systemd/ /etc/systemd/ /usr/lib/systemd/)' -P 'systemd/'
@ -75,9 +54,7 @@
'timestamp:Parse a systemd syntax timestamp' 'timestamp:Parse a systemd syntax timestamp'
'timespan:Parse a systemd syntax timespan' 'timespan:Parse a systemd syntax timespan'
'security:Analyze security settings of a service' 'security:Analyze security settings of a service'
# 'log-level:Get/set systemd log threshold' # log-level, log-target, service-watchdogs have been deprecated
# 'log-target:Get/set systemd log target'
# 'service-watchdogs:Get/set service watchdog status'
) )
if (( CURRENT == 1 )); then if (( CURRENT == 1 )); then