mkosi: Add zsh to Arch packages
Useful for testing zsh completion changes.
This commit is contained in:
@@ -55,13 +55,14 @@ _systemd_analyze() {
|
||||
)
|
||||
|
||||
local -A VERBS=(
|
||||
[STANDALONE]='time blame plot dump unit-paths exit-status condition calendar timestamp timespan'
|
||||
[STANDALONE]='time blame plot dump unit-paths exit-status calendar timestamp timespan'
|
||||
[CRITICAL_CHAIN]='critical-chain'
|
||||
[DOT]='dot'
|
||||
[VERIFY]='verify'
|
||||
[SECCOMP_FILTER]='syscall-filter'
|
||||
[CAT_CONFIG]='cat-config'
|
||||
[SECURITY]='security'
|
||||
[CONDITION]='condition'
|
||||
)
|
||||
|
||||
local CONFIGS='systemd/bootchart.conf systemd/coredump.conf systemd/journald.conf
|
||||
@@ -153,6 +154,18 @@ _systemd_analyze() {
|
||||
fi
|
||||
comps=$( __get_services $mode )
|
||||
fi
|
||||
|
||||
elif __contains_word "$verb" ${VERBS[CONDITION]}; then
|
||||
if [[ $cur = -* ]]; then
|
||||
comps='--help --version --system --user --global --no-pager --root --image'
|
||||
elif [[ $prev = "-u" ]] || [[ $prev = "--unit" ]]; then
|
||||
if __contains_word "--user" ${COMP_WORDS[*]}; then
|
||||
mode=--user
|
||||
else
|
||||
mode=--system
|
||||
fi
|
||||
comps=$( __get_services $mode )
|
||||
fi
|
||||
fi
|
||||
|
||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||
|
||||
Reference in New Issue
Block a user