readline icon indicating copy to clipboard operation
readline copied to clipboard

feature suggestion: do not repeat entries in the history

Open knz opened this issue 7 years ago • 1 comments

Suggested here: https://forum.cockroachlabs.com/t/cli-identical-command-question/560

"""when using the CLI, i noticed that if i keep doing the same command (via up arrow) over and over again such as: SELECT * FROM cockroachIsTotallyAsesome WHERE TRUE; that command seems to be saved in the command-line-recall buffer over and over again, even though each one is identical.

is there any way to suppress this behavior of saving identical contiguous commands? linux and mariadb don't seem to do this."""

Also my own addition to this suggestion would be, if a newly added entry is identical to an earlier entry, then remove the earlier entry entirely from the history and add the new occurrence at the top of the stack. This ensures that history navigation with Ctrl+R does not see the same entry repeated multiple times.

knz avatar Apr 17 '17 11:04 knz

i would like to be kept informed about this question.

edwardsmarkf avatar Apr 18 '17 19:04 edwardsmarkf