diff options
author | Dmitry V. Levin <ldv@strace.io> | 2023-03-09 09:00:00 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-03-10 18:10:41 +0100 |
commit | 0a7eda348ccf2e4591ac5db039482785fdd40021 (patch) | |
tree | aca9746d8554b77b339e3adf2b255705f9744c17 /shell-completion | |
parent | udevadm verify: load all rules from the system if no rules were given (diff) | |
download | systemd-0a7eda348ccf2e4591ac5db039482785fdd40021.tar.xz systemd-0a7eda348ccf2e4591ac5db039482785fdd40021.zip |
udevadm verify: introduce --root option
When udevadm verify is invoked without positional arguments and loads
all rules files from the system like the udev daemon does, this option
can be used to operate on files underneath the specified root path.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/udevadm | 6 | ||||
-rw-r--r-- | shell-completion/zsh/_udevadm | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/shell-completion/bash/udevadm b/shell-completion/bash/udevadm index b6e14e1d36..3c3c403153 100644 --- a/shell-completion/bash/udevadm +++ b/shell-completion/bash/udevadm @@ -64,7 +64,7 @@ _udevadm() { [MONITOR_ARG]='-s --subsystem-match -t --tag-match' [TEST]='-a --action -N --resolve-names' [TEST_BUILTIN]='-a --action' - [VERIFY]='-N --resolve-names' + [VERIFY]='-N --resolve-names --root' [WAIT]='-t --timeout --initialized=no --removed --settle' [LOCK]='-t --timeout -d --device -b --backing -p --print' ) @@ -254,6 +254,10 @@ _udevadm() { -N|--resolve-names) comps='early never' ;; + --root) + comps=$(compgen -A directory -- "$cur" ) + compopt -o dirnames + ;; *) comps='' ;; diff --git a/shell-completion/zsh/_udevadm b/shell-completion/zsh/_udevadm index 074d367a9d..e8414eef67 100644 --- a/shell-completion/zsh/_udevadm +++ b/shell-completion/zsh/_udevadm @@ -108,6 +108,7 @@ _udevadm_test-builtin(){ _udevadm_verify(){ _arguments \ {-N+,--resolve-names=}'[When to resolve names.]:resolve:(early never)' \ + '--root=[Operate on catalog hierarchy under specified directory]:directories:_directories' \ {-h,--help}'[Print help text.]' \ '*::files:_files' } |