bash-completion: udevadm: list all possible values for --action option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jun 2019 19:08:18 +0000 (04:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jun 2019 19:10:14 +0000 (04:10 +0900)
shell-completion/bash/udevadm

index c151a41..cb12c25 100644 (file)
@@ -119,7 +119,7 @@ _udevadm() {
                         comps='devices subsystems'
                         ;;
                     -c|--action)
-                        comps='add change remove bind unbind'
+                        comps=$( udevadm trigger --action help )
                         ;;
                     -y|--sysname-match|-b|--parent-match)
                         comps=$( __get_all_sysdevs )
@@ -196,7 +196,7 @@ _udevadm() {
             if __contains_word "$prev" ${OPTS[TEST]}; then
                 case $prev in
                     -a|--action)
-                        comps='add change remove bind unbind'
+                        comps=$( udevadm test --action help )
                         ;;
                     -N|--resolve-names)
                         comps='early late never'