mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-07 12:20:39 +01:00
Add support for displaying time in 12-hour format
- Introduces a flag, `$BULLETTRAIN_TIME_12HR`, indicating if 12-hour format should be used - Default to 24 hour time - Document new option in README
This commit is contained in:
committed by
Caio Gondim
parent
fe2d8d81fb
commit
c93bb14ffb
@@ -369,7 +369,11 @@ prompt_time() {
|
||||
return
|
||||
fi
|
||||
|
||||
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG '%D{%H:%M:%S}'
|
||||
if [[ $BULLETTRAIN_TIME_12HR == true ]] then
|
||||
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}
|
||||
else
|
||||
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%R}
|
||||
fi
|
||||
}
|
||||
|
||||
# Status:
|
||||
|
||||
Reference in New Issue
Block a user