mirror of
https://github.com/ChesterYue/ohmyzsh-theme-passion.git
synced 2026-07-25 14:01:03 +00:00
[A] trouble shooting for gdate on macOS
This commit is contained in:
parent
a24c93e9e0
commit
e9e23e4c3d
2 changed files with 19 additions and 0 deletions
|
|
@ -9,3 +9,10 @@ An oh-my-zsh theme.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
REF: [Oh-My-Zsh External themes](https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes)
|
REF: [Oh-My-Zsh External themes](https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes)
|
||||||
|
|
||||||
|
### Trouble Shooting
|
||||||
|
|
||||||
|
#### macOS
|
||||||
|
passsion.zsh-theme uses cmd ```gdate``` to get current time in milliseconds which is not installed default in macOS.
|
||||||
|
|
||||||
|
run ```brew install coreutils;``` to get ```gdate```;
|
||||||
|
|
@ -1,4 +1,16 @@
|
||||||
|
|
||||||
|
# gdate for macOS
|
||||||
|
# REF: https://apple.stackexchange.com/questions/135742/time-in-milliseconds-since-epoch-in-the-terminal
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
{
|
||||||
|
gdate
|
||||||
|
} || {
|
||||||
|
echo "\n$fg_bold[yellow]zsh theme passion needs gdate in coreutils:$reset_color"
|
||||||
|
echo "$fg_bold[green]brew install coreutils;\n$reset_color";
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# time
|
# time
|
||||||
function real_time() {
|
function real_time() {
|
||||||
local color="%{$fg_no_bold[cyan]%}"; # color in PROMPT need format in %{XXX%} which is not same with echo
|
local color="%{$fg_no_bold[cyan]%}"; # color in PROMPT need format in %{XXX%} which is not same with echo
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue