rich icon indicating copy to clipboard operation
rich copied to clipboard

[REQUEST] add option to select() to return unprocessed keys

Open loot-midget opened this issue 2 months ago • 2 comments

NOTE: If a feature could be implemented in a third-party library, then it is unlikely to be accepted as part of the core library.

NOTE: Feature requests will not be considered unless first approved in discussions (https://github.com/textualize/rich/discussions)

Have you checked the issues for a similar suggestions? Yes. Found nothing on "filter"

How would you improve Rich?

I would like to implement filtering select()'s options by typing substring from keyboard.

By adding option to select() to return unprocessed keys (now they are swallowed) and wrapping select() with custom code.

What problem does it solve for you?

I like to filter long option lists fast - from keyboard not by pressing Up/Down/PageUp/PageDown.

MVP code and screencast attached.

https://github.com/user-attachments/assets/f358aa64-fd01-4e4d-9903-7729067bea11

select_with_filter.py

select_with_filter_test.py

loot-midget avatar Sep 22 '26 12:09 loot-midget

Oops, wrong project. I am sorry.

loot-midget avatar Sep 23 '26 09:09 loot-midget

I hope I helped!

Consider sponsoring my work on Rich. I give tech support for free, in addition to maintaining Rich and Textual.

If you like using Rich, you might also enjoy Textual.

Will McGugan

github-actions[bot] avatar Sep 23 '26 09:09 github-actions[bot]