pmb.aportgen.device: fix flash method autocomplete

In order to provide tab completion to the "Flash method" question we
need to provide pmb.helpers.cli.ask with the possible options. Do that.

Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230403163311.927063-1-luca@z3ntu.xyz%3E
This commit is contained in:
Luca Weiss 2023-04-03 18:33:11 +02:00 committed by Oliver Smith
parent c0b46612c0
commit 7125412f07
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,8 @@ def ask_for_flash_method():
logging.info("Which flash method does the device support?")
method = pmb.helpers.cli.ask("Flash method",
pmb.config.flash_methods,
pmb.config.flash_methods[0])
pmb.config.flash_methods[0],
complete=pmb.config.flash_methods)
if method in pmb.config.flash_methods:
if method == "heimdall":