From 02d06ba18023efd21dfdcdc4545a0c99d01dd639 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 13 Jun 2022 00:21:41 +0100 Subject: bootctl: add --install-source=auto|image|host When using --root=/--image= the binaries to install/update will be picked from the directory/image. Add an option to let the caller choose. By default (auto) the image is tried first, and if nothing is found then the host. The other options allow to strictly try the image or host and ignore the other. --- shell-completion/bash/bootctl | 5 ++++- shell-completion/zsh/_bootctl | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'shell-completion') diff --git a/shell-completion/bash/bootctl b/shell-completion/bash/bootctl index fd71cffe3f..0b7cef7871 100644 --- a/shell-completion/bash/bootctl +++ b/shell-completion/bash/bootctl @@ -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 --root --image' + [ARG]='--esp-path --boot-path --make-machine-id-directory --root --image --install-source' ) if __contains_word "$prev" ${OPTS[ARG]}; then @@ -52,6 +52,9 @@ _bootctl() { compopt -o nospace comps=$( compgen -A file -- "$cur" ) ;; + --install-source) + comps="image host auto" + ;; esac COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) return 0 diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl index fbd62bc0fd..8634e8b9bc 100644 --- a/shell-completion/zsh/_bootctl +++ b/shell-completion/zsh/_bootctl @@ -75,4 +75,5 @@ _arguments \ '--graceful[Do not fail when locating ESP or writing fails]' \ '--root=[Operate under the specified directory]:PATH' \ '--image=[Operate on the specified image]:PATH' \ + '--install-source[Where to pick files when using --root=/--image=]:options:(image host auto)' \ '*::bootctl command:_bootctl_commands' -- cgit v1.2.1