_systemd revision 799d54be0b681c0329539fca604261994e7f8c0e
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici#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
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici local curcontext="$curcontext" state lstate line
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici case "$service" in
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici hostnamectl)
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici _arguments -s \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-h,--help}'[Show this help]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--version[Show package version]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--transient[Only set transient hostname]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--static[Only set static hostname]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--pretty[Only set pretty hostname]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--no-ask-password[Do not prompt for password]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '*::hostnamectl commands:_hostnamectl_command'
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici _arguments -s \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--since=[Start showing entries newer or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--until=[Stop showing entries older or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--system[Show system and kernel messages]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--user[Show messages from user services]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-b,--this-boot}'[Show data only from current boot]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--user-unit[Show data only from the specified user session unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \
83b6876875220fb356bba2bd2315de3f8eefe81aKohei Tamura {-f,--follow}'[Follow journal]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-n,--lines=}'[Number of journal entries to show]:integer' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--no-tail[Show all lines, even in follow mode]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-o,--output=}'[Change journal output mode]:output modes:_outputmodes' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-l,--full}'[Show long fields in full]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-a,--all}'[Show all fields, including long and unprintable]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-q,--quiet}"[Don't show privilege warning]" \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--no-pager[Do not pipe output into a pager]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-m,--merge}'[Show entries from all available journals]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-D,--directory=}'[Show journal files from directory]:directories:_directories' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--interval=[Time interval for changing the FSS sealing key]:time interval' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--verify-key=[Specify FSS verification key]:FSS key' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-h,--help}'[Show this help]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--version[Show package version]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--new-id128[Generate a new 128 Bit ID]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--header[Show journal header information]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--disk-usage[Show total disk usage]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--setup-keys[Generate new FSS key pair]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--verify[Verify journal file consistency]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--list-catalog[List messages in catalog]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--update-catalog[Update binary catalog database]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '*::default: _journal_none'
83b6876875220fb356bba2bd2315de3f8eefe81aKohei Tamura _arguments \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-h,--help}'[Show this help]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--version[Show package version]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici "--no-convert[Don't convert keyboard mappings]" \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--no-pager[Do not pipe output into a pager]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--no-ask-password[Do not prompt for password]' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '*::localectl commands:_localectl_command'
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici systemd-coredumpctl)
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici _arguments \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici {-o,--output=}'[Write output to FILE]:output file:_files' \
c3bd7d3d1681cc7a9c44ad51b6bcba4ffe35a8e8Alin Brici '--no-pager[Do not pipe output into a pager]' \
{-t,--type=}'[Only display a selected set of override types]:types:(masked equivalent redirected overridden unchanged)' \
'--what=[Operations to inhibit]:options:(shutdown sleep idle handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch)' \
{--directory=,-D}'[Directory to use as file system root for the namespace container. If omitted the current directory will be used.]:directories:_directories' \
{--boot,-b}'[Automatically search for an init binary and invoke it instead of a shell or a user supplied program.]' \
{--controllers=,-C}'[Makes the container appear in other hierarchies than the name=systemd:/ one. Takes a comma-separated list of controllers.]' \
'--private-network[Turn off networking in the container. This makes all network interfaces unavailable in the container, with the exception of the loopback device.]' \
'--capability=[List one or more additional capabilities to grant the container.]:capabilities:_systemd-nspawn' \
"--link-journal=[Control whether the container's journal shall be made visible to the host system.]:options:(no, host, guest, auto)" \
'--create[Create, set ownership/permissions based on the config files.]' \
'--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \
'--console[Ask question on /dev/console.]'
{-p,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
_commands=( ${(f)"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} )
cmd=("journalctl" "-F ${@[-1]}" "2>/dev/null" )
_confs=( ${${(f)"$(_call_program confs "locale 2>/dev/null")"}%\=*} )
_file=( ${(ps:\n\!:)"$(<$_xorg_lst/rules/xorg.lst)"} )
# user can set zstyle ':completion:*:*:systemd-coredumpctl:*' sort no for coredumps to be ordered by date, otherwise they get ordered by pid
_dumps=( "${(foa)$(systemd-coredumpctl list | awk 'BEGIN{OFS=":"} /^\s/ {sub(/[[ \t]+/, ""); print $5,$0}' 2>/dev/null)}" )
"list:List currently running VMs/containers"
"status:Show VM/container status"
"show:Show properties of one or more VMs/containers"
"terminate:Terminate one or more VMs/containers"
"kill:Send signal to process or a VM/container"
'--query=[Query the database for specified type of device data. It needs the --path or --name to identify the specified device.]:type:(name symlink path property all)' \
'--attribute-walk[Print all sysfs properties of the specified device that can be used in udev rules to match the specified device]' \
'--export[Print output as key/value pairs.]' \
'--device-id-of-file=[Print major/minor numbers of the underlying device, where the file lives on.]:files:_udevadm_mounts' \
'--stop-exec-queue[Signal systemd-udevd to stop executing new events. Incoming events will be queued.]' \
'--reload[Signal systemd-udevd to reload the rules files and other databases like the kernel module index.]' \
tmp=( "${(@f)$(< /etc/mtab)}" )