mycli icon indicating copy to clipboard operation
mycli copied to clipboard

Feature Request: Sort tab completion by frequency

Open simnim opened this issue 8 years ago • 6 comments

Not sure how easy this would be, but if sorting by frecency is possible then that'd really kick ass.

There are tab completion terms that always show up on top that I never use, and others that are in the middle that I always use. Having the tool remember what terms were most frecently used would improve user experience for databases with may schemas, tables, and columns. Off the top of my head, using an sqlite db in the users home dir could be a great way to store these terms. I haven't looked into any python frecency libraries, but a quick google search shows a few that look usable.

simnim avatar Feb 24 '17 16:02 simnim

See also this PR that implements the feature in pgcli.

j-bennet avatar Feb 24 '17 18:02 j-bennet

I vote for this.

zer09 avatar Mar 02 '17 14:03 zer09

After looking through the PR that implemented this feature in pgcli, it looks like it is possible but it'll take some elbow grease to get this done. Any volunteers to take this on? I'll be happy to pitch in if needed. 😄

/cc @johnksterling

amjith avatar Mar 03 '17 04:03 amjith

This sounds like a great idea. Here is another pgcli pull request that looks important for this: https://github.com/dbcli/pgcli/pull/425

tsroten avatar Mar 03 '17 04:03 tsroten

I'd like to give it a try.

j-bennet avatar Mar 03 '17 06:03 j-bennet

Awesome! Go forth and assign the issue to yourself. 😄

amjith avatar Mar 03 '17 06:03 amjith