It’s not about a plugin. It’s about prompt tricks in the shell.
For a cool setup in bash, check out the dotfiles
project of this guy:
https://github.com/mathiasbynens/dotfiles
To get a fancy prompt, include the .bash_prompt
in your ~/.bash_profile
or ~/.bashrc
.
To get the exact same prompt as in your question, change the export PS1
line at the end of .bash_prompt
like this:
export PS1="\[${BOLD}${MAGENTA}\]\u\[$WHITE\]@\[$ORANGE\]\h\[$WHITE\]: [\[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" - \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]] \$ \[$RESET\]"
I ended up using all the .bash*
files from this repository about a month ago, and it’s been really useful for me.
For Git, there are extra goodies in .gitconfig
.
And since you’re a mac user, there are even more goodies in .osx
.
Related Posts:
- Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch
- Terminal error: zsh: permission denied: ./startup.sh
- mvn command not found in OSX Mavrerick
- Change default title in mac terminal window
- How do I update the password for Git?
- mvn command not found in OSX Mavrerick
- How can I Remove .DS_Store files from a Git repository?
- How to use vim in the terminal?
- -bash: export: `=’: not a valid identifier
- How to use vim in the terminal?
- OS X cp command in Terminal – No such file or directory
- psql: FATAL: role “postgres” does not exist
- Mac install and open mysql using terminal
- Run script on mac prompt “Permission denied”
- Finding text inside a folder using terminal
- gdb debugging in Terminal OS X (10.8.5) with zsh
- How to navigate to to different directories in the terminal (mac)?
- Open Sublime Text from Terminal in macOS
- How do I delete a Git branch locally and remotely?
- How do I delete a Git branch locally and remotely?
- How do I rename a local Git branch?
- What is the best (and safest) way to merge a Git branch into master?
- How do I rename a local Git branch?
- How to remove local (untracked) files from the current Git working tree
- Git merge hotfix branch into feature branch
- Git fetch remote branch
- How do I clone a specific Git branch? [duplicate]
- Git fetch remote branch
- How do I push a new local branch to a remote Git repository and track it too?
- Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
- How do I list all remote branches in Git 1.7+?
- How do I push a new local branch to a remote Git repository and track it too?
- How can I run python in terminal on a mac?
- Where to place $PATH variable assertions in zsh?
- Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS
- How do I push a new local branch to a remote Git repository and track it too?
- How to fetch all Git branches
- Xcode is not currently available from the Software Update server
- How to view / open a calculator in mac OS X?
- How to get just one file from another branch?
- How to fetch all Git branches
- Xcode is not currently available from the Software Update server
- How to uninstall Python 2.7 on a Mac OS X 10.6.4?
- Update Git branches from master
- VirtualBox NS_ERROR_FAILURE (0x80004005) macOS
- Create a branch in Git from another branch
- Installing Homebrew on OS X
- Updating Python on Mac
- How do I rename both a Git local and remote branch name?
- How do I upgrade to Python 3.6 with conda?
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory
- Create Git branch with current changes
- pip or pip3 to install packages for Python 3?
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
- How to get the current branch name in Git?
- How to change default Python version?
- How do you create a remote Git branch?
- SocketException: Address already in use MONGODB
- Move the most recent commit(s) to a new branch with Git
- Why is the apt-get function not working in the terminal on Mac OS X v10.9 (Mavericks)?
- OS X: equivalent of Linux’s wget
- Failed to attach the USB device SEGGER J-Link [0100] to the virtual machine WINDOWS 7
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
- ImportError: No module named sklearn (Python)
- What’s a good hex editor/viewer for the Mac?
- Move the most recent commit(s) to a new branch with Git
- Where to find Application Loader app in Mac?
- Make an existing Git branch track a remote branch?
- How do I call git diff on the same file between 2 different local branches?
- OS X: equivalent of Linux’s wget
- How to get the current branch name in Git?
- How to switch Python versions in Terminal?
- How to change default Python version?
- How do you create a remote Git branch?
- Brew install docker does not include docker engine?
- What version of Python is on my Mac?
- brew install mysql on macOS
- How do you update Xcode on OSX to the latest version?
- Mongod complains that there is no /data/db folder
- How can I open the Atom editor from the command line in OS X?
- How to uninstall Docker completely from a Mac?
- How to easily install and uninstall docker on MacOs
- How to install wget in macOS?
- Maven Install on Mac OS X
- dyld: Library not loaded … Reason: Image not found
- How to install Java 8 on Mac
- editing PATH variable on mac
- Find (and kill) process locking port 3000 on Mac
- OS X Framework Library not loaded: ‘Image not found’
- Branch from a previous commit using Git
- keep getting “? Something is already running on port 3000” when I do npm start on react app
- How to update Ruby with Homebrew?
- Upgrade Node.js to the latest version on Mac OS
- Install Visual Studio 2015 on mac
- Not a valid object name: ‘master’
- Vim Can’t Save File (E212)