Created
June 18, 2014 01:31
-
-
Save chiastolite/c6daa0c2e035be9c9e35 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
function peco-git-log () { | |
if [ -d ".git" ]; then | |
local git_hash=$(git log --oneline | peco --query "$LBUFFER"|cut -d' ' -f1) | |
if [ -n "$git_hash" ]; then | |
BUFFER="git ${git_hash}" | |
fi | |
zle clear-screen | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment