joyent/node — pull request #3430 by VladimirTechMan (2012-06-13 17:42:45+00:00)
Title: Improvement to Readline: Re-use the last history item if exactly the same as the entered line

This is a small convenience improvement to the history mechanism of Readline: When the newly entered line is exactly the same as the last item stored in the history. Adding it once again is not very useful in practice, from my perspective (and from day-to-day experience with the node command prompt).

Indeed, if the user enters the same line several times in a row -- not an unusual thing when experimenting or debugging -- and then wants to find and re-use an earlier line from the history. Then scrolling through all the lastly repeated "dupes" of the very same command line does not add any convenience to the user experience and it makes it a little bit longer to find what is needed.