Last active
September 1, 2016 12:33
-
-
Save eduardomartines/9418987 to your computer and use it in GitHub Desktop.
Exemplo: "username in ~/Projects/projectname on master ± [17:08:02] at machinename"
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
# ZSH | |
ZSH=$HOME/.oh-my-zsh | |
# PLUGIN | |
plugins=(git) | |
# SOURCE | |
source $ZSH/oh-my-zsh.sh | |
# PROMPT | |
reset="%{$reset_color%}" | |
function prompt_collapse_pwd { | |
echo $(pwd | sed -e "s,^$HOME,~,") | |
} | |
function prompt_char { | |
git branch >/dev/null 2>/dev/null && echo '±' && return | |
hg root >/dev/null 2>/dev/null && echo '☿' && return | |
echo 'o' | |
} | |
PROMPT='%{$fg[cyan]%}%n%{$reset_color%} in %{$fg_bold[green]%}$(prompt_collapse_pwd)$reset on $(git_prompt_info) $(prompt_char) ' | |
RPROMPT='%{$fg_bold[green]%}[$(date +%H:%M:%S)]$reset at %{$fg[yellow]%}%m$reset' | |
# THEME | |
ZSH_THEME="robbyrussell" | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[magenta]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="$reset" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}!" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
# EXPORT | |
export PATH=$PATH:/usr/local/sbin | |
export PATH=$PATH:/usr/local/bin | |
export PATH=$PATH:/usr/sbin | |
export PATH=$PATH:/usr/bin | |
export PATH=$PATH:/sbin | |
export PATH=$PATH:/bin | |
# ALIAS | |
alias p="cd ~/Projects" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment