How to make command similar to "git rebase -i"
<p>I'm trying to write a custom command for <code>git</code>. I want it to behave like <code>git rebase -i</code> where a file opens up in VIM and writing + quitting out of that file will trigger more code.</p>

<p>Example of what what I'm referring to</p>

<p>When you run <code>git rebase -i</code>, this file opens:</p>

<pre><code>noop

# Rebase 3ffddbe..3ffddbe onto 3ffddbe (1 command(s))
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
</code></pre>

<p>Normally there are commit hashes there and you can squash or whatever. I'd like something similar where I could run my custom <code>git edmund</code> command and it would open the results in a file.</p>

<p>So my goal is:</p>

<p>1) git edmund</p>

<p>2) edit the file that opens up. I want the contents to look like this (basically the result of <code>git log -n 3 --pretty=format:"%H %cN"</code>):</p>

<pre><code>3ffddbebbfb8eef48e69ca455628bd8b94f00eed Edmund
5ae79d3d7b0e8b33d0f3dcc366439e62e5703e1d Charlie
2063a5fce18972fee0bfa589ee2e2668f5a026f9 Kevin
</code></pre>

<p>3) run code that parses that file</p>