ruby / ruby/irb

Remove duplicates from history + smart search result

Open
#355 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
478
Forks
158
Avg merge
1d 12h
Merged PRs (30d)
12

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies the keyboard up-arrow history and search behavior, but names no files, tests, or implementation entry points. First clarify whether duplicate removal, typed-text matching, partial matching, and adaptive weighting are all in scope; done should be defined as an agreed set of behaviors with tests for each one.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.