mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2026-11-28 11:23:07 +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:
1 parent
fe2d8d81fb
commit
c93bb14ffb
2 files changed
+6
-1
No files matched your search
@@ -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