Skip to content

Instantly share code, notes, and snippets.

@patorash
Created March 12, 2019 07:29
Show Gist options
  • Save patorash/c329567ad6a3c93866008876e66fc635 to your computer and use it in GitHub Desktop.
Save patorash/c329567ad6a3c93866008876e66fc635 to your computer and use it in GitHub Desktop.
historyから選択した文字列でgit commitのメッセージをセットする。
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