|
1 | | -#compdef journalctl hostnamectl localectl timedatectl systemd-coredumpctl udevadm systemd-analyze systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles systemd-tty-ask-password-agent machinectl |
| 1 | +#compdef journalctl localectl timedatectl systemd-coredumpctl udevadm systemd-analyze systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles systemd-tty-ask-password-agent machinectl |
2 | 2 |
|
3 | 3 | _ctls() |
4 | 4 | { |
5 | 5 | local curcontext="$curcontext" state lstate line |
6 | 6 | case "$service" in |
7 | | - hostnamectl) |
8 | | - _arguments -s \ |
9 | | - {-h,--help}'[Show this help]' \ |
10 | | - '--version[Show package version]' \ |
11 | | - '--transient[Only set transient hostname]' \ |
12 | | - '--static[Only set static hostname]' \ |
13 | | - '--pretty[Only set pretty hostname]' \ |
14 | | - '--no-ask-password[Do not prompt for password]' \ |
15 | | - {-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \ |
16 | | - '*::hostnamectl commands:_hostnamectl_command' |
17 | | - ;; |
18 | 7 | journalctl) |
19 | 8 | _arguments -s \ |
20 | 9 | '--since=[Start showing entries newer or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \ |
@@ -323,27 +312,6 @@ _journal_fields() { |
323 | 312 | _describe 'possible values' _fields |
324 | 313 | } |
325 | 314 |
|
326 | | -_hostnamectl_command() { |
327 | | - local -a _hostnamectl_cmds |
328 | | - _hostnamectl_cmds=( |
329 | | - "status:Show current hostname settings" |
330 | | - "set-hostname:Set system hostname" |
331 | | - "set-icon-name:Set icon name for host" |
332 | | - ) |
333 | | - if (( CURRENT == 1 )); then |
334 | | - _describe -t commands 'hostnamectl commands' _hostnamectl_cmds || compadd "$@" |
335 | | - else |
336 | | - local curcontext="$curcontext" |
337 | | - cmd="${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}" |
338 | | - if (( $#cmd )); then |
339 | | - [[ $cmd == status ]] && msg="no options" || msg="options for $cmd" |
340 | | - _message "$msg" |
341 | | - else |
342 | | - _message "unknown hostnamectl command: $words[1]" |
343 | | - fi |
344 | | - fi |
345 | | -} |
346 | | - |
347 | 315 | _localectl_set-locale() { |
348 | 316 | local -a _confs _locales |
349 | 317 | local expl suf |
|
0 commit comments