Created
January 21, 2018 17:41
-
-
Save mvoropaiev/bf6b698603d0ec47682e1ec65d752b64 to your computer and use it in GitHub Desktop.
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
# iterm2 shell integration is required | |
it2toucbar_status() { | |
msg="${PWD##*/}" | |
branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) | |
[[ -n "$branch" ]] && msg+=": $branch" | |
echo "$msg" | |
} | |
[[ $PROMPT_COMMAND != *"it2toucbar_status"* ]] && PROMPT_COMMAND+='it2setkeylabel set status "$(it2toucbar_status)"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment