Commit graph

3 commits

Author SHA1 Message Date
Moritz Poldrack
ef99ec17d6 history: store command history in a file
Losing your progress in case of a crash, or when accidentally closing
aerc is annoying and costs time. This can be drastically reduced by
keeping a persistent history.

Write commands to XDG_CACHE_DIR/aerc/histfile when they are run and load
them when needed. If another instance of aerc is already writing the
file, fall back to the current model, where the history is kept in
memory.

Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
2022-09-14 20:51:51 +02:00
Moritz Poldrack
9c11ab21c7 history: don't store duplicate entries
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-09-14 20:51:41 +02:00
Galen Abell
8635c70fda Add command history and cycling
Aerc will keep track of the previous 1000 commands, which the user can
cycle through using the arrow keys while in the ex-line. Pressing up
will move backwards in history while pressing down will move forward.
2019-07-26 14:29:34 -04:00