Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prompt_status_smiley() {
- [[ $? -ne 0 ]] && echo '%F{1}:(%f'
- }
- prompt_git_section() {
- if git rev-parse --is-inside-work-tree &> /dev/null; then
- echo " - %{%F{4}%}%B[%b%{%F{1}%}$(git_prompt_info)%{%F{4}%}%B]%b%{%f%}%{%F{4}%}%B"
- fi
- }
- # username / host
- PROMPT='%{%F{4}%}%B┌─[%b%{%f%}%{%B%F{2}%}%n%{%b%F{4}%}@%{%f%}%{%F{6}%}%m%{%F{4}%}%B]%b%{%f%}'
- # directory
- PROMPT+=' - %b%{%F{4}%}%B[%b%{%B%F{7}%}%~%{%b%F{4}%}%B]%b%{%f%}'
- # history
- PROMPT+=' - %{%F{4}%}%B[%b%{%F{3}%}%!%{%F{4}%}%B]%b%{%f%}%{%F{4}%}%B'
- # git info
- PROMPT+='$(prompt_git_section)'
- # dollar sign
- PROMPT+='
- └─%B[%{%F{5}%}$%{%F{4}%}%B]%{%f%}%b '
- # right prompt
- RPROMPT='$(prompt_status_smiley)'
- # secondary prompt
- PS2=$' %F{4}%}%B>%{%f%}%b'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement