Created
July 22, 2019 00:58
-
-
Save JackyYin/1c39b3982e3cba141568d77f2a985e77 to your computer and use it in GitHub Desktop.
parse my git branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
parse_git_branch() { | |
git branch -a | sed -e "/^[^*]/d" -e "s/* \(.*\)/ $(echo '\033[1;31m')\1/" | |
} | |
echo $(parse_git_branch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment