Fixes #149 as well as --help. This will be added in the next patch release.
This commit is contained in:
parent
428bf16868
commit
bb295cb83a
|
|
@ -272,9 +272,16 @@ def select_language(options, show_only_country_codes=True):
|
||||||
print(' -- You can enter ? or help to search for more languages --')
|
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): ')
|
selected_language = input('Select one of the above keyboard languages (by number or full name): ')
|
||||||
if selected_language.lower() in ('?', 'help'):
|
if selected_language.lower() in ('?', 'help'):
|
||||||
filter_string = input('Search for layout containing (example: "sv-"): ')
|
while True:
|
||||||
new_options = search_keyboard_layout(filter_string)
|
filter_string = input('Search for layout containing (example: "sv-"): ')
|
||||||
return select_language(new_options, show_only_country_codes=False)
|
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:
|
elif selected_language.isdigit() and (pos := int(selected_language)) <= len(languages)-1:
|
||||||
selected_language = languages[pos]
|
selected_language = languages[pos]
|
||||||
# I'm leaving "options" on purpose here.
|
# I'm leaving "options" on purpose here.
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ def sig_handler(sig, frame):
|
||||||
original_sigint_handler = signal.getsignal(signal.SIGINT)
|
original_sigint_handler = signal.getsignal(signal.SIGINT)
|
||||||
signal.signal(signal.SIGINT, sig_handler)
|
signal.signal(signal.SIGINT, sig_handler)
|
||||||
|
|
||||||
|
if archinstall.arguments.get('help'):
|
||||||
|
print("See `man archinstall` for help.")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
def ask_user_questions():
|
def ask_user_questions():
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue