Gary-Ash / SnazzyPrompt

My Snazzy Bash/Z Shell prompt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snazzy Powerline Style Terminal Prompt

Screen Shot

This repository contains my snazzy Powerline style terminal prompt

Options Environment Variable:. SNAZZY_PROMPT=,Foreground color,Background color[,Alternate Foreground color,Alternate Background color];

Segment Names:

  • cwd Current working directory
  • error Error status of the last command
  • git git status if the current directory is a git working tree
  • machine machine/host name
  • user user name
#*****************************************************************************************
# prompt setup
#*****************************************************************************************
 export SNAZZY_PROMPT="cwd,235,179,235,166;git,235,219,235,40;error,235,166"

snazzy_prompt_precmd() {
       PS1="$(/usr/local/bin/SnazzyPrompt --error $?)"
}

install_snazzy_prompt_precmd() {
  for s in "${precmd_functions[@]}"; do
    if [ "$s" = "snazzy_prompt_precmd" ]; then
      return
    fi
  done
  precmd_functions+=(snazzy_prompt_precmd)
}
install_snazzy_prompt_precmd  
...  

Building SnazzyPrompt

cd scripts ./build-libgit2.sh open the Xcode project file and build

About

My Snazzy Bash/Z Shell prompt

License:MIT License


Languages

Language:C++ 91.7%Language:Perl 5.3%Language:Shell 3.0%