mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Add timezone support to right prompt.
Allow overriding the right prompt datestamp timezone: ``` set -g theme_date_timezone America/Los_Angeles ```
This commit is contained in:
parent
3b37ec9f0b
commit
6e75f31c3f
@ -94,6 +94,7 @@ set -g theme_title_display_path no
|
||||
set -g theme_title_display_user yes
|
||||
set -g theme_title_use_abbreviated_path no
|
||||
set -g theme_date_format "+%a %H:%M"
|
||||
set -g theme_date_timezone America/Los_Angeles
|
||||
set -g theme_avoid_ambiguous_glyphs yes
|
||||
set -g theme_powerline_fonts no
|
||||
set -g theme_nerd_fonts yes
|
||||
|
@ -1,5 +1,6 @@
|
||||
# You can override some default right prompt options in your config.fish:
|
||||
# set -g theme_date_format "+%a %H:%M"
|
||||
# set -g theme_date_timezone America/Los_Angeles
|
||||
|
||||
function __bobthefish_cmd_duration -S -d 'Show command duration'
|
||||
[ "$theme_display_cmd_duration" = "no" ]
|
||||
@ -62,7 +63,7 @@ function __bobthefish_timestamp -S -d 'Show the current timestamp'
|
||||
or set -l theme_date_format "+%c"
|
||||
|
||||
echo -n ' '
|
||||
date $theme_date_format
|
||||
env TZ="$theme_date_timezone" date $theme_date_format
|
||||
end
|
||||
|
||||
function fish_right_prompt -d 'bobthefish is all about the right prompt'
|
||||
|
Loading…
Reference in New Issue
Block a user