malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.24k stars 31 forks source link

Discard duplicate history entries #39

Closed dmitri-gb closed 4 years ago

dmitri-gb commented 4 years ago

Somewhat related to #38.

I find it often annoying that if I execute the same command multiple times (doesn't matter if I enter it manually every time, or select it from history using UP), Yori keeps all of them in history, so that if I suddenly want to execute some previous (different) command, I have to press UP a dozen times.

I think the easiest way to alleviate this would be to simply not add the executed command to history, if it is equal to the last command in history.

malxau commented 4 years ago

I pushed commit 0d3e0f32d710d6a5deabf85b7ffe787e59332909 for this.

dmitri-gb commented 4 years ago

Seems to work well. Thanks!

malxau commented 4 years ago

The original issue here has been fixed in the 1.30 release. Please reactivate this issue or file a new issue if there are further issues related to it.