From 40623a302b4e0597dcfed8376b5881214d760594 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Fri, 19 Jan 2024 15:49:52 +0100
Subject: [PATCH 0265/1160] bash-completion: add missing options to
 systemd-cryptenroll

(cherry picked from commit c13d9199d6a9553108f68403b570838e2aeca8a0)
---
 shell-completion/bash/systemd-cryptenroll | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/shell-completion/bash/systemd-cryptenroll b/shell-completion/bash/systemd-cryptenroll
index 66c6524fe8..1723f75bee 100644
--- a/shell-completion/bash/systemd-cryptenroll
+++ b/shell-completion/bash/systemd-cryptenroll
@@ -44,7 +44,7 @@ __get_block_devices() {
     done
 }
 
-_systemd-cryptenroll() {
+_systemd_cryptenroll() {
     local comps
     local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
     local -A OPTS=(
@@ -59,11 +59,14 @@ _systemd-cryptenroll() {
                --fido2-with-user-presence
                --fido2-with-user-verification
                --tpm2-device
+               --tpm2-device-key
+               --tpm2-seal-key-handle
                --tpm2-pcrs
                --tpm2-public-key
                --tpm2-public-key-pcrs
                --tpm2-signature
                --tpm2-with-pin
+               --tpm2-pcrlock
                --wipe-slot'
     )
 
@@ -71,7 +74,7 @@ _systemd-cryptenroll() {
 
     if __contains_word "$prev" ${OPTS[ARG]}; then
         case $prev in
-            --unlock-key-file|--tpm2-public-key|--tpm2-signature)
+            --unlock-key-file|--tpm2-device-key|--tpm2-public-key|--tpm2-signature|--tpm2-pcrlock)
                 comps=$(compgen -A file -- "$cur")
                 compopt -o filenames
                 ;;
@@ -111,4 +114,4 @@ _systemd-cryptenroll() {
     return 0
 }
 
-complete -F _systemd-cryptenroll systemd-cryptenroll
+complete -F _systemd_cryptenroll systemd-cryptenroll
-- 
2.33.0