mirror of
https://github.com/Rigellute/spotify-tui.git
synced 2026-04-26 16:15:55 +03:00
[GH-ISSUE #727] [Feature Request] Search history and reverse search #291
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-tui#291
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jayache80 on GitHub (Jan 27, 2021).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/727
I find myself listening to things over and over and over, and don't like to type the full artist/album/song/whatever each time.
It would be great if all the Search Input entries that are made were stored in a history file, perhaps:
similar to how
bashwill store previous command line entries in the$HISTFILEfile.Then, listen for Ctrl+R in the Search Input box and reverse search your previous Search Input entries. This way you could type a few characters and quickly repeat a previous search. Similarly Ctrl+P (or ↑) and Ctrl+N (or ↓) would traverse up and down the history as you'd expect.
@jayache80 commented on GitHub (Feb 19, 2021):
I started working on this but it was getting more and more hacky. What are the thoughts on bringing in a bona fide readline library, like rustyline?
@jayache80 commented on GitHub (Feb 20, 2021):
On second thought, after trying a few examples, I see the difficulties in combining tui-rs and rustyline. Until some sort of readline paradigm is established upstream in the tui-rs user input widget, it seems the best way is to implement more "pseudo-readline" features in handlers/input.rs as the codebase is already doing.
I have something working and I'll submit a pull-request soon.