Created
March 12, 2019 07:29
-
-
Save patorash/c329567ad6a3c93866008876e66fc635 to your computer and use it in GitHub Desktop.
historyから選択した文字列でgit commitのメッセージをセットする。
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_commit --description="Select git commit message by history" | |
if set -q $argv | |
history | peco | read line | |
else | |
history | peco --query $argv | read line | |
end | |
if test -n "$line" | |
commandline "git commit -m \"$line\"" | |
end | |
set -e line | |
end | |
alias pgc "peco_git_commit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment