Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/user_interaction.py13
-rw-r--r--examples/guided.py3
2 files changed, 13 insertions, 3 deletions
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():
"""