mcfly
                                
                                 mcfly copied to clipboard
                                
                                    mcfly copied to clipboard
                            
                            
                            
                        how to get the most recent match ?
Hi, Thanks for this nice software.
Quite often, I want to recall a command I typed a few minutes ago (e.g. "git commit ..."), but mcfly proposes some much more older matching commands. I understand that it is due to its algorithm, but I'd like to force it to output the matches ordered by "recentness". Is that possible ? Otherwise would it be possible to add a shortcut that will reorder the matches by recentness ?
Karl
Hey @kforner, I'm glad you like it!
I think that's a good idea-- I've been wanting that too. I usually just hit the up arrow in the terminal to get to commands within my most recent ~10 commands, but it would be nice if there was a function key to switch McFly into recency mode. Any interest in working on this?
Any interest in working on this?
I really don't have the time, and I never used rust so the time to get started is just too high.
Do you have the date of the command saved in your history ?
Yes, all the time data is stored, so the work would be in making a new view in the UI.
I think it's a good idea-- hopefully I, or another user, will have time to add it.
instead you could switch to the regular bash search mechanism, e.g. typing again CTRL+R would switch to the bash search. Or remapping the standard bash search on another shortcut ?
I think switching back to the default on-the-fly would be hard. I'm not sure how you'd configure bash to do that.
I have been thinking about this as I often find the top results are things that I did many times a while ago, but are no longer relevant - for example pushing a specific git remote/branch combo.
I was wondering about a couple of options:
- We could tune the algorithm to be favor more recent results a bit more.
- More simply, perhaps we could just push the most recent match (or two) as the top result in the listing.
Thoughts?
I also feel the same here. I really like the usability and the look and feel of the tool. My approach would be to disable the "smart" search by folder.
I would like you to show me the recent commands and folders that I don't work on so much I would leave the tool's default behaviour in the folders that I'm constantly working on.