index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-04-03 11:25:34 +0200 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-04-03 11:25:34 +0200 |
commit | bb295cb83a21e104fd39e05b627403d170c2c445 (patch) | |
tree | 884a10084e5d32d2cb421234674a32ade2e404a0 | |
parent | 428bf168684c990a07dde8f71e062d76a3638efc (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 13 | ||||
-rw-r--r-- | examples/guided.py | 3 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 80db7be1..630862ee 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -272,9 +272,16 @@ def select_language(options, show_only_country_codes=True): print(' -- You can enter ? or help to search for more languages --') selected_language = input('Select one of the above keyboard languages (by number or full name): ') if selected_language.lower() in ('?', 'help'): - filter_string = input('Search for layout containing (example: "sv-"): ') - new_options = search_keyboard_layout(filter_string) - return select_language(new_options, show_only_country_codes=False) + while True: + filter_string = input('Search for layout containing (example: "sv-"): ') + new_options = list(search_keyboard_layout(filter_string)) + + if len(new_options) <= 0: + log(f"Search string '{filter_string}' yielded no results, please try another search or Ctrl+D to abort.", fg='yellow') + continue + + return select_language(new_options, show_only_country_codes=False) + elif selected_language.isdigit() and (pos := int(selected_language)) <= len(languages)-1: selected_language = languages[pos] # I'm leaving "options" on purpose here. diff --git a/examples/guided.py b/examples/guided.py index 71e1e01d..723eed5b 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -19,6 +19,9 @@ def sig_handler(sig, frame): original_sigint_handler = signal.getsignal(signal.SIGINT) signal.signal(signal.SIGINT, sig_handler) +if archinstall.arguments.get('help'): + print("See `man archinstall` for help.") + exit(0) def ask_user_questions(): """ |