Preselect the current region when the form asks again
This commit is contained in:
1 parent
c86af5cea5
commit
b6bf851af4
2 files changed
+9
-8
No files matched your search
@@ -17,10 +17,7 @@
|
||||
# only keys any gum widget exits on, and Ctrl+C arrives as a byte in raw mode,
|
||||
# so it never reaches the shell as SIGINT. Act on the status, never on a trap.
|
||||
#
|
||||
# Callers supply `notice <message> <seconds>` for validation feedback, and set
|
||||
# the variables these prompts write: region, keyboard, keyboard_label,
|
||||
# username, password, password_confirmation, full_name, email_address,
|
||||
# hostname, timezone.
|
||||
# Callers supply `notice <message> <seconds>` and set every variable these prompts write.
|
||||
|
||||
OMARCHY_FORM_BACK=1
|
||||
OMARCHY_FORM_SIGNAL=130
|
||||
@@ -95,7 +92,7 @@ omarchy_username_taken() { return 1; }
|
||||
# China lists the .cn package mirrors first and sets up Chinese input.
|
||||
omarchy_prompt_region() {
|
||||
local choice status
|
||||
choice=$(gum choose --selected "Global" --header "Select region" Global China) && status=0 || status=$?
|
||||
choice=$(printf '%s\n' Global China | gum choose --selected "${region^}" --header "Select region") && status=0 || status=$?
|
||||
((status == 0)) || return $status
|
||||
|
||||
region=${choice,,}
|
||||
|
||||
Reference in new issue
Block a user