bootctl: add --root and --image
Operate on image/directory, and also take files to install from it
This commit is contained in:
@@ -32,7 +32,7 @@ _bootctl() {
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help -p --print-esp-path -x --print-boot-path --version --no-variables --no-pager --graceful'
|
||||
[ARG]='--esp-path --boot-path --make-machine-id-directory'
|
||||
[ARG]='--esp-path --boot-path --make-machine-id-directory --root --image'
|
||||
)
|
||||
|
||||
if __contains_word "$prev" ${OPTS[ARG]}; then
|
||||
@@ -48,6 +48,10 @@ _bootctl() {
|
||||
--make-machine-id-directory)
|
||||
comps="yes no auto"
|
||||
;;
|
||||
--image|--root)
|
||||
compopt -o nospace
|
||||
comps=$( compgen -A file -- "$cur" )
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||
return 0
|
||||
|
||||
@@ -73,4 +73,6 @@ _arguments \
|
||||
'--no-variables[Do not touch EFI variables]' \
|
||||
'--no-pager[Do not pipe output into a pager]' \
|
||||
'--graceful[Do not fail when locating ESP or writing fails]' \
|
||||
'--root=[Operate under the specified directory]:PATH' \
|
||||
'--image=[Operate on the specified image]:PATH' \
|
||||
'*::bootctl command:_bootctl_commands'
|
||||
|
||||
Reference in New Issue
Block a user