mirror of
https://github.com/systemd/systemd.git
synced 2025-10-21 15:33:40 +03:00
style(shell-completion): remove trailing semicolons
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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() {
|
||||
|
@@ -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() {
|
||||
|
@@ -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() {
|
||||
|
@@ -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
|
||||
|
@@ -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() {
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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() {
|
||||
|
@@ -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(){
|
||||
|
Reference in New Issue
Block a user