From: Eisuke Kawashima Date: Mon, 14 Jul 2025 09:48:41 +0000 (+0900) Subject: style(shell-completion): expand hard tabs and fix indentation X-Git-Tag: v258-rc1~57^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfe6b3fa38c3c6ec8c313f82098c7c077934c718;p=thirdparty%2Fsystemd.git style(shell-completion): expand hard tabs and fix indentation --- diff --git a/shell-completion/bash/busctl b/shell-completion/bash/busctl index dc2714aaaef..97f08f0ab04 100644 --- a/shell-completion/bash/busctl +++ b/shell-completion/bash/busctl @@ -27,7 +27,7 @@ __contains_word () { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/importctl b/shell-completion/bash/importctl index 0a138424453..6b9316b7acd 100644 --- a/shell-completion/bash/importctl +++ b/shell-completion/bash/importctl @@ -27,7 +27,7 @@ __contains_word() { __get_machines() { local a b { machinectl list-images --full --no-legend --no-pager 2>/dev/null; machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl index c3e50a05a62..762faf6f4da 100644 --- a/shell-completion/bash/journalctl +++ b/shell-completion/bash/journalctl @@ -95,9 +95,9 @@ _journalctl() { ;; --unit|-u) if __contains_word "--user" ${COMP_WORDS[*]}; then - comps=$(journalctl -F '_SYSTEMD_USER_UNIT' 2>/dev/null) + comps=$(journalctl -F '_SYSTEMD_USER_UNIT' 2>/dev/null) else - comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null) + comps=$(journalctl -F '_SYSTEMD_UNIT' 2>/dev/null) fi # Similarly to systemctl, we need to distinguish between # escaped and unescaped names in order to be able to correctly diff --git a/shell-completion/bash/loginctl b/shell-completion/bash/loginctl index 7dbd9c04eab..7351212e0f6 100644 --- a/shell-completion/bash/loginctl +++ b/shell-completion/bash/loginctl @@ -33,7 +33,7 @@ __get_all_seats () { loginctl --no-legend list-seats | { while read -r a b __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index 10a59fc9237..d772bc6b0bb 100644 --- a/shell-completion/bash/machinectl +++ b/shell-completion/bash/machinectl @@ -27,7 +27,7 @@ __contains_word() { __get_machines() { local a b { machinectl list-images --full --no-legend --no-pager 2>/dev/null; machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/portablectl b/shell-completion/bash/portablectl index 8d88ab46bc1..77a499593da 100644 --- a/shell-completion/bash/portablectl +++ b/shell-completion/bash/portablectl @@ -27,7 +27,7 @@ __contains_word () { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/run0 b/shell-completion/bash/run0 index 96610e4f803..86253b826ae 100644 --- a/shell-completion/bash/run0 +++ b/shell-completion/bash/run0 @@ -27,7 +27,7 @@ __get_slice_units () { __systemctl list-units --all -t slice \ __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index b909a954e47..6e8f3296d7d 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -29,7 +29,7 @@ __contains_word () { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/systemd-cgls b/shell-completion/bash/systemd-cgls index 49739bd0c64..b466a9d8820 100644 --- a/shell-completion/bash/systemd-cgls +++ b/shell-completion/bash/systemd-cgls @@ -27,7 +27,7 @@ __contains_word() { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/systemd-cgtop b/shell-completion/bash/systemd-cgtop index 6a33cb227fd..cdddb066951 100644 --- a/shell-completion/bash/systemd-cgtop +++ b/shell-completion/bash/systemd-cgtop @@ -27,7 +27,7 @@ __contains_word() { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn index 5d54fca3346..070d842b18c 100644 --- a/shell-completion/bash/systemd-nspawn +++ b/shell-completion/bash/systemd-nspawn @@ -37,7 +37,7 @@ __get_slices() { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/systemd-run b/shell-completion/bash/systemd-run index 14b050ec4c6..f6838edc08c 100644 --- a/shell-completion/bash/systemd-run +++ b/shell-completion/bash/systemd-run @@ -48,7 +48,7 @@ __get_timer_properties () { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read -r a b; do echo " $a"; done; } | \ + { while read -r a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/timedatectl b/shell-completion/bash/timedatectl index f22cde282b9..3f4dfef35bf 100644 --- a/shell-completion/bash/timedatectl +++ b/shell-completion/bash/timedatectl @@ -29,7 +29,7 @@ __contains_word () { __get_machines() { local a b { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo " $a"; done; } | \ + { while read a b; do echo " $a"; done; } | \ sort -u } diff --git a/shell-completion/bash/udevadm b/shell-completion/bash/udevadm index ee463902b50..21fc6ed7c97 100644 --- a/shell-completion/bash/udevadm +++ b/shell-completion/bash/udevadm @@ -51,12 +51,12 @@ __get_root() { for ((i=0; i < COMP_CWORD; i++)); do if [[ "${COMP_WORDS[i]}" = --root=* ]]; then - echo "${COMP_WORDS[i]#--root=}" - break + echo "${COMP_WORDS[i]#--root=}" + break fi if (( i > 0 )) && [[ "${COMP_WORDS[i-1]}" == "--root" ]]; then - echo "${COMP_WORDS[i]}" - break + echo "${COMP_WORDS[i]}" + break fi done } diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl index 40826833728..79f9f45fa01 100644 --- a/shell-completion/zsh/_bootctl +++ b/shell-completion/zsh/_bootctl @@ -32,7 +32,7 @@ _bootctl_reboot-to-firmware() { local -a _completions _completions=( yes no ) typeset -U _completions - _describe 'possible values' _completions + _describe 'possible values' _completions } (( $+functions[_bootctl_commands] )) || _bootctl_commands() diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl index dc325809c68..3f6f92eabfe 100644 --- a/shell-completion/zsh/_journalctl +++ b/shell-completion/zsh/_journalctl @@ -48,26 +48,26 @@ _journalctl_field_values() { (( $+functions[_journalctl_boots] )) || _journalctl_boots() { - local -a _bootid _previousboots - _bootid=( ${(f)"$(_call_program bootid "$service -F _BOOT_ID")"} ) - _previousboots=( -{1..${#_bootid}} ) - _alternative : \ - "offsets:boot offsets:compadd -a '_previousboots[1,-2]'" \ - "bootid:boot ids:compadd -a _bootid" + local -a _bootid _previousboots + _bootid=( ${(f)"$(_call_program bootid "$service -F _BOOT_ID")"} ) + _previousboots=( -{1..${#_bootid}} ) + _alternative : \ + "offsets:boot offsets:compadd -a '_previousboots[1,-2]'" \ + "bootid:boot ids:compadd -a _bootid" } (( $+functions[_journalctl_facilities] )) || _journalctl_facilities() { - local -a _journalctl_facilities - _journalctl_facilities=(help kern user mail daemon auth syslog lpr news uucp cron authpriv ftp local0 local1 local2 local3 local4 local5 local6 local7) - _describe 'possible values' _journalctl_facilities + local -a _journalctl_facilities + _journalctl_facilities=(help kern user mail daemon auth syslog lpr news uucp cron authpriv ftp local0 local1 local2 local3 local4 local5 local6 local7) + _describe 'possible values' _journalctl_facilities } (( $+functions[_journalctl_namespaces] )) || _journalctl_namespaces() { - local -a _journalctl_namespaces - _journalctl_namespaces=( ${(f)"$(_call_program namespaces "$service --list-namespaces --output=cat" 2>/dev/null)"} ) - _describe 'possible values' _journalctl_namespaces + local -a _journalctl_namespaces + _journalctl_namespaces=( ${(f)"$(_call_program namespaces "$service --list-namespaces --output=cat" 2>/dev/null)"} ) + _describe 'possible values' _journalctl_namespaces } # Build arguments for "journalctl" to be used in completion. diff --git a/shell-completion/zsh/_loginctl b/shell-completion/zsh/_loginctl index 5e86ff6d012..3a98d01c0e6 100644 --- a/shell-completion/zsh/_loginctl +++ b/shell-completion/zsh/_loginctl @@ -35,8 +35,8 @@ for fun in session-status show-session activate lock-session unlock-session term _loginctl_$fun() { local -a _sys_all_sessions{,_descr} - _sys_all_sessions=( "self" ) - _sys_all_sessions_descr=( "self:alias for the current session" ) + _sys_all_sessions=( "self" ) + _sys_all_sessions_descr=( "self:alias for the current session" ) _loginctl_all_sessions for _ignore in $words[2,-1]; do @@ -84,8 +84,8 @@ done _loginctl_seats() { local -a _sys_all_seats{,_descr} - _sys_all_seats=( "self" ) - _sys_all_seats_descr=( "self:alias for the current seat" ) + _sys_all_seats=( "self" ) + _sys_all_seats_descr=( "self:alias for the current seat" ) _loginctl_all_seats for _ignore in $words[2,-1]; do diff --git a/shell-completion/zsh/_resolvectl b/shell-completion/zsh/_resolvectl index c779f73ff38..2917138fff3 100644 --- a/shell-completion/zsh/_resolvectl +++ b/shell-completion/zsh/_resolvectl @@ -39,36 +39,36 @@ (( $+functions[_resolvectl_commands] )) || _resolvectl_commands() { - local -a _resolvectl_cmds - _resolvectl_cmds=( - default-route:"Configure per-interface default-route setting" - dns:"Configure per-interface DNS configuration" - dnsovertls:"Configure per-interface dnsovertls enabled status" - dnssec:"Configure per-interface dnssec enabled status" - domain:"Configure per-interface search and route-only domains" - flush-caches:"Flushes all DNS resource record caches the service maintains locally" - llmnr:"Configure per-interface llmnr enabled status" - log-level:"Get/set logging threshold for systemd-resolved" - mdns:"Configure per-interface mdns enabled status" - monitor:"Monitor DNS queries" - nta:"Configure per-interface nta domains" - openpgp:"Retrieve openpgp keys for an email" - query:"Resolve domain names, IPv4 and IPv6 addresses" - reset-server-features:"Flushes all feature level information the resolver has learned about specific servers" - reset-statistics:"Resets the statistics counter shown in statistics to zero" - revert:"Revert the per-interfce DNS configuration" - service:"Resolve DNS-SD and SRV services" - show-cache:"Show the current cache contents" - show-server-state:"Show servers state" - statistics:"Show resolver statistics" - status:"Show the global and per-link DNS settings currently in effect" - tlsa:"Query tlsa public keys stored as TLSA resource records" - ) + local -a _resolvectl_cmds + _resolvectl_cmds=( + default-route:"Configure per-interface default-route setting" + dns:"Configure per-interface DNS configuration" + dnsovertls:"Configure per-interface dnsovertls enabled status" + dnssec:"Configure per-interface dnssec enabled status" + domain:"Configure per-interface search and route-only domains" + flush-caches:"Flushes all DNS resource record caches the service maintains locally" + llmnr:"Configure per-interface llmnr enabled status" + log-level:"Get/set logging threshold for systemd-resolved" + mdns:"Configure per-interface mdns enabled status" + monitor:"Monitor DNS queries" + nta:"Configure per-interface nta domains" + openpgp:"Retrieve openpgp keys for an email" + query:"Resolve domain names, IPv4 and IPv6 addresses" + reset-server-features:"Flushes all feature level information the resolver has learned about specific servers" + reset-statistics:"Resets the statistics counter shown in statistics to zero" + revert:"Revert the per-interfce DNS configuration" + service:"Resolve DNS-SD and SRV services" + show-cache:"Show the current cache contents" + show-server-state:"Show servers state" + statistics:"Show resolver statistics" + status:"Show the global and per-link DNS settings currently in effect" + tlsa:"Query tlsa public keys stored as TLSA resource records" + ) - if (( CURRENT == 1 )); then - _describe -t commands 'resolvectl commands' _resolvectl_cmds - fi -} + if (( CURRENT == 1 )); then + _describe -t commands 'resolvectl commands' _resolvectl_cmds + fi + } _arguments \ '(- *)'{-h,--help}'[Print a short help text and exit]' \ diff --git a/shell-completion/zsh/_run0 b/shell-completion/zsh/_run0 index b354462c815..5998f410163 100644 --- a/shell-completion/zsh/_run0 +++ b/shell-completion/zsh/_run0 @@ -2,56 +2,56 @@ (( $+functions[_run0_unit_properties] )) || _run0_unit_properties() { - local -a props=( - BlockIOAccounting BlockIODeviceWeight BlockIOReadBandwidth - BlockIOWeight BlockIOWriteBandwidth CPUAccounting - CPUShares DeviceAllow DevicePolicy - Environment EnvironmentFile ExitType - FinalKillSignal Group InaccessiblePaths - KillMode KillSignal LimitAS - LimitCORE LimitCPU LimitDATA - LimitFSIZE LimitLOCKS LimitMEMLOCK - LimitMSGQUEUE LimitNICE LimitNOFILE - LimitNPROC LimitRSS LimitRTPRIO - LimitRTTIME LimitSIGPENDING LimitSTACK - MemoryAccounting MemoryLimit Nice - NoNewPrivileges OOMScoreAdjust PassEnvironment - PrivateDevices PrivateNetwork PrivateTmp - ProtectHome ProtectSystem ReadOnlyPaths - ReadWritePaths RestartKillSignal RootDirectory - RuntimeDirectory SendSIGHUP SendSIGKILL - SyslogFacility SyslogIdentifier SyslogLevel - SyslogLevelPrefix TTYPath TimerSlackNSec - User WorkingDirectory - ) - _values -S= 'properties' ${^props}'::()' + local -a props=( + BlockIOAccounting BlockIODeviceWeight BlockIOReadBandwidth + BlockIOWeight BlockIOWriteBandwidth CPUAccounting + CPUShares DeviceAllow DevicePolicy + Environment EnvironmentFile ExitType + FinalKillSignal Group InaccessiblePaths + KillMode KillSignal LimitAS + LimitCORE LimitCPU LimitDATA + LimitFSIZE LimitLOCKS LimitMEMLOCK + LimitMSGQUEUE LimitNICE LimitNOFILE + LimitNPROC LimitRSS LimitRTPRIO + LimitRTTIME LimitSIGPENDING LimitSTACK + MemoryAccounting MemoryLimit Nice + NoNewPrivileges OOMScoreAdjust PassEnvironment + PrivateDevices PrivateNetwork PrivateTmp + ProtectHome ProtectSystem ReadOnlyPaths + ReadWritePaths RestartKillSignal RootDirectory + RuntimeDirectory SendSIGHUP SendSIGKILL + SyslogFacility SyslogIdentifier SyslogLevel + SyslogLevelPrefix TTYPath TimerSlackNSec + User WorkingDirectory + ) + _values -S= 'properties' ${^props}'::()' } (( $+functions[_run0_slices] )) || _run0_slices() { - local -a slices=( - ${(@f)"$(_call_program slice-units systemctl --no-pager --legend=no --plain list-units --all -t slice 2>/dev/null)"} - ) - slices=( ${slices%% *} ) - _describe -t slice-units 'slice unit' slices + local -a slices=( + ${(@f)"$(_call_program slice-units systemctl --no-pager --legend=no --plain list-units --all -t slice 2>/dev/null)"} + ) + slices=( ${slices%% *} ) + _describe -t slice-units 'slice unit' slices } local -a args=( - '--no-ask-password[Do not query the user for authentication]' - '--unit=[Use this unit name instead of an automatically generated one]' - {--property=,-p+}'[Sets a property on the service unit created]:property:_run0_unit_properties' - '--description=[Provide a description for the service unit]' - '--slice=[Make the new .service unit part of the specified slice]:slice unit:_run0_slices' - '--slice-inherit[Make the new service unit part of the current slice]' - {--user=,-u+}'[Switch to the specified user]:user:_users' - {--group=,-g+}'[Switch to the specified group]:group:_groups' - '--nice=[Run with specified nice level]:nice value' - {--chdir=,-D+}'[Run within the specified working directory]:directory:_files -/' - '--setenv=[Set the specified environment variable in the session]:environment variable:_parameters -g "*export*" -S = -q' - '--background=[Change the terminal background color to the specified ANSI color]:ansi color' - '--machine=[Execute the operation on a local container]:machine:_sd_machines' - {-h,--help}'[Show the help text and exit]' - '--version[Print a short version string and exit]' + '--no-ask-password[Do not query the user for authentication]' + '--unit=[Use this unit name instead of an automatically generated one]' + {--property=,-p+}'[Sets a property on the service unit created]:property:_run0_unit_properties' + '--description=[Provide a description for the service unit]' + '--slice=[Make the new .service unit part of the specified slice]:slice unit:_run0_slices' + '--slice-inherit[Make the new service unit part of the current slice]' + {--user=,-u+}'[Switch to the specified user]:user:_users' + {--group=,-g+}'[Switch to the specified group]:group:_groups' + '--nice=[Run with specified nice level]:nice value' + {--chdir=,-D+}'[Run within the specified working directory]:directory:_files -/' + '--setenv=[Set the specified environment variable in the session]:environment variable:_parameters -g "*export*" -S = -q' + '--background=[Change the terminal background color to the specified ANSI color]:ansi color' + '--machine=[Execute the operation on a local container]:machine:_sd_machines' + {-h,--help}'[Show the help text and exit]' + '--version[Print a short version string and exit]' ) _arguments -S $args '*:: :{_normal -p $service}' diff --git a/shell-completion/zsh/_sd_machines b/shell-completion/zsh/_sd_machines index b960745f0d4..6946f6faa20 100644 --- a/shell-completion/zsh/_sd_machines +++ b/shell-completion/zsh/_sd_machines @@ -3,10 +3,9 @@ (( $+functions[__sd_machines_get_machines] )) || __sd_machines_get_machines () { - - { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ - { while read a b; do echo "$a"; done; } | \ - sort -u + { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } | \ + { while read a b; do echo "$a"; done; } | \ + sort -u } local -a _machines diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 16e43d0f12e..bfd09fa7bf6 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -473,9 +473,9 @@ done (( $+functions[_systemctl_unit_properties] )) || _systemctl_unit_properties() { - local -a _sys_all_properties=( ${(f)"$({{LIBEXECDIR}}/systemd --no-pager --dump-bus-properties 2>/dev/null)"} ) + local -a _sys_all_properties=( ${(f)"$({{LIBEXECDIR}}/systemd --no-pager --dump-bus-properties 2>/dev/null)"} ) _wanted systemd-unit-properties expl 'unit property' \ - _values -s , "${_sys_all_properties[@]}" + _values -s , "${_sys_all_properties[@]}" } (( $+functions[_systemctl_job_modes] )) || diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd index eab7e0efdf7..4d9ec7f0323 100644 --- a/shell-completion/zsh/_systemd +++ b/shell-completion/zsh/_systemd @@ -34,7 +34,7 @@ case "$service" in systemd-cgtop) _arguments \ '(-)'{-h,--help}'[Show this help]' \ - '(-)--version[Print version and exit]' \ + '(-)--version[Print version and exit]' \ '(-c -m -i -t)-p[Order by path]' \ '(-c -p -m -i)-t[Order by number of tasks]' \ '(-m -p -i -t)-c[Order by CPU load]' \ @@ -48,7 +48,7 @@ case "$service" in systemd-detect-virt) _arguments \ '(-)'{-h,--help}'[Show this help]' \ - '(-)--version[Show package version]' \ + '(-)--version[Show package version]' \ '(-c --container)'{-c,--container}'[Only detect whether we are run in a container]' \ '(-v --vm)'{-v,--vm}'[Only detect whether we are run in a VM]' \ '(-q --quiet)'{-q,--quiet}"[Don't output anything, just set return value]" @@ -56,12 +56,12 @@ case "$service" in systemd-machine-id-setup) _arguments \ '(-)'{-h,--help}'[Show this help]' \ - '(-)--version[Show package version]' + '(-)--version[Show package version]' ;; systemd-notify) _arguments \ '(-)'{-h,--help}'[Show this help]' \ - '(-)--version[Show package version]' \ + '(-)--version[Show package version]' \ '--ready[Inform the init system about service start-up completion.]' \ '--pid=[Inform the init system about the main PID of the daemon]:daemon main PID:_pids' \ '--status=[Send a free-form status string for the daemon to the init systemd]:status string:' \ @@ -70,8 +70,8 @@ case "$service" in systemd-tty-ask-password-agent) _arguments \ '(-)'{-h,--help}'[Prints a short help text and exits.]' \ - '(-)--version[Prints a short version string and exits.]' \ - '--list[Lists all currently pending system password requests.]' \ + '(-)--version[Prints a short version string and exits.]' \ + '--list[Lists all currently pending system password requests.]' \ '--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \ '--watch[Continuously process password requests.]' \ '--wall[Forward password requests to wall(1).]' \ diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index ea84e5dc6f0..39984440ea8 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -7,7 +7,7 @@ } (( $+functions[_systemd-analyze_cat-config] )) || - _systemd-analyze_cat-config() { + _systemd-analyze_cat-config() { _files -W '(/run/systemd/ /etc/systemd/ /usr/lib/systemd/)' -P 'systemd/' } diff --git a/shell-completion/zsh/_systemd-path b/shell-completion/zsh/_systemd-path index 58e46a2b67c..35d2298275d 100644 --- a/shell-completion/zsh/_systemd-path +++ b/shell-completion/zsh/_systemd-path @@ -3,7 +3,7 @@ typeset -A sdpath=( ${$(systemd-path)/:/} ) _arguments -S \ - '(- *)'{-h,--help}'[Print help text and exit]' \ - '(- *)'{-v,--version}'[Print a version string and exit]' \ - '--suffix=[Append a suffix to the paths]:SUFFIX' \ - '*:pathname:compadd -k sdpath' + '(- *)'{-h,--help}'[Print help text and exit]' \ + '(- *)'{-v,--version}'[Print a version string and exit]' \ + '--suffix=[Append a suffix to the paths]:SUFFIX' \ + '*:pathname:compadd -k sdpath' diff --git a/shell-completion/zsh/_udevadm b/shell-completion/zsh/_udevadm index 6483e948b6a..7e717d30a3e 100644 --- a/shell-completion/zsh/_udevadm +++ b/shell-completion/zsh/_udevadm @@ -50,10 +50,10 @@ _udevadm_trigger(){ (( $+functions[_udevadm_settle] )) || _udevadm_settle(){ _arguments \ - '(-)'{-h,--help}'[Print help]' \ - '(-)'{-V,--version}'[Print version of the program]' \ - '(-t --timeout)'{-t,--timeout=}'[Maximum number of seconds to wait for the event queue to become empty.]:SEC' \ - '(-E --exit-if-exists)'{-E,--exit-if-exists=}'[Stop waiting if file exists.]:files:_files' + '(-)'{-h,--help}'[Print help]' \ + '(-)'{-V,--version}'[Print version of the program]' \ + '(-t --timeout)'{-t,--timeout=}'[Maximum number of seconds to wait for the event queue to become empty.]:SEC' \ + '(-E --exit-if-exists)'{-E,--exit-if-exists=}'[Stop waiting if file exists.]:files:_files' } (( $+functions[_udevadm_control] )) || @@ -92,7 +92,7 @@ _udevadm_test(){ '(-)'{-V,--version}'[Show package version]' \ '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ '(-N --resolve-names)'{-N,--resolve-names=}'[When to resolve names.]:resolve:(early late never)' \ - '--subsystem=[The subsystem string.]' \ + '--subsystem=[The subsystem string.]' \ '(-D --extra-rules-dir=)'{-D,--extra-rules-dir=}'[Also load rules from the directory.]' \ '(-v --verbose)'{-v,--verbose}'[Show verbose logs.]' \ '--json=[Generate JSON output]:MODE:(pretty short off)' \ @@ -102,11 +102,11 @@ _udevadm_test(){ (( $+functions[_udevadm_test-builtin] )) || _udevadm_test-builtin(){ if (( CURRENT == 2 )); then - _arguments \ - '(- *)'{-h,--help}'[Print help]' \ - '(- *)'{-V,--version}'[Print version of the program]' \ - '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ - '*::builtins:(blkid btrfs dissect_image factory_reset hwdb input_id keyboard kmod net_driver net_id net_setup_link path_id uaccess usb_id)' + _arguments \ + '(- *)'{-h,--help}'[Print help]' \ + '(- *)'{-V,--version}'[Print version of the program]' \ + '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ + '*::builtins:(blkid btrfs dissect_image factory_reset hwdb input_id keyboard kmod net_driver net_id net_setup_link path_id uaccess usb_id)' elif (( CURRENT == 3 )); then _arguments \ '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \ diff --git a/shell-completion/zsh/_varlinkctl b/shell-completion/zsh/_varlinkctl index c904ebd711e..f33eea24b60 100644 --- a/shell-completion/zsh/_varlinkctl +++ b/shell-completion/zsh/_varlinkctl @@ -4,67 +4,67 @@ local -a reply line _varlinkctl_interfaces() { - compadd "$@" -- \ - "${(@f)$(_call_program varlink-interfaces varlinkctl list-interfaces $line[2])}" + compadd "$@" -- \ + "${(@f)$(_call_program varlink-interfaces varlinkctl list-interfaces $line[2])}" } _varlinkctl_methods() { - compadd "$@" -- \ - "${(@f)$(_call_program varlink-methods varlinkctl list-methods $line[2])}" + compadd "$@" -- \ + "${(@f)$(_call_program varlink-methods varlinkctl list-methods $line[2])}" } local -a varlink_addr=( - /$'[^\0]#\0'/ ':varlink-addresses:varlink address:_files -g "*(=)"' + /$'[^\0]#\0'/ ':varlink-addresses:varlink address:_files -g "*(=)"' ) local -a varlink_interface=( - $varlink_addr - /$'[^\0]#\0'/ ':varlink-interfaces:varlink interface:_varlinkctl_interfaces' + $varlink_addr + /$'[^\0]#\0'/ ':varlink-interfaces:varlink interface:_varlinkctl_interfaces' ) local -a varlink_method=( - $varlink_addr - /$'[^\0]#\0'/ ':varlink-methods:varlink method:_varlinkctl_methods' + $varlink_addr + /$'[^\0]#\0'/ ':varlink-methods:varlink method:_varlinkctl_methods' ) local -a varlink_call=($varlink_method /$'[^\0]#\0'/ ':argument:argument:()') local -a varlink_idl=(/$'[^\0]#\0'/ ':varlink-idl-file:idl file:_files') _regex_words varlink-commands 'varlink command' \ - 'info:show service information:$varlink_addr' \ - 'list-interfaces:List interfaces implemented by a service:$varlink_addr' \ - 'list-methods:List methods implemented by an interface:$varlink_interface' \ - 'introspect:show an interface definition:$varlink_interface' \ - 'call:invoke a method:$varlink_call' \ - 'validate-idl:validate an interface description:$varlink_idl' \ - 'help:show a help message' + 'info:show service information:$varlink_addr' \ + 'list-interfaces:List interfaces implemented by a service:$varlink_addr' \ + 'list-methods:List methods implemented by an interface:$varlink_interface' \ + 'introspect:show an interface definition:$varlink_interface' \ + 'call:invoke a method:$varlink_call' \ + 'validate-idl:validate an interface description:$varlink_idl' \ + 'help:show a help message' local -a varlinkcmd=( /$'[^\0]#\0'/ "$reply[@]" ) _regex_arguments _varlinkctl_cmd "$varlinkcmd[@]" _varlinkctl_command() { - local varlink_command=varlinkctl - ((CURRENT > 2 )) && varlink_command=varlinkctl-$line[1] + local varlink_command=varlinkctl + ((CURRENT > 2 )) && varlink_command=varlinkctl-$line[1] - local -a varlink_args - case "$line[1]" in - (info|list-interfaces) - varlink_args=(address) ;; - (introspect|list-methods) - varlink_args=(address interface) ;; - (call) - varlink_args=(address method arguments) ;; - (validate-idl) - varlink_args=(file) ;; - esac + local -a varlink_args + case "$line[1]" in + (info|list-interfaces) + varlink_args=(address) ;; + (introspect|list-methods) + varlink_args=(address interface) ;; + (call) + varlink_args=(address method arguments) ;; + (validate-idl) + varlink_args=(file) ;; + esac - curcontext="${curcontext%:*:*}:$varlink_command:$varlink_args[CURRENT-2]" - _varlinkctl_cmd "$@" + curcontext="${curcontext%:*:*}:$varlink_command:$varlink_args[CURRENT-2]" + _varlinkctl_cmd "$@" } local -a opts=( - {-h,--help}'[Show a help message and exit]' - '--version[Show package version and exit]' - '--no-pager[Do not pipe output to a pager]' - '--more[Request multiple responses]' - '--collect[Collect multiple responses in a JSON array]' - {-j+,--json=}'[Output as json]:json-mode:(pretty short)' + {-h,--help}'[Show a help message and exit]' + '--version[Show package version and exit]' + '--no-pager[Do not pipe output to a pager]' + '--more[Request multiple responses]' + '--collect[Collect multiple responses in a JSON array]' + {-j+,--json=}'[Output as json]:json-mode:(pretty short)' ) _arguments -S $opts '*:: := _varlinkctl_command'