]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion: also suggest units in reloading or activating
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 11 Mar 2019 04:26:29 +0000 (13:26 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Mar 2019 10:25:26 +0000 (11:25 +0100)
Closes #11942.

shell-completion/bash/systemctl.in

index 0e58e2ba4cbe0b3b055d04d254394c904615bd55..d73f956a3f4c22d0c3d023a3b0f5ab6e487da806 100644 (file)
@@ -84,10 +84,13 @@ __get_restartable_units () {
 
 __get_stoppable_units () {
         # filter out masked and not-found
-        __filter_units_by_properties $1 ActiveState=active,CanStop=yes $(
+        local units=$(
                 { __get_not_masked_unit_files $1 $2
                   __get_active_units $1 $2
                 } | sort -u )
+        __filter_units_by_properties $1 ActiveState=active,CanStop=yes $units
+        __filter_units_by_properties $1 ActiveState=reloading,CanStop=yes $units
+        __filter_units_by_properties $1 ActiveState=activating,CanStop=yes $units
 }
 
 __get_reloadable_units () {