_loginctl: respects the verbose style. which allows a user to get
the pre
d5df0d950f8bc behavior of not showing a description for sessions
and users, by default they aren't shown.
zstyle ':completion:*' verbose true
or
zstyle ':completion:*:loginctl*:*' verbose true # or similar
Will show the descriptions.
zstyle ':completion:*' verbose true
and
zstyle ':completion:*:loginctl*:*' verbose false # or similar
Won't show descriptions for loginctl only
_systemd: complete pids for systemd-notify's --pid option.
display a message of the expected argument for other options.
_systemd-inhibit: complete block & delay for --mode
display a message of the expected argument for --who/--why
_sys_all_sessions_descr[(i)$_ignore:*]=()
done
_sys_all_sessions_descr[(i)$_ignore:*]=()
done
- _describe -t systemd-sessions session _sys_all_sessions_descr _sys_all_sessions "$@"
+ if zstyle -T ":completion:${curcontext}:systemd-sessions" verbose; then
+ _describe -t systemd-sessions session _sys_all_sessions_descr _sys_all_sessions "$@"
+ else
+ local expl
+ _wanted systemd-sessions expl session compadd "$@" -a _sys_all_sessions
+ fi
_sys_all_users[(i)$_ignore]=()
_sys_all_users_descr[(i)$_ignore:*]=()
done
_sys_all_users[(i)$_ignore]=()
_sys_all_users_descr[(i)$_ignore:*]=()
done
# using the common tag `users' here, not rolling our own `systemd-users' tag
# using the common tag `users' here, not rolling our own `systemd-users' tag
- _describe -t users user ${_sys_all_users_descr:+_sys_all_users_descr} _sys_all_users "$@"
+ if zstyle -T ":completion:${curcontext}:users" verbose; then
+ _describe -t users user ${_sys_all_users_descr:+_sys_all_users_descr} _sys_all_users "$@"
+ else
+ local expl
+ _wanted users expl user compadd "$@" -a _sys_all_users
+ fi
_sys_all_seats_descr[(i)$_ignore:*]=()
done
_sys_all_seats_descr[(i)$_ignore:*]=()
done
- _describe -t systemd-seats seat _sys_all_seats_descr _sys_all_seats "$@"
+ if zstyle -T ":completion:${curcontext}:systemd-seats" verbose; then
+ _describe -t systemd-seats seat _sys_all_seats_descr _sys_all_seats "$@"
+ else
+ local expl
+ _wanted systemd-seats expl seat compadd "$@" -a _sys_all_seats
+ fi
}
for fun in seat-status show-seat terminate-seat ; do
(( $+functions[_loginctl_$fun] )) || _loginctl_$fun()
}
for fun in seat-status show-seat terminate-seat ; do
(( $+functions[_loginctl_$fun] )) || _loginctl_$fun()