Single-purpose text editor designed to quickly enter short commit messages.
Write one line commit message in a Readline prompt.
Enter to save and close or
Ctrl+B to fall back to a full-featured text editor.
$ se c olme.ace
With git it's suggested to set up olme in ~/.gitconfig like
[core]
editor = olme --git-history --auto-fallback
--git-history loads recent git commit messages
to readline history (browsed by up/down arrow keys).
In addition to git, olme provides similar support for Mercurial
(--hg-history)
and for a shell command providing the history entries
(e.g. --history "tail ~/.bash_history").
--auto-fallback skips the olme prompt and immediately runs
the fallback editor if the edited file has more than one
non-empty line.
(Lines beginning with the shell comment sign # are considered empty.)
is looked for in this order:
- value of the
-foption - value of the
VISUALenvironment variable - value of the
EDITORenvironment variable
If none is provided and the fallback action is triggered, the program exits with an error message and exit code 1.
olme uses GNU Readline for the input prompt,
so the standard Readline key bindings,
familiar from the shell and elsewhere, are available.
Custom key bindings
can be configured in ~/.inputrc.
olme defines a single custom command, named fallback-editor,
which closes the simple input prompt and runs the fallback editor.
A custom key binding can be configured like this:
$if olme
Control-x: fallback-editor
$endifFor most commit messages running an editor like vim -
or typing out a command line option with a quoted argument -m "The message" -
is too much of a ceremony.
Text editor filling the whole terminal window is too much of a disturbance
of my terminal flow.
A simple prompt for a single line, editing finished by a single hit
of the Enter key - that's my idea of writing a commit message.
As a bonus olme offers (with the --git-history option)
a history of recent commit messages for reuse.
GNU GPL v3