From: Eisuke Kawashima Date: Mon, 14 Jul 2025 10:00:31 +0000 (+0900) Subject: style(shell-completion): remove trailing semicolons X-Git-Tag: v258-rc1~57^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5300aa7a1d61b54566f0c583d149d3ed2aa1cab9;p=thirdparty%2Fsystemd.git style(shell-completion): remove trailing semicolons --- diff --git a/shell-completion/bash/bootctl b/shell-completion/bash/bootctl index 49b013176d7..90c7cccb346 100644 --- a/shell-completion/bash/bootctl +++ b/shell-completion/bash/bootctl @@ -94,7 +94,7 @@ _bootctl() { if ! __contains_word "${COMP_WORDS[i]}" ${OPTS[*]} ${VERBS[*]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then name=${COMP_WORDS[i]} - break; + break fi done diff --git a/shell-completion/bash/busctl b/shell-completion/bash/busctl index 97f08f0ab04..06eb29ac5f0 100644 --- a/shell-completion/bash/busctl +++ b/shell-completion/bash/busctl @@ -35,7 +35,7 @@ __get_busnames() { local mode=$1 local a b busctl $mode list --no-legend --no-pager --full 2>/dev/null | - { while read a b; do echo " $a"; done; }; + { while read a b; do echo " $a"; done; } } __get_objects() { @@ -43,7 +43,7 @@ __get_objects() { local busname=$2 local a b busctl $mode tree --list --no-legend --no-pager $busname 2>/dev/null | - { while read a b; do echo " $a"; done; }; + { while read a b; do echo " $a"; done; } } __get_interfaces() { @@ -52,7 +52,7 @@ __get_interfaces() { local path=$3 local a b c busctl $mode introspect --list --no-legend --no-pager $busname $path 2>/dev/null | - { while read a b c; do [[ "$b" == "interface" ]] && echo " $a"; done; }; + { while read a b c; do [[ "$b" == "interface" ]] && echo " $a"; done; } } __get_members() { @@ -65,7 +65,7 @@ __get_members() { local a b c d e busctl $mode introspect --list --no-legend --no-pager $busname $path $interface 2>/dev/null | sed -e 's/^\.//' | - { while read a b c d e; do [[ "$b" == "$type" && ( -z $flags || "$e" == "$flags" ) ]] && echo " $a"; done; }; + { while read a b c d e; do [[ "$b" == "$type" && ( -z $flags || "$e" == "$flags" ) ]] && echo " $a"; done; } } __get_signature() { @@ -76,7 +76,7 @@ __get_signature() { local member=$5 local a b c d busctl $mode introspect --list --no-legend --no-pager $busname $path $interface 2>/dev/null | - sed -e 's/^\.//' | { while read a b c d; do [[ "$a" == "$member" && "$c" != '-' ]] && echo " \"$c\""; done; }; + sed -e 's/^\.//' | { while read a b c d; do [[ "$a" == "$member" && "$c" != '-' ]] && echo " \"$c\""; done; } } _busctl() { diff --git a/shell-completion/bash/homectl b/shell-completion/bash/homectl index 2fed45403ff..6d7e23ef718 100644 --- a/shell-completion/bash/homectl +++ b/shell-completion/bash/homectl @@ -27,7 +27,7 @@ __contains_word () { __get_machines() { local a b machinectl list --full --no-legend --no-pager 2>/dev/null | - { while read a b; do echo " $a"; done; }; + { while read a b; do echo " $a"; done; } } __get_homes() { diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl index d8256a9fed4..8d1922eb2e0 100644 --- a/shell-completion/bash/hostnamectl +++ b/shell-completion/bash/hostnamectl @@ -29,7 +29,7 @@ __contains_word () { __get_machines() { local a b machinectl list --full --no-legend --no-pager 2>/dev/null | - { while read a b; do echo " $a"; done; }; + { while read a b; do echo " $a"; done; } } _hostnamectl() { diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl index 762faf6f4da..1892e6f5f54 100644 --- a/shell-completion/bash/journalctl +++ b/shell-completion/bash/journalctl @@ -61,7 +61,7 @@ _journalctl() { if __contains_word "$prev" '>' '>>' '&>'; then compopt -o filenames COMPREPLY=( $(compgen -f -- "$cur") ) - return 0; + return 0 fi if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then diff --git a/shell-completion/bash/networkctl b/shell-completion/bash/networkctl index 04f54e0e928..41f1b573cc9 100644 --- a/shell-completion/bash/networkctl +++ b/shell-completion/bash/networkctl @@ -26,7 +26,7 @@ __contains_word () { } __get_links() { - networkctl list --no-legend --no-pager --all --full | { while read -r a b c; do echo " $b"; done; }; + networkctl list --no-legend --no-pager --all --full | { while read -r a b c; do echo " $b"; done; } } __get_links_with_prefix() { diff --git a/shell-completion/bash/resolvectl b/shell-completion/bash/resolvectl index 5f2102ccbaa..b561a72301a 100644 --- a/shell-completion/bash/resolvectl +++ b/shell-completion/bash/resolvectl @@ -107,7 +107,7 @@ _resolvectl() { if __contains_word "${COMP_WORDS[i]}" ${ARGS[FAMILY]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then name=${COMP_WORDS[i]} - break; + break fi done if [[ -z $name ]]; then @@ -122,7 +122,7 @@ _resolvectl() { if __contains_word "${COMP_WORDS[i]}" $interfaces && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then name=${COMP_WORDS[i]} - break; + break fi done @@ -135,7 +135,7 @@ _resolvectl() { if __contains_word "${COMP_WORDS[i]}" ${ARGS[RESOLVE]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then name=${COMP_WORDS[i]} - break; + break fi done @@ -151,7 +151,7 @@ _resolvectl() { if __contains_word "${COMP_WORDS[i]}" ${ARGS[BOOLEAN]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then name=${COMP_WORDS[i]} - break; + break fi done @@ -167,7 +167,7 @@ _resolvectl() { if __contains_word "${COMP_WORDS[i]}" ${ARGS[DNSSEC]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then name=${COMP_WORDS[i]} - break; + break fi done @@ -183,7 +183,7 @@ _resolvectl() { if __contains_word "${COMP_WORDS[i]}" ${ARGS[DNSOVERTLS]} && ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then name=${COMP_WORDS[i]} - break; + break fi done diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in index c1231653b6f..1e01521adc3 100644 --- a/shell-completion/bash/systemctl.in +++ b/shell-completion/bash/systemctl.in @@ -291,13 +291,13 @@ _systemctl () { compopt -o filenames elif __contains_word "$verb" ${VERBS[DISABLED_UNITS]}; then - comps=$( __get_disabled_units $mode "$cur"; + comps=$( __get_disabled_units $mode "$cur" __get_template_names $mode "$cur") compopt -o filenames elif __contains_word "$verb" ${VERBS[REENABLABLE_UNITS]}; then - comps=$( __get_disabled_units $mode "$cur"; - __get_enabled_units $mode "$cur"; + comps=$( __get_disabled_units $mode "$cur" + __get_enabled_units $mode "$cur" __get_template_names $mode "$cur") compopt -o filenames diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index 060bc51d810..d9c2ccd376c 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -163,7 +163,7 @@ _systemd_analyze() { if [[ $cur = -* ]]; then comps='--help --version --system --user --global --man=no --generators=yes --root --image --recursive-errors=no --recursive-errors=yes --recursive-errors=one' else - comps=$( compgen -A file -- "$cur"; + comps=$( compgen -A file -- "$cur" __get_units_all $mode ) compopt -o filenames fi diff --git a/shell-completion/bash/systemd-cgls b/shell-completion/bash/systemd-cgls index b466a9d8820..76f3ee3ab72 100644 --- a/shell-completion/bash/systemd-cgls +++ b/shell-completion/bash/systemd-cgls @@ -36,7 +36,7 @@ __get_units_have_cgroup() { while read -r a b c d; do [[ $c == "active" && ${a##*.} =~ (service|socket|mount|swap|slice|scope) ]] && echo " $a" done - }; + } } _systemd_cgls() { diff --git a/shell-completion/bash/systemd-nspawn b/shell-completion/bash/systemd-nspawn index 070d842b18c..cff13b9e824 100644 --- a/shell-completion/bash/systemd-nspawn +++ b/shell-completion/bash/systemd-nspawn @@ -26,12 +26,12 @@ __contains_word() { __get_users() { local a b - loginctl list-users --no-legend --no-pager | { while read a b; do echo " $b"; done; }; + loginctl list-users --no-legend --no-pager | { while read a b; do echo " $b"; done; } } __get_slices() { local a b - systemctl list-units -t slice --no-legend --no-pager --plain | { while read a b; do echo " $a"; done; }; + systemctl list-units -t slice --no-legend --no-pager --plain | { while read a b; do echo " $a"; done; } } __get_machines() { @@ -43,7 +43,7 @@ __get_machines() { __get_env() { local a - env | { while read a; do echo " ${a%%=*}"; done; }; + env | { while read a; do echo " ${a%%=*}"; done; } } __get_interfaces(){ diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index bfd09fa7bf6..e811803d208 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -162,7 +162,7 @@ __systemctl() (( $+functions[_systemctl_all_units] )) || _systemctl_all_units() { - if _cache_invalid SYS_ALL_UNITS$_sys_service_mgr || ! _retrieve_cache SYS_ALL_UNITS$_sys_service_mgr; + if _cache_invalid SYS_ALL_UNITS$_sys_service_mgr || ! _retrieve_cache SYS_ALL_UNITS$_sys_service_mgr then _sys_all_units=( ${${(f)"$(__systemctl list-units --all)"}%% *} ) _store_cache SYS_ALL_UNITS$_sys_service_mgr _sys_all_units @@ -173,9 +173,9 @@ __systemctl() (( $+functions[_systemctl_really_all_units] )) || _systemctl_really_all_units() { - local -a all_unit_files; - local -a really_all_units; - if _cache_invalid SYS_REALLY_ALL_UNITS$_sys_service_mgr || ! _retrieve_cache SYS_REALLY_ALL_UNITS$_sys_service_mgr; + local -a all_unit_files + local -a really_all_units + if _cache_invalid SYS_REALLY_ALL_UNITS$_sys_service_mgr || ! _retrieve_cache SYS_REALLY_ALL_UNITS$_sys_service_mgr then all_unit_files=( ${${(f)"$(__systemctl list-unit-files)"}%% *} ) _systemctl_all_units diff --git a/shell-completion/zsh/_systemd-run b/shell-completion/zsh/_systemd-run index 6e284556f06..af867764380 100644 --- a/shell-completion/zsh/_systemd-run +++ b/shell-completion/zsh/_systemd-run @@ -11,7 +11,7 @@ __systemctl() { (( $+functions[__systemd-run_get_slices] )) || __systemd-run_get_slices () { __systemctl list-units --all -t slice \ - | { while read -r a b; do echo $a; done; }; + | { while read -r a b; do echo $a; done; } } (( $+functions[__systemd-run_slices] )) ||