{"blog_title":"cooldaemon\u306e\u5099\u5fd8\u9332","provider_name":"Hatena Blog","url":"https://cooldaemon.hatenadiary.org/entry/20080516/1210909583","height":"190","author_name":"cooldaemon","categories":["git","zsh"],"image_url":null,"version":"1.0","author_url":"https://blog.hatena.ne.jp/cooldaemon/","description":"\u4e0b\u8a18\u3092\u53c2\u8003\u306b\u3001\u81ea\u5206\u306a\u308a\u306b\u3084\u3063\u3066\u307f\u305f\u3093\u3060\u3051\u3069\u30fb\u30fb\u30fb show current git branch on zsh prompt (2) - Bart's Blog function git_branch() { local git_dir branch git_dir=$(git rev-parse --git-dir 2> /dev/null) || return if test -d \"$git_dir/../.dotest\"; then branch=\"$(git symbolic-ref HEAD 2>/dev/null)\" elif test -f \"$git_dir/.dotest-\u2026","type":"rich","provider_url":"https://hatena.blog","published":"2008-05-16 12:46:23","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcooldaemon.hatenadiary.org%2Fentry%2F20080516%2F1210909583\" title=\"\u5de6\u30d7\u30ed\u30f3\u30d7\u30c8\u306b git \u306e\u30d6\u30e9\u30f3\u30c1\u3068\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u3001\u53f3\u30d7\u30ed\u30f3\u30d7\u30c8\u306b git \u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u305d\u308c\u4ee5\u5916\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u8272\u5206\u3051\u3057\u3066\u8868\u793a - cooldaemon\u306e\u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"\u5de6\u30d7\u30ed\u30f3\u30d7\u30c8\u306b git \u306e\u30d6\u30e9\u30f3\u30c1\u3068\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u3001\u53f3\u30d7\u30ed\u30f3\u30d7\u30c8\u306b git \u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u305d\u308c\u4ee5\u5916\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u8272\u5206\u3051\u3057\u3066\u8868\u793a","width":"100%","blog_url":"https://cooldaemon.hatenadiary.org/"}