]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
zsh: remove _files prefixes
authorpeelz <peelz.dev@gmail.com>
Wed, 2 Jul 2025 00:39:42 +0000 (20:39 -0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 2 Jul 2025 11:48:42 +0000 (12:48 +0100)
Prefixes would be nice, but they appear to be very buggy.

A few examples:
- `udevadm test-builtin net_setup_link /sys<TAB><TAB>`: `/sysblock/`
- `udevadm test-builtin net_setup_link /sys/<TAB><TAB>`: `/sys/bin/`
- `journalctl /dev<TAB>`: `/dev//dev/`

shell-completion/zsh/_journalctl
shell-completion/zsh/_udevadm

index 1cfa049b0ff54aaeed8e338b60a713af02855e73..dc325809c683fe28868197fdedfc326f0f0e3746 100644 (file)
@@ -29,7 +29,7 @@ _journalctl_none() {
     _commands=( ${(f)"$(_call_program commands "$service $_sys_service_mgr -F _EXE" 2>/dev/null)"} )
     _jrnl_none='yes'
     _alternative : \
-        'files:/dev files:_files -W /dev -P /dev/' \
+        'files:/dev files:_files -W /dev ' \
         'commands:commands:compadd -a _commands' \
         'fields:fields:_journalctl_fields'
 }
index 6cbe90eefca9a775d8823390d2c873e20e7b4626..6483e948b6a70cfcd67963f9a1199b94f61cdfd6 100644 (file)
@@ -7,8 +7,8 @@ _udevadm_info(){
         '(-)'{-h,--help}'[Print help]' \
         '(-)'{-V,--version}'[Print version of the program]' \
         '--query=[Query the database for specified type of device data. It needs the --path or --name to identify the specified device.]:type:(name symlink path property all)' \
-        '--path=[The devpath of the device to query.]:sys files:_files -P /sys/ -W /sys' \
-        '--name=[The name of the device node or a symlink to query]:device files:_files -P /dev/ -W /dev' \
+        '--path=[The devpath of the device to query.]:sys files:_files -W /sys' \
+        '--name=[The name of the device node or a symlink to query]:device files:_files -W /dev' \
         '--root[Print absolute paths in name or symlink query.]' \
         '--attribute-walk[Print all sysfs properties of the specified device that can be used in udev rules to match the specified device]' \
         '--export[Print output as key/value pairs.]' \
@@ -96,7 +96,7 @@ _udevadm_test(){
         '(-D --extra-rules-dir=)'{-D,--extra-rules-dir=}'[Also load rules from the directory.]' \
         '(-v --verbose)'{-v,--verbose}'[Show verbose logs.]' \
         '--json=[Generate JSON output]:MODE:(pretty short off)' \
-        '*::devpath:_files -P /sys/ -W /sys'
+        '*::devpath:_files -W /sys'
 }
 
 (( $+functions[_udevadm_test-builtin] )) ||
@@ -111,7 +111,7 @@ _udevadm_test-builtin(){
         _arguments \
             '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \
             '(- *)--help[Print help text]' \
-            '*::syspath:_files -P /sys -W /sys'
+            '*::syspath:_files -W /sys'
     else
         _arguments \
             '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \
@@ -151,7 +151,7 @@ _udevadm_wait(){
         '--initialized=[Wait for devices being initialized by systemd-udevd.]:boolean:(yes no)' \
         '--removed[Wait for devices being removed.]' \
         '--settle[Also wait for udev queue being empty.]' \
-        '*::devpath:_files -P /dev/ -W /dev'
+        '*::devpath:_files -W /dev'
 }
 
 (( $+functions[_udevadm_lock] )) ||