show_time.fish 894 B

12345678910111213141516171819202122232425262728293031
  1. function show_time
  2. _tide_title 'Show current time?'
  3. _tide_option 1 No
  4. _tide_display_prompt
  5. set -a fake_tide_right_prompt_items time
  6. _tide_option 2 '24-hour format'
  7. _tide_display_prompt fake_tide_time_format '%T'
  8. _tide_option 3 '12-hour format'
  9. _tide_display_prompt fake_tide_time_format '%r'
  10. _tide_menu
  11. switch $_tide_selected_option
  12. case 1
  13. set -g fake_tide_time_format ''
  14. set -e fake_tide_right_prompt_items[-1]
  15. case 2
  16. set -g fake_tide_time_format '%T'
  17. case 3
  18. set -g fake_tide_time_format '%r'
  19. end
  20. switch $_tide_configure_style
  21. case lean
  22. _next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_height
  23. case classic rainbow
  24. _next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_separators
  25. end
  26. end