mkosi: Add zsh to Arch packages

Useful for testing zsh completion changes.
This commit is contained in:
Daan De Meyer
2021-09-01 10:01:18 +02:00
parent e11ca6bb4d
commit 8de7929de5
6 changed files with 96 additions and 15 deletions
+14 -1
View File
@@ -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") )