Skip to content

Commit

Permalink
Add more collors to the PS1
Browse files Browse the repository at this point in the history
  • Loading branch information
kassio committed Sep 23, 2017
1 parent 4745328 commit 50af67d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rcfiles/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ __ps1() {
local blue='\[\e[0;34m\]'
local red='\[\e[0;31m\]'
local green='\[\e[0;32m\]'
local yellow='\[\e[0;93m\]'
local reset='\[\e[00m\]'

if [ ${last_status} -eq 0 ]
Expand All @@ -26,7 +27,7 @@ __ps1() {
fi

__git_ps1 "${blue}\w${reset}" "
${prompt_color}\$${reset} "
${prompt_color}\$${reset} " " ${yellow}(${reset}%s${yellow})"
}

# Autocomplete
Expand Down
6 changes: 5 additions & 1 deletion rcfiles/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ function __ps1() {
local prompt_color="%F{red}"
fi

__git_ps1 "%F{blue}%~%f" "
local part1="%F{blue}%~%f"
local part2="
${prompt_color}$%f "
local part3="$(print -P " %F{yellow}(%f%%s%F{yellow})")"

__git_ps1 ${part1} ${part2} ${part3}
}

brew_completion="${HOMEBREW_PREFIX}/Library/Contributions/brew_zsh_completion.sh"
Expand Down

0 comments on commit 50af67d

Please sign in to comment.