irb icon indicating copy to clipboard operation
irb copied to clipboard

Remove duplicates from history + smart search result

Open log69 opened this issue 3 years ago • 0 comments

Hi, I believe it would greatly help productivity if history didn't show duplicate entries when hitting the up arrow on the keyboard.

Also, wouldn't it be possible to use the typed part of text for search when hitting the up arrow on the keyboard? That would be awesome. Especially if partial pattern matching would work for this, not only the beginning of text.

This latter could be made even smarter by storing the timestamp and number of uses for history entries and weighting the order of result to be shown for search. The weight could be based on how long time ago that entry was typed (t) and how frequently (n). And the order of priority when showing the result could be calculated with a score where the higher one is shown first, example for score:

log(n) - log(t)

This would be a very flexible scoring. I gladly help in the math if needed. This way the search results would be entirely adaptive and much smarter, helping productivity.

Thanks.

log69 avatar Mar 29 '22 06:03 log69