}
_systemd_inhibit_command(){
- if (( CURRENT == 1 )); then
+ if (( CURRENT == 1 )); then
compset -q
_normal
else
_output_opts=(short short-monotonic verbose export json json-pretty json-see cat)
_describe -t output 'output mode' _output_opts || compadd "$@"
}
-
+
(( $+functions[_systemctl_command] )) || _systemctl_command()
{
__systemctl()
{
- systemctl --full --no-legend --no-pager "$@"
+ local -a _modes
+ _modes=("--user" "--system")
+ systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
}
(( $+functions[_systemctl_delete] )) || _systemctl_delete()
{
compadd "$@" - $(__systemctl list-units --type snapshot --all \
- | cut -d' ' -f1 2>/dev/null ) || _message "no snampshot found"
+ | cut -d' ' -f1 2>/dev/null ) || _message "no snapshot found"
}
# Completion functions for ENVS
_journal_fields() {
local -a _fields cmd
cmd=("journalctl" "-F ${@[-1]}" "2>/dev/null" )
- _fields=( ${(f)"$(_call_program fields $cmd[@])"} )
+ _fields=( ${(f)"$(_call_program fields $cmd[@])"} )
typeset -U _fields
_describe 'possible values' _fields
}
#_model=( ${(f)"$(echo $_file[2] | awk '/^ / {print $1}')"} )
#_variant=( ${(f)"$(echo $_file[3] | awk '/^ / {print $1}')"} )
#_options=( ${(f)"$(echo ${_file[4]//:/\\:} | awk '/^ / {print $1}')"} )
-
- case $CURRENT in
+
+ case $CURRENT in
2) _describe layouts _layout ;;
3) _describe models _model;;
4) _describe variants _variant;;
'--timeout=[The maximum number of seconds to wait for a reply from systemd-udevd.]' \
'--help[Print help text.]'
}
-
+
_udevadm_monitor(){
_arguments \
'--kernel[Print the kernel uevents.]' \
if (( CURRENT == 2 )); then
_arguments \
'--help[Print help text]' \
- '*::builtins:(blkid btrfs firmware hwdb input_id kmod path_id usb_id uaccess)'
+ '*::builtins:(blkid btrfs hwdb input_id kmod path_id usb_id uaccess)'
elif (( CURRENT == 3 )); then
_arguments \
'--help[Print help text]' \