From 0a7eda348ccf2e4591ac5db039482785fdd40021 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 9 Mar 2023 08:00:00 +0000 Subject: 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. --- shell-completion/bash/udevadm | 6 +++++- shell-completion/zsh/_udevadm | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'shell-completion') 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' } -- cgit v1.2.3