From fc53809803cd2bc2434e312b19a18fa36776da12 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:40 +0200 Subject: Adding upstream version 256. Signed-off-by: Daniel Baumann --- shell-completion/bash/systemd-id128 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'shell-completion/bash/systemd-id128') diff --git a/shell-completion/bash/systemd-id128 b/shell-completion/bash/systemd-id128 index 1c19639..54d4ec8 100644 --- a/shell-completion/bash/systemd-id128 +++ b/shell-completion/bash/systemd-id128 @@ -1,3 +1,4 @@ +# shellcheck shell=bash # systemd-id128(1) completion -*- shell-script -*- # SPDX-License-Identifier: LGPL-2.1-or-later # @@ -28,12 +29,13 @@ _systemd_id128() { local i verb comps local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword local -A OPTS=( - [STANDALONE]='-h --help --version -p --pretty' - [ARG]='-a --app-specific' + [STANDALONE]='-h --help --version -p --pretty --value -u --uuid --no-legend --no-pager -j' + [ARG]='-a --app-specific --json' ) local -A VERBS=( [STANDALONE]='new machine-id boot-id invocation-id help' + [ARG]='show' ) _init_completion || return @@ -43,6 +45,9 @@ _systemd_id128() { --app-specific|-a) comps="" ;; + --json) + comps="short pretty off" + ;; esac COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) return 0 @@ -65,6 +70,12 @@ _systemd_id128() { comps=${VERBS[*]} elif __contains_word "$verb" ${VERBS[STANDALONE]}; then comps='' + elif __contains_word "$verb" ${VERBS[ARG]}; then + case $verb in + show) + comps="$(IFS='\n ' systemd-id128 show --no-legend)" + ;; + esac fi COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) -- cgit v1.2.3