aboutsummaryrefslogtreecommitdiffstats
path: root/commands/history.go
Commit message (Collapse)AuthorAgeFilesLines
* xdg: get rid of deprecated dependenciesRobin Jarry2023-08-271-4/+3
| | | | | | | | | | | github.com/mitchellh/go-homedir has not received any update since 2019. The last release of github.com/kyoh86/xdg was in 2020 and it has been marked as deprecated by its author. Replace these with internal functions. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
* logging: rename package to logRobin Jarry2022-12-021-2/+2
| | | | | | | | | | Use the same name than the builtin "log" package. That way, we do not risk logging in the wrong place. Suggested-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* history: store command history in a fileMoritz Poldrack2022-09-141-0/+77
| | | | | | | | | | | | | | | 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>
* history: don't store duplicate entriesMoritz Poldrack2022-09-141-1/+3
| | | | | | Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* Add command history and cyclingGalen Abell2019-07-261-0/+62
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.