Merge reworked #13690: timezone-derived region and channel mirror prepends

Drop the .cn servers.sed twins, the USTC Arch fallback and the closed
#14399 timezone preselection. region.sh follows the installer's marker.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-08 22:43:55 -04:00
commit 4521dac023
25 files changed
+150 -206

No files matched your search

+1 -14
View File
@@ -61,7 +61,7 @@ fi
trap 'if [[ ${FUNCNAME[0]:-} == "$PROMPT_FN" ]]; then printf "returned\n" >>"$MARKER"; fi' RETURN
"$PROMPT_FN" ${PROMPT_ARG:+"$PROMPT_ARG"}
"$PROMPT_FN"
printf 'region=%s\n' "${region:-}"
printf 'keyboard=%s\n' "${keyboard:-}"
@@ -274,19 +274,6 @@ assert_status 0 "timezone prompt survives a failed geo guess"
[[ $(head -n 1 "$GUM_ARGS") == filter* ]] || fail "timezone prompt filters when there is no geo guess"
pass "timezone prompt falls back to filtering when the geo guess fails"
# A region's default stands in for the missing guess, so an offline China
# install opens on Asia/Shanghai instead of the top of the list
PROMPT_ARG=Asia/Shanghai run_prompt omarchy_prompt_timezone "0:Asia/Shanghai"
assert_status 0 "timezone prompt accepts the caller's fallback"
[[ $(field timezone) == "Asia/Shanghai" ]] || fail "timezone prompt keeps the preselected fallback"
grep -qF -- '--selected Asia/Shanghai' "$GUM_ARGS" || fail "timezone prompt preselects the caller's fallback"
[[ $(head -n 1 "$GUM_ARGS") == choose* ]] || fail "timezone prompt chooses from the list when it has a fallback"
pass "timezone prompt preselects the caller's fallback when the geo guess fails"
TZ_GUESS=Europe/Copenhagen PROMPT_ARG=Asia/Shanghai run_prompt omarchy_prompt_timezone "0:Europe/Copenhagen"
grep -qF -- '--selected Europe/Copenhagen' "$GUM_ARGS" || fail "a geo guess outranks the caller's fallback"
pass "timezone prompt prefers the geo guess over the caller's fallback"
run_prompt omarchy_prompt_timezone "0:"
assert_status 0 "timezone prompt accepts an empty selection"
[[ $(field timezone) == "UTC" ]] || fail "timezone prompt falls back to UTC"