]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
zsh: complete positional devpath in udevadm info/trigger
authorRonan Pigott <ronan@rjp.ie>
Fri, 13 Jun 2025 09:09:55 +0000 (02:09 -0700)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 13 Jun 2025 10:23:59 +0000 (11:23 +0100)
shell-completion/zsh/_udevadm

index 0f4b8aff2cda750faa34929f290490c7f129a8a7..6cbe90eefca9a775d8823390d2c873e20e7b4626 100644 (file)
@@ -17,7 +17,8 @@ _udevadm_info(){
         '--export-db[Export the content of the udev database.]' \
         '--cleanup-db[Cleanup the udev database.]' \
         '--value[When showing properties, print only their values.]' \
-        '--property=[Show only properties by this name.]:NAME'
+        '--property=[Show only properties by this name.]:NAME' \
+        '*::devpath:_path_files -g "*(-/,-%)"'
 }
 
 (( $+functions[_udevadm_trigger] )) ||
@@ -42,7 +43,8 @@ _udevadm_trigger(){
         '--initialized-match[Trigger events for devices that are already initialized.]' \
         '--initialized-nomatch[Trigger events for devices that are not initialized yet.]' \
         '--uuid[Print synthetic uevent UUID.]' \
-        '--prioritized-subsystem=[Trigger events for devices which belong to a matching subsystem earlier.]:SUBSYSTEM'
+        '--prioritized-subsystem=[Trigger events for devices which belong to a matching subsystem earlier.]:SUBSYSTEM' \
+        '*::devpath:_path_files -g "*(-/,-%)"'
 }
 
 (( $+functions[_udevadm_settle] )) ||