[FILE]='link switch-root'
[TARGETS]='set-default'
[MACHINES]='list-machines'
+ [LOG_LEVEL]='log-level'
+ [LOG_TARGET]='log-target'
+ [SERVICE_WATCHDOGS]='service-watchdogs'
)
for ((i=0; i < COMP_CWORD; i++)); do
elif __contains_word "$verb" ${VERBS[TARGETS]}; then
comps=$( __systemctl $mode list-unit-files --type target --full --all "$cur*" \
| { while read -r a b; do echo " $a"; done; } )
+ elif __contains_word "$verb" ${VERBS[LOG_LEVEL]}; then
+ 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_WATCHDOGS]}; then
+ comps='on off'
fi
COMPREPLY=( $(compgen -o filenames -W '$comps' -- "$cur_orig") )
[STANDALONE]='time blame plot dump unit-paths exit-status condition calendar timestamp timespan'
[CRITICAL_CHAIN]='critical-chain'
[DOT]='dot'
- [LOG_LEVEL]='log-level'
- [LOG_TARGET]='log-target'
[VERIFY]='verify'
[SECCOMP_FILTER]='syscall-filter'
- [SERVICE_WATCHDOGS]='service-watchdogs'
[CAT_CONFIG]='cat-config'
[SECURITY]='security'
)
comps='--help --version --system --user --global --from-pattern --to-pattern --order --require'
fi
- elif __contains_word "$verb" ${VERBS[LOG_LEVEL]}; then
- if [[ $cur = -* ]]; then
- comps='--help --version --system --user'
- else
- 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 --no-pager'
compopt -o filenames
fi
- elif __contains_word "$verb" ${VERBS[SERVICE_WATCHDOGS]}; then
- if [[ $cur = -* ]]; then
- comps='--help --version --system --user'
- else
- comps='on off'
- fi
-
elif __contains_word "$verb" ${VERBS[CAT_CONFIG]}; then
if [[ $cur = -* ]]; then
comps='--help --version --root --no-pager'