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:
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 rename a local Git branch?
- What is the best (and safest) way to merge a Git branch into master?
- Git fetch remote branch
- 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?
- Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
- No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS
- How to fetch all Git branches
- Xcode is not currently available from the Software Update server
- 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
- Update Git branches from master
- Create a branch in Git from another branch
- Updating Python on Mac
- 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
- 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)?
- 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)
- What’s a good hex editor/viewer for the Mac?
- Where to find Application Loader app in Mac?
- Make an existing Git branch track a remote branch?
- How do you create a remote Git branch?
- Brew install docker does not include docker engine?
- How can I open the Atom editor from the command line in OS X?
- 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
- Find (and kill) process locking port 3000 on Mac
- OS X Framework Library not loaded: ‘Image not found’
- Vim Can’t Save File (E212)
- Installing cgdb on a mac os x
- How can I install a previous version of Python 3 in macOS using homebrew?
- “code .” Not working in Command Line for Visual Studio Code on OSX/Mac
- How do I copy a version of a single file from one Git branch to another?
- Open an .html file with default browser using Bash on Mac
- adb command not found
- Move existing, uncommitted work to a new branch in Git
- How do I edit $PATH (.bash_profile) on OS X?
- OS X 10.9.2: checking whether the C compiler works… no
- matplotlib: RuntimeError: Python is not installed as a framework
- How do I push a local Git branch to master branch in the remote?
- psql: command not found Mac
- Python: source code string cannot contain null bytes
- Python can’t find module NLTK
- sed command with -i option failing on Mac, but works on Linux
- Making sure /usr/local/bin is in my $PATH on mac
- Why does cURL return error “(23) Failed writing body”?
- Command not found go — on Mac after installing Go
- cannot download, $GOPATH not set
- What is the difference between MacVim and regular Vim?
- Updating php version on mac
- Kill a python process
- How do I run git log to see changes only for a specific branch?
- How to create a local branch from an existing remote branch?
- Unmount the directory which is mounted by sshfs in Mac
- Failed to launch macOS app built in Xcode
- Testing web application on Mac/Safari when I don’t own a Mac
- How to completely uninstall Android Studio on Mac?
- Is there an equivalent of lsusb for OS X
- Where to find extensions installed folder for Google Chrome on Mac?
- How to create a new branch from a tag?
- hat’s a clean way to stop mongod on Mac OS X?
- Mongod: Command Not Found (OS X)
- how to update npm on macOS
- Unable to access MySQL after it automatically generated a temporary password
- No module named ipykernel_launcher