Created
August 5, 2014 10:04
-
-
Save zunda/c7c96d083970258b16fa to your computer and use it in GitHub Desktop.
OSXでプロンプトを表示するたびにGItブランチ名をしゃべる。うるさいし遅い。
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
--- git-prompt.sh.orig 2014-08-04 23:48:33.000000000 -1000 | |
+++ git-prompt.sh 2014-08-05 00:02:38.000000000 -1000 | |
@@ -439,7 +439,8 @@ | |
fi | |
local f="$w$i$s$u" | |
- local gitstring="$c${b##refs/heads/}${f:+$z$f}$r$p" | |
+ local branchname=${b##refs/heads/} | |
+ local gitstring="$c$branchname${f:+$z$f}$r$p" | |
if [ $pcmode = yes ]; then | |
if [ "${__git_printf_supports_v-}" != yes ]; then | |
@@ -451,4 +452,5 @@ | |
else | |
printf -- "$printf_format" "$gitstring" | |
fi | |
+ say $branchname & | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rcファイルの中だと?関数定義の中だと?バックグラウンドに持っていく「&」が効かないようだ