function get_repo_name() { if git rev-parse — git-dir > /dev/null 2>&1; then : basename `git rev-parse — show-toplevel` 2>&1 /dev/null else : pwd fi } PROMPT_COMMAND=’echo -ne “\033]0;$(get_repo_name)\007”’Very helpful when having many tabs open on while developing cool shit!
No comments:
Post a Comment