2020-06-18 20:36:59 +03:00
|
|
|
function lean_show_time
|
2020-06-16 02:38:02 +03:00
|
|
|
set -a fake_tide_right_prompt_items 'time'
|
|
|
|
|
2020-05-19 02:17:50 +03:00
|
|
|
_title 'Show current time?'
|
|
|
|
|
|
|
|
_option 1 'No'
|
2020-05-19 06:03:25 +03:00
|
|
|
_display_prompt fake_tide_time_format ''
|
2020-05-19 02:17:50 +03:00
|
|
|
|
|
|
|
_option 2 '24-hour format'
|
2020-05-19 06:03:25 +03:00
|
|
|
_display_prompt fake_tide_time_format '%T'
|
2020-05-19 02:17:50 +03:00
|
|
|
|
|
|
|
_option 3 '12-hour format'
|
2020-05-19 06:03:25 +03:00
|
|
|
_display_prompt fake_tide_time_format '%r'
|
2020-05-19 02:17:50 +03:00
|
|
|
|
|
|
|
_display_restart_and_quit
|
|
|
|
|
|
|
|
switch (_menu 'Choice' 1/2/3/r/q)
|
|
|
|
case 1
|
2020-05-19 06:03:25 +03:00
|
|
|
set -g fake_tide_time_format ''
|
2020-06-16 02:38:02 +03:00
|
|
|
set -e fake_tide_right_prompt_items[-1]
|
2020-06-18 20:36:59 +03:00
|
|
|
_next_choice 'lean/lean_prompt_height'
|
2020-05-19 02:17:50 +03:00
|
|
|
case 2
|
2020-05-19 06:03:25 +03:00
|
|
|
set -g fake_tide_time_format '%T'
|
2020-06-18 20:36:59 +03:00
|
|
|
_next_choice 'lean/lean_prompt_height'
|
2020-05-19 02:17:50 +03:00
|
|
|
case 3
|
2020-05-19 06:03:25 +03:00
|
|
|
set -g fake_tide_time_format '%r'
|
2020-06-18 20:36:59 +03:00
|
|
|
_next_choice 'lean/lean_prompt_height'
|
2020-05-19 02:17:50 +03:00
|
|
|
case r
|
|
|
|
_begin
|
|
|
|
case q
|
|
|
|
_quit
|
|
|
|
end
|
|
|
|
end
|