Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| func linearSearch<T: Equatable>(array: [T], object: T) -> [Int] { | |
| let resultArray = array.indices.filter { (index) -> Bool in | |
| array[index] == object | |
| } | |
| return resultArray | |
| } |