Last active
July 15, 2024 20:56
-
-
Save philFernandez/56f8953722285834cc9000ffcfe103f4 to your computer and use it in GitHub Desktop.
A theme for oh-my-zsh called philthy.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Requires a nerdfont compatible font to display properly | |
# | |
# https://github.com/ryanoasis/nerd-fonts | |
# | |
# | |
function last_two_dir { | |
# if we're at ~/ just display ~ | |
if [ $PWD = $HOME ]; then | |
echo '%c' | |
# display cwd and parent directory | |
else | |
echo '%2d' | |
fi | |
} | |
function display_git { | |
if [ $(git_current_branch) ]; then | |
echo " {$(git_current_branch)}" | |
fi | |
} | |
local cwd_color=214 | |
local git_branch_color=001 | |
local arrow_color=082 | |
local arrow='' | |
# add indicator for when inside vim spawned shell | |
if [ $VIMRUNTIME ]; then | |
arrow_color=196 | |
arrow=' ' | |
fi | |
PROMPT='%{$FG[$cwd_color]%}$(last_two_dir)%{$FG[$git_branch_color]%}$(display_git) \ | |
%{$FG[$arrow_color]%}$arrow%{$reset_color%} ' | |
RPROMPT='$(git_prompt_status)%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" | |
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" | |
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" | |
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" | |
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" |
If want to display arrow. I have to install nerd-fonts?
Yes.
is this a joke
is this a joke
Yes, and you are the punchline
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If want to display arrow. I have to install nerd-fonts?