Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| #!/bin/bash | |
| # From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
| # | |
| ARGS=2 | |
| E_BADARGS=99 | |
| if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
| then |
| // Either put this in a separate file that you only include in your macOS target | |
| // or wrap the code in #if os(macOS) / #endif | |
| import Cocoa | |
| // Step 1: Typealias UIImage to NSImage | |
| typealias UIImage = NSImage | |
| // Step 2: You might want to add these APIs that UIImage has but NSImage doesn't. | |
| extension NSImage { |