shell-completion: systemd-analyze verify, systemctl link

Some zsh completion helpers were not installed, so completion
was broken.

Add systemd-analyze verify. Make systemctl link complete only
unit names.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2014-07-21 22:33:51 -04:00
parent 1d3bc0177a
commit 2c12a402cb
7 changed files with 39 additions and 4 deletions
+9
View File
@@ -44,6 +44,7 @@ _systemd_analyze() {
[CRITICAL_CHAIN]='critical-chain'
[DOT]='dot'
[LOG_LEVEL]='set-log-level'
[VERIFY]='verify'
)
_init_completion || return
@@ -99,6 +100,14 @@ _systemd_analyze() {
comps='debug info notice warning err crit alert emerg'
fi
elif __contains_word "$verb" ${VERBS[VERIFY]}; then
if [[ $cur = -* ]]; then
comps='--help --version --system --user --no-man'
else
comps=$( compgen -A file -- "$cur" )
compopt -o filenames
fi
fi
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )