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.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index e7fba747..d82068a7 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -28,7 +28,8 @@ def get_password(prompt="Enter a password: "):
return None
def print_large_list(options, padding=5, margin_bottom=0, separator=': '):
- longest_line = len(str(len(options))) + len(separator) + get_longest_option(options) + padding
+ highest_index_number_length = len(str(len(options)))
+ longest_line = highest_index_number_length + len(separator) + get_longest_option(options) + padding
max_num_of_columns = get_terminal_width() // longest_line
max_options_in_cells = max_num_of_columns * (get_terminal_height()-margin_bottom)
@@ -39,7 +40,7 @@ def print_large_list(options, padding=5, margin_bottom=0, separator=': '):
for row in range(0, (get_terminal_height()-margin_bottom)):
for column in range(row, len(options), (get_terminal_height()-margin_bottom)):
spaces = " "*(longest_line - len(options[column]))
- print(f"{str(column).zfill(2)}{separator}{options[column]}", end = spaces)
+ print(f"{str(column): >{highest_index_number_length}}{separator}{options[column]}", end = spaces)
print()
def ask_for_superuser_account(prompt='Create a required super-user with sudo privileges: ', forced=False):