From f606a09d65a2dee2daace9dc28aceefd8931afc9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 7 Jan 2023 12:57:36 -0800
Subject: [PROPOSED 3/4] Improve tzselect confirmation message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* tzselect.ksh: When there’s only one region in a country,
don’t output the line’s comments when confirming the selection,
as the comments are now intended only for countries with
multiple regions.
---
 tzselect.ksh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tzselect.ksh b/tzselect.ksh
index 28c32a24..be9dbba9 100644
--- a/tzselect.ksh
+++ b/tzselect.ksh
@@ -490,9 +490,7 @@ while
 		*"$newline"*)
 			echo >&2 'Please select one of the following timezones.'
 			doselect $regions
-			region=$select_result;;
-		*)
-			region=$regions
+			region=$select_result
 		esac
 
 		# Determine TZ from country and region.
@@ -512,7 +510,7 @@ while
 				}
 			}
 			/^#/ { next }
-			$1 ~ cc && $4 == region { print $3 }
+			$1 ~ cc && ($4 == region || !region) { print $3 }
 		' <"$TZ_ZONE_TABLE"`
 		esac
 
-- 
2.37.2

