summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-03-05 22:54:19 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2023-03-05 23:55:08 -0800
commitadb0caa090526690ddd0e0efb242591dcf2d70c9 (patch)
treece832626e4b08c1e7d949466c8c8dbd7e32a3eb4
parent6694cfe7224ba6932e645d4f594a2a4fcf37cad3 (diff)
downloadtz-adb0caa090526690ddd0e0efb242591dcf2d70c9.tar.gz
Improve tzselect explanation
* tzselect.ksh: Improve quality of "Based on the following information:" note when the user selected a time first.
-rw-r--r--tzselect.ksh12
1 files changed, 7 insertions, 5 deletions
diff --git a/tzselect.ksh b/tzselect.ksh
index 41180ae..b8f6407 100644
--- a/tzselect.ksh
+++ b/tzselect.ksh
@@ -551,6 +551,7 @@ while
echo >&2 'Please select a country' \
'whose clocks agree with yours.'
doselect $countries
+ country_result=$select_result
country=$select_result;;
*)
country=$countries
@@ -653,12 +654,13 @@ Universal Time is now: $UTdate."
echo >&2 ""
echo >&2 "Based on the following information:"
echo >&2 ""
- case $time%$country%$region%$coord in
+ case $time%$country_result%$region%$coord in
?*%?*%?*%)
- say >&2 " $time$newline $country$newline $region";;
- ?*%?*%%) say >&2 " $time$newline $country";;
- %?*%?*%) say >&2 " $country$newline $region";;
- %?*%%) say >&2 " $country";;
+ say >&2 " $time$newline $country_result$newline $region";;
+ ?*%?*%%|?*%%?*%) say >&2 " $time$newline $country_result$region";;
+ ?*%%%) say >&2 " $time";;
+ %?*%?*%) say >&2 " $country_result$newline $region";;
+ %?*%%) say >&2 " $country_result";;
%%?*%?*) say >&2 " coord $coord$newline $region";;
%%%?*) say >&2 " coord $coord";;
*) say >&2 " TZ='$TZ'"