Skip to content

Instantly share code, notes, and snippets.

@patorash
Created March 12, 2019 07:29
Show Gist options
  • Select an option

  • Save patorash/c329567ad6a3c93866008876e66fc635 to your computer and use it in GitHub Desktop.

Select an option

Save patorash/c329567ad6a3c93866008876e66fc635 to your computer and use it in GitHub Desktop.

Revisions

  1. patorash created this gist Mar 12, 2019.
    12 changes: 12 additions & 0 deletions peco_git_commit.fish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    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"