style(shell-completion): expand hard tabs and fix indentation

This commit is contained in:
Eisuke Kawashima
2025-07-14 20:24:25 +09:00
parent 2da41c4b51
commit dfe6b3fa38
26 changed files with 170 additions and 171 deletions
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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
}
+4 -4
View File
@@ -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
}