PSReadLine icon indicating copy to clipboard operation
PSReadLine copied to clipboard

Consider enhance the history searching in PSReadLine to use fuzzy-match algorithm as in fzf

Open daxian-dbw opened this issue 3 years ago • 2 comments

Prerequisites

  • [X] Write a descriptive title.

Description of the new feature/enhancement

Consider enhance the history searching in PSReadLine to use fuzzy-match algorithm as in fzf.

Proposed technical implementation details (optional)

The searching supported in fzf is more comprehensive. We don't need to support all of them, but replacing the current history searching with fuzzy-match algorithm would be nice.

daxian-dbw avatar Jun 06 '22 21:06 daxian-dbw

You might want to check https://github.com/kelleyma49/PSFzf for a reference of implementation. I've been using it for a while and it works quite well (used it all the time before the prediction feature came out).

thomazmoura avatar Sep 13 '22 02:09 thomazmoura

We don't want to wrap fzf, but want to implement the same fuzzy searching algorithm used in fzf. The fuzzy scorer in VSCode is another option: https://github.com/microsoft/vscode/blob/3fc3965c15b5e22014636a5be08f2cbdb7e05bec/src/vs/base/common/fuzzyScorer.ts#L25

daxian-dbw avatar Nov 07 '22 17:11 daxian-dbw