]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
style(shell-completion): remove unnecessary backslashes
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>
Mon, 14 Jul 2025 07:01:38 +0000 (16:01 +0900)
committerEisuke Kawashima <e-kwsm@users.noreply.github.com>
Mon, 14 Jul 2025 11:24:25 +0000 (20:24 +0900)
20 files changed:
shell-completion/bash/busctl
shell-completion/bash/importctl
shell-completion/bash/journalctl
shell-completion/bash/loginctl
shell-completion/bash/machinectl
shell-completion/bash/portablectl
shell-completion/bash/run0
shell-completion/bash/systemctl.in
shell-completion/bash/systemd-analyze
shell-completion/bash/systemd-cgls
shell-completion/bash/systemd-cgtop
shell-completion/bash/systemd-creds
shell-completion/bash/systemd-nspawn
shell-completion/bash/systemd-run
shell-completion/bash/timedatectl
shell-completion/bash/udevadm
shell-completion/zsh/_localectl
shell-completion/zsh/_sd_machines
shell-completion/zsh/_systemctl.in
shell-completion/zsh/_systemd-run

index 06eb29ac5f045a356f8357e532c61fe35c944a0c..4527b5bdbe8b0274fd75447216b6f4ffccf52373 100644 (file)
@@ -26,8 +26,8 @@ __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; } | \
+    { 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
 }
 
index 6b9316b7acdde4ac8b9f99e09dda9efe18c066af..0eed6defd8dc0c26de2fd01d09a0e8b85a420eec 100644 (file)
@@ -26,8 +26,8 @@ __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; } | \
+    { 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; } |
         sort -u
 }
 
index 1892e6f5f54a6025017ce775ce41dc9892abfea0..2c4ffffe07e947f6dc012f4e6b7fbd4653d22e9d 100644 (file)
@@ -28,8 +28,8 @@ __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; } | \
+    { 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
 }
 
index 7351212e0f6e08404e72728dd9f1b0cd57a99ed1..9085d2dd5f5c2a75a9c68c1a05f83f86a3d40bca 100644 (file)
@@ -32,8 +32,8 @@ __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; } | \
+    { 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
 }
 
index d772bc6b0bb079cf076e1fd0058f3ca2e8727328..7e83736114153fd845baa50ed9d35234953c2dd9 100644 (file)
@@ -26,8 +26,8 @@ __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; } | \
+    { 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; } |
         sort -u
 }
 
index 77a499593da487a5779e9059190d026c66b45c65..87c4a5ee4f7c469d11958d747c950bbb88c88cf2 100644 (file)
@@ -26,8 +26,8 @@ __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; } | \
+    { 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
 }
 
index 86253b826ae28f4572f704c1ff7d2b8ff0eaf1a1..80300cd9ab1e7fc5badd3fb3cdf88ac5b0afdbe8 100644 (file)
@@ -21,13 +21,13 @@ __systemctl() {
     systemctl --system --full --no-legend --no-pager --plain "$@"
 }
 
-__get_slice_units () { __systemctl list-units --all -t slice \
-                           { while read -r a b c d; do echo " $a"; done; }; }
+__get_slice_units () { __systemctl list-units --all -t slice |
+                           { while read -r a b c d; do echo " $a"; done; }; }
 
 __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; } | \
+    { 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
 }
 
index 1e01521adc38697adbb9f2c3016f41251f6f4a20..7bc5ddb87721214702448c1f11fc1d8de4f8698c 100644 (file)
@@ -55,20 +55,20 @@ __filter_units_by_properties () {
 }
 {% endraw %}
 
-__get_all_units      () { { __systemctl $1 list-unit-files "$2*"; __systemctl $1 list-units --all "$2*"; } \
-                              { while read -r a b; do echo " $a"; done; }; }
-__get_non_template_units() { { __systemctl $1 list-unit-files "$2*"; __systemctl $1 list-units --all "$2*"; } \
-                                 { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }; }
-__get_template_names () { __systemctl $1 list-unit-files "$2*" \
-                              { while read -r a b; do [[ $a =~ @\. ]] && echo " ${a%%@.*}@"; done; }; }
-__get_active_units   () { __systemctl $1 list-units "$2*"      \
-                              { while read -r a b; do echo " $a"; done; }; }
-__get_active_services() { __systemctl $1 list-units "$2*.service" \
-                              { while read -r a b; do echo " $a"; done; }; }
+__get_all_units      () { { __systemctl $1 list-unit-files "$2*"; __systemctl $1 list-units --all "$2*"; } |
+                              { while read -r a b; do echo " $a"; done; }; }
+__get_non_template_units() { { __systemctl $1 list-unit-files "$2*"; __systemctl $1 list-units --all "$2*"; } |
+                                 { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }; }
+__get_template_names () { __systemctl $1 list-unit-files "$2*" |
+                              { while read -r a b; do [[ $a =~ @\. ]] && echo " ${a%%@.*}@"; done; }; }
+__get_active_units   () { __systemctl $1 list-units "$2*" |
+                              { while read -r a b; do echo " $a"; done; }; }
+__get_active_services() { __systemctl $1 list-units "$2*.service" |
+                              { while read -r a b; do echo " $a"; done; }; }
 
 __get_not_masked_unit_files() {
     # filter out masked, not-found, or template units.
-    __systemctl $1 list-unit-files --state enabled,enabled-runtime,linked,linked-runtime,static,indirect,disabled,generated,transient "$2*" | \
+    __systemctl $1 list-unit-files --state enabled,enabled-runtime,linked,linked-runtime,static,indirect,disabled,generated,transient "$2*" |
         { while read -r a b; do [[ $a =~ @\. ]] || echo " $a"; done; }
 }
 
@@ -76,7 +76,7 @@ __get_startable_units () {
     __filter_units_by_properties $1 ActiveState=inactive,CanStart=yes $(
         { __get_not_masked_unit_files $1 $2
           # get inactive template units
-          __systemctl $1 list-units --state inactive,failed "$2*" | \
+          __systemctl $1 list-units --state inactive,failed "$2*" |
               { while read -r a b c; do [[ $b == "loaded" ]] && echo " $a"; done; }
         } | sort -u )
 }
@@ -107,14 +107,14 @@ __get_reloadable_units () {
         } | sort -u )
 }
 
-__get_failed_units()   { __systemctl $1 list-units "$2*"      \
-                              while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }
-__get_enabled_units()  { __systemctl $1 list-unit-files "$2*" \
-                              while read -r a b c  ; do [[ $b == "enabled" ]] && echo " $a"; done; }
-__get_disabled_units() { __systemctl $1 list-unit-files "$2*" \
-                              while read -r a b c  ; do [[ $b == "disabled" ]] && echo " $a"; done; }
-__get_masked_units()   { __systemctl $1 list-unit-files "$2*" \
-                              while read -r a b c  ; do [[ $b == "masked" ]] && echo " $a"; done; }
+__get_failed_units()   { __systemctl $1 list-units "$2*"      |
+                              while read -r a b c d; do [[ $c == "failed" ]] && echo " $a"; done; }
+__get_enabled_units()  { __systemctl $1 list-unit-files "$2*" |
+                              while read -r a b c  ; do [[ $b == "enabled" ]] && echo " $a"; done; }
+__get_disabled_units() { __systemctl $1 list-unit-files "$2*" |
+                              while read -r a b c  ; do [[ $b == "disabled" ]] && echo " $a"; done; }
+__get_masked_units()   { __systemctl $1 list-unit-files "$2*" |
+                              while read -r a b c  ; do [[ $b == "masked" ]] && echo " $a"; done; }
 __get_all_unit_files() { __systemctl $1 list-unit-files "$2*" | while read -r a b; do echo " $a"; done; }
 
 __get_machines() {
@@ -331,10 +331,10 @@ _systemctl () {
         compopt -o filenames
 
     elif __contains_word "$verb" ${VERBS[TARGET_AND_UNITS]}; then
-        if __contains_word "$prev" ${VERBS[TARGET_AND_UNITS]} \
-                || __contains_word "$prev" ${OPTS[STANDALONE]}; then
-            comps=$( __systemctl $mode list-unit-files --type target --all "$cur*" \
-                         { while read -r a b; do echo " $a"; done; } )
+        if __contains_word "$prev" ${VERBS[TARGET_AND_UNITS]} ||
+                __contains_word "$prev" ${OPTS[STANDALONE]}; then
+            comps=$( __systemctl $mode list-unit-files --type target --all "$cur*" |
+                         { while read -r a b; do echo " $a"; done; } )
         else
             comps=$( __get_all_unit_files $mode "$cur" )
         fi
@@ -347,13 +347,13 @@ _systemctl () {
         comps=$( __systemctl $mode list-jobs | { while read -r a b; do echo " $a"; done; } )
 
     elif [ "$verb" = 'unset-environment' ]; then
-        comps=$( __systemctl $mode show-environment \
-                     while read -r line; do echo " ${line%%=*}"; done )
+        comps=$( __systemctl $mode show-environment |
+                     while read -r line; do echo " ${line%%=*}"; done )
         compopt -o nospace
 
     elif [ "$verb" = 'set-environment' ]; then
-        comps=$( __systemctl $mode show-environment \
-                     while read -r line; do echo " ${line%%=*}="; done )
+        comps=$( __systemctl $mode show-environment |
+                     while read -r line; do echo " ${line%%=*}="; done )
         compopt -o nospace
 
     elif [ "$verb" = 'import-environment' ]; then
@@ -365,8 +365,8 @@ _systemctl () {
         compopt -o filenames
 
     elif __contains_word "$verb" ${VERBS[TARGETS]}; then
-        comps=$( __systemctl $mode list-unit-files --type target --full --all "$cur*" \
-                     { while read -r a b; do echo " $a"; done; } )
+        comps=$( __systemctl $mode list-unit-files --type target --full --all "$cur*" |
+                     { while read -r a b; do echo " $a"; done; } )
     elif __contains_word "$verb" ${VERBS[LOG_LEVEL]}; then
         comps='debug info notice warning err crit alert emerg'
     elif __contains_word "$verb" ${VERBS[LOG_TARGET]}; then
index d9c2ccd376c69a71b9e1e394802a4b90311a9d99..e7844f92d9e64a6293745670fc487a6cf4e8490e 100644 (file)
@@ -28,18 +28,18 @@ __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; } | \
+    { 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
 }
 
 __get_units_all() {
-    systemctl list-units --no-legend --no-pager --plain --all $1 | \
+    systemctl list-units --no-legend --no-pager --plain --all $1 |
         { while read -r a b c; do echo " $a"; done; }
 }
 
 __get_services() {
-    systemctl list-units --no-legend --no-pager --plain -t service --all $1 | \
+    systemctl list-units --no-legend --no-pager --plain -t service --all $1 |
         { while read -r a b c; do [[ $b == "loaded" ]]; echo " $a"; done; }
 }
 
index 76f3ee3ab721d794ce75c209828da57e81c67cb6..9c0393d045e7e1e0e20617d821c917ca629fe0ad 100644 (file)
@@ -26,8 +26,8 @@ __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; } | \
+    { 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
 }
 
index cdddb066951651f535417f3d574ea63784c666a8..41381bd24c38613b217d10c7f3e741b11e9d84ad 100644 (file)
@@ -26,8 +26,8 @@ __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; } | \
+    { 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
 }
 
index 51b9db0d686a73c936422f89c065204389c29dbf..9a37a674b4d52b24a90e239eb374d9c338d73805 100644 (file)
@@ -26,14 +26,14 @@ __contains_word() {
 
 __get_tpm2_devices() {
     local a b c
-    systemd-creds --no-legend --quiet --tpm2-device=list 2>/dev/null | \
+    systemd-creds --no-legend --quiet --tpm2-device=list 2>/dev/null |
         { while read -r a b c; do echo " $a"; done; }
 }
 
 __get_creds() {
     local a b c
     local mode=$1; shift 1
-    systemd-creds list $mode --no-legend --no-pager $1 2>/dev/null | \
+    systemd-creds list $mode --no-legend --no-pager $1 2>/dev/null |
         { while read -r a b c; do echo " $a"; done; }
 }
 
index cff13b9e824b1b89ee257a688254d0b4f5d204ae..2a826204014e518da68e1e6ec2d847b1ab080e2a 100644 (file)
@@ -36,8 +36,8 @@ __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; } | \
+    { 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
 }
 
index f6838edc08c27a18343c6a0fe1e933dfcc3248ec..e1a14ff2b053b35d939e3640e7f50ab603974c19 100644 (file)
@@ -22,8 +22,8 @@ __systemctl() {
     systemctl $mode --full --no-legend --no-pager --plain "$@"
 }
 
-__get_slice_units () { __systemctl $1 list-units --all -t slice \
-                           { while read -r a b c d; do echo " $a"; done; }; }
+__get_slice_units () { __systemctl $1 list-units --all -t slice |
+                           { while read -r a b c d; do echo " $a"; done; }; }
 
 __get_properties () {
     systemd-analyze transient-settings scope service 2>/dev/null |
@@ -47,8 +47,8 @@ __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; } | \
+    { machinectl list --full --max-addresses=0 --no-legend --no-pager 2>/dev/null; echo ".host"; } |
+        { while read -r a b; do echo " $a"; done; } |
         sort -u
 }
 
index 3f4dfef35bf1564ad5114b68b49aa154c60482e7..14628822f6111c565b2c572d5126a4ee5cf39c65 100644 (file)
@@ -28,8 +28,8 @@ __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; } | \
+    { 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
 }
 
index 21fc6ed7c972916190fc5e122fecb48efdfdc317..adb06a40ee321851b86752f2ddd88627a9fd7136 100644 (file)
@@ -36,7 +36,7 @@ __get_all_device_nodes() {
 }
 
 __get_all_device_units() {
-    systemctl list-units -t device --full --no-legend --no-pager --plain 2>/dev/null | \
+    systemctl list-units -t device --full --no-legend --no-pager --plain 2>/dev/null |
         { while read -r a b; do echo "$a"; done; }
 }
 
index 25040517138d0c972865004151bb10900c43c473..cb177d86518293e2595ee17f649b050116fac8c4 100644 (file)
@@ -4,9 +4,9 @@
 (( $+functions[_localectl_set-locale] )) ||
 _localectl_set-locale() {
     local -a _locales locale_fields
-    locale_fields=(LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME \
-                   LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER \
-                   LC_NAME LC_ADDRESS LC_TELEPHONE \
+    locale_fields=(LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME
+                   LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER
+                   LC_NAME LC_ADDRESS LC_TELEPHONE
                    LC_MEASUREMENT LC_IDENTIFICATION)
     # LC_ALL is omitted on purpose
 
index 6946f6faa20b4ee24d99e53bdd945379d6ebbf46..a1c7de1b2c7f5db3b7719dcdb0b85f504d619dfc 100644 (file)
@@ -3,8 +3,8 @@
 
 (( $+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; } | \
+        { 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
     }
 
index e811803d208995f7d8133900ad12ea212c0fdbc8..a74cd8de398ddad81af4b67b23f95f4305be0d70 100644 (file)
         while _tags; do
             for i in $groups; do
                 if _requested ${i//_/-}-commands; then
-                    _describe -t ${i//_/-}-commands "${i//_/ } command" ${i}_commands \
-                        && ret=0
+                    _describe -t ${i//_/-}-commands "${i//_/ } command" ${i}_commands &&
+                        ret=0
                 fi
             done
         done
index af867764380d8aac8b1803e61e683cba4ca5296e..e59e8ac6bd9e7efd6fff7bac67ee70a7aaa07ea4 100644 (file)
@@ -10,8 +10,8 @@ __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; }
+        __systemctl list-units --all -t slice |
+            { while read -r a b; do echo $a; done; }
     }
 
 (( $+functions[__systemd-run_slices] )) ||