mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
pmb.helpers.cli: set empty completer for no completion (MR 2055)
The default completer suggests files from the file system which we really don't want here. This can be tested with the 'Manufacturer' field for new devices. Setting it to a custom lambda instead of None disables the completion instead of using the default completer.
This commit is contained in:
parent
81dbabc1ed
commit
c42cd93610
1 changed files with 2 additions and 1 deletions
|
@ -68,7 +68,8 @@ def ask(args, question="Continue?", choices=["y", "n"], default="n",
|
|||
|
||||
# Stop completing (question is answered)
|
||||
if complete:
|
||||
readline.set_completer(None)
|
||||
# set_completer(None) would use the default file system completer
|
||||
readline.set_completer(lambda text, state: None)
|
||||
|
||||
if lowercase_answer:
|
||||
ret = ret.lower()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue