Files
systemd/shell-completion/zsh/_systemd-sysinstall
T
Lennart Poettering ce8d684ed8 sysinstall: optionally, automatically pick target block device after a settle timeout
Let's make sysinstall useful for truly unattended installations, and let
it it automatically pick a target disk after some settlement time-out.
2026-09-23 10:14:25 +02:00

32 lines
1.8 KiB
Plaintext

#compdef systemd-sysinstall
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_systemd-sysinstall_devices] )) ||
_systemd-sysinstall_devices() {
local -a _devices
_devices=( ${(f)"$(systemd-repart --list-devices 2>/dev/null)"} )
_wanted devices expl 'block device' compadd -a _devices
}
_arguments \
'(- *)'{-h,--help}'[Show help text]' \
'(- *)--version[Show package version]' \
'--device-auto[Automatically pick the target disk once the device list settled]' \
'--device-auto-timeout=[Settle timeout for --device-auto]:time span' \
'--welcome=[Show welcome text]:boolean:(yes no)' \
'--chrome=[Show colored bars at top and bottom of the terminal]:boolean:(yes no)' \
'--erase=[Erase target disk before installation]:boolean:(yes no auto)' \
'--confirm=[Query for confirmation before installation]:boolean:(yes no)' \
'--summary=[Show summary before installation]:boolean:(yes no)' \
'--reboot=[Reboot system after installation]:boolean:(yes no)' \
'--variables=[Register installation in firmware variables]:boolean:(yes no auto)' \
'--mute-console=[Mute kernel/PID 1 console output during installation]:boolean:(yes no)' \
'--copy-locale=[Copy current locale to target system]:boolean:(yes no)' \
'--copy-keymap=[Copy current keymap to target system]:boolean:(yes no)' \
'--copy-timezone=[Copy current timezone to target system]:boolean:(yes no)' \
'--definitions=[Find partition definitions in directory]:directory:_directories' \
'--kernel=[Kernel image to install]:kernel image:_files' \
'--set-credential=[Install a credential with a literal value]: : _message "ID:VALUE"' \
'--load-credential=[Load credential from a file or AF_UNIX socket]: : _message "ID:PATH"' \
'*::block device:_systemd-sysinstall_devices'