You can add simple Emacs-like keybindings by changing that into
$ echo 'rlwrap cat > "$@"' >editor
Or just learn ed:
$ GIT_EDITOR=ed git commit --amend -a
256
1c
stuff and more stuff
.
w
271
[master c5092a6] stuff and more stuff
Date: Thu Apr 6 12:58:18 2017 +0200
1 file changed, 1 insertion(+)
(the numbers are ed telling me how much was read and written; `1c` means change the first line; `.` means I'm done inserting (go back to command mode) and `w` means write/save; exit with ^D)
You can add simple Emacs-like keybindings by changing that into
Or just learn ed: (the numbers are ed telling me how much was read and written; `1c` means change the first line; `.` means I'm done inserting (go back to command mode) and `w` means write/save; exit with ^D)