diff options
author | Lucas Werkmeister <mail@lucaswerkmeister.de> | 2017-09-07 23:23:33 +0200 |
---|---|---|
committer | Lucas Werkmeister <mail@lucaswerkmeister.de> | 2017-09-07 23:47:33 +0200 |
commit | 4146ac2a4cba70d2536465bb9b7e99b09558f153 (patch) | |
tree | e56887835b89bf076c396cce1f79447bca750e43 /shell-completion | |
parent | 9ecf63a457a357fa6c3d7801bbfc7c14800ae87d (diff) | |
download | systemd-4146ac2a4cba70d2536465bb9b7e99b09558f153.tar.gz |
shell-completion: add systemd-analyze set-log-target
The `systemd-analyze set-log-target` command was added in v227 (commit
2ca2a91cf1), but was missing from the shell completion specifications.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/systemd-analyze | 8 | ||||
-rw-r--r-- | shell-completion/zsh/_systemd-analyze | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index 92ff13d316..75352a7b3e 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -44,6 +44,7 @@ _systemd_analyze() { [CRITICAL_CHAIN]='critical-chain' [DOT]='dot' [LOG_LEVEL]='set-log-level' + [LOG_TARGET]='set-log-target' [VERIFY]='verify' [SECCOMP_FILTER]='syscall-filter' ) @@ -101,6 +102,13 @@ _systemd_analyze() { comps='debug info notice warning err crit alert emerg' fi + elif __contains_word "$verb" ${VERBS[LOG_TARGET]}; then + if [[ $cur = -* ]]; then + comps='--help --version --system --user' + else + comps='console journal kmsg journal-or-kmsg null' + fi + elif __contains_word "$verb" ${VERBS[SECCOMP_FILTER]}; then if [[ $cur = -* ]]; then comps='--help --version' diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index 0e670034c1..3f091e326a 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -6,6 +6,12 @@ _systemd_analyze_set-log-level() { _describe -t level 'logging level' _levels || compadd "$@" } +_systemd_analyze_set-log-target() { + local -a _targets + _targets=(console journal kmsg journal-or-kmsg null) + _describe -t target 'logging target' _targets || compadd "$@" +} + _systemd_analyze_verify() { _sd_unit_files } @@ -21,6 +27,7 @@ _systemd_analyze_command(){ 'dot:Dump dependency graph (in dot(1) format)' 'dump:Dump server status' 'set-log-level:Set systemd log threshold' + 'set-log-target:Set systemd log target' 'syscall-filter:List syscalls in seccomp filter' 'verify:Check unit files for correctness' ) |