Created
August 9, 2022 09:23
-
-
Save csrutil/beedcd1793cebfe73082397a79cb34df to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| display_current_dir() { | |
| if [ -d .git ]; then | |
| tip=$(git rev-parse --abbrev-ref HEAD) | |
| else | |
| tip=$(pwd) | |
| fi | |
| printf "\e]1337;SetBadgeFormat=%s\a" $(echo -ne "${tip##*/}\007" | base64) | |
| } | |
| precmd() {display_current_dir} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment