1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-22 04:10:07 +00:00

use less surprising input for clock option

for the three clock options (no clock, a 12-hour clock, or a 24-hour
clock), use the first character of the option as the input to
fix #2266.

This pull request is a reissue of – and supersession of – #2267,
which was pushed on a branch with non-ASCII characters in the name.

Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
This commit is contained in:
Lucas Larson 2023-04-14 10:37:01 -04:00
parent f27d192eb2
commit 954f38d589
No known key found for this signature in database
GPG key ID: 534FA8DFC1C87463

View file

@ -1037,19 +1037,19 @@ function ask_time() {
add_widget 0 flowing -c "%BShow current time?%b"
add_widget 0 print
add_widget 1
add_widget 0 print -P "%B(1) No.%b"
add_widget 0 print -P "%B(n) No.%b"
add_prompt time=
add_widget 0 print -P "%B(1) 12-hour format.%b"
add_prompt time=$time_12h
add_widget 0 print -P "%B(2) 24-hour format.%b"
add_prompt time=$time_24h
add_widget 0 print -P "%B(3) 12-hour format.%b"
add_prompt time=$time_12h
add_widget 0 print -P "(r) Restart from the beginning."
ask 123r
ask n12r
case $choice in
r) return 1;;
1) time=;;
n) time=;;
1) time=$time_12h; options+='12h time';;
2) time=$time_24h; options+='24h time';;
3) time=$time_12h; options+='12h time';;
esac
return 0
}