diff options
author | Luca Boccassi <bluca@debian.org> | 2022-06-13 00:21:41 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2022-07-08 16:58:51 +0100 |
commit | 02d06ba18023efd21dfdcdc4545a0c99d01dd639 (patch) | |
tree | 180382205ece3d7c170f68921d70c23eb5d0d947 /shell-completion | |
parent | 80a2381d5c156cffedf41a3e7b95f7a00045a0fd (diff) | |
download | systemd-02d06ba18023efd21dfdcdc4545a0c99d01dd639.tar.gz |
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.
Diffstat (limited to 'shell-completion')
-rw-r--r-- | shell-completion/bash/bootctl | 5 | ||||
-rw-r--r-- | shell-completion/zsh/_bootctl | 1 |
2 files changed, 5 insertions, 1 deletions
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' |