Adding Git and Docker Machine Awareness to OS X
In this post I’m going to share how to add some Git and Docker Machine “awareness” to your OS X Bash prompt. This isn’t anything new; these tricks are things that Bash users have been employing for years, especially on Linux. For most OS X users, though, I think these are tricks/tools that aren’t particularly well-known so I wanted to share them here.
I’ll divide this post into two sections:
- Adding Git awareness to your Bash prompt
- Adding Docker Machine awareness to your Bash prompt
Please note that I’ve only tested these on El Capitan (OS X 10.11), but it should work similarly for most recent versions of OS X.
Before I get started, allow me to explain what I mean by “awareness”:
- For Git, it’s the ability to show the currently checked-out Git branch in your Bash prompt as well as tab completion for Git commands, branches, and remotes.
- For Docker Machine, it’s the ability to show the currently-active machine (made active via
eval $(docker-machine env <name>)) in your Bash prompt as well as tab completion for most Docker Machine commands and machines.
Ready? Let’s get started!
Adding Git Awareness to your Bash Prompt
To add some Continue reading

There were big personnel changes at Cisco and Cumulus.

Register for SDxCentrals first ever Future of the Converged Data Center Report Webinar sponsored by Big Switch Networks on April 6th at 10:00am PT.