5 ms·
Brains recently got underrated. The way mcfly works is cool, but it offloads your habits to some “neural network” that you can’t control. There is not many meth
by wruza 5y ago
Brains recently got underrated. The way mcfly works is cool, but it offloads your habits to some “neural network” that you can’t control. There is not many methods slower than looking at unpredictable line-by-line output and almost nothing more anxious than a possibility of false choice done without thinking. This tool basically replaces a deterministic mismatch with a non-deterministic one. Your brain is good at predicting the former (because it is a neural network connected to itself) and bad at the latter, because two neural substances rarely agree.
My guess is that author wanted history-search-{for,back}ward in their .inputrc for up-down keys but missed that somehow. The default history behavior is undoubtedly tedious. https://unix.stackexchange.com/a/20830 https://unix.stackexchange.com/a/20830
The only thing I’d do to history-search- is to show a list of variants (like in wildmode=list:longest or similar) instead of presenting them one by one. Pretty sure it is already possible.
- asicsp 5y ago>history-search-{for,back}ward in their .inputrc for up-down keys Once I found this, I rarely use Ctrl+R since most of the time I'm searching based on starting command name. If I'm using something a lot of times, it gets added as alias/function. I also maintain a file with commands that I think may be useful later, easier to search that compared to online search.
- wruza 5y agoa file with commands Yes! I have OBTF with all “devops/etc” stuff that is hard to remember once a quarter, with headers and explanations, and everything in select-paste ready format.
- pwm 5y agoI get a lot of milage out of alias h="history | fzy" alias f="fd | fzy"
- pdimitar 5y ago`fzf` can be combined with `find` (or `fd`) and then you can just press Ctrl-T and have a fuzzy searching prompt for all files in and under the current directory. It's super convenient.
- lambdaba 5y agofzf has a script you can source in your shell that binds to the usual keys and provides much more ergonomic history search
- agbell 5y agoAuthor here, thanks for reading. I totally agree that non-determinism is tricky. The big thing that got me to try McFly was the suggestions are path specific. I hear fish shell has this feature built in, but I havn't tried it out. I may be unique in this regard but the types of actions I do in one path are very different from those I do in others: working on my blog is very different from the types of things I do when working on code and it was nice to have history aware of this. I haven't actually used McFly a lot though, so I haven't quite seen if it going to become a permanent thing for me. The UI of using FZF for history is nicer, I just didn't like the suggested matches. You are right though, I don't have my arrow keys setup like this. I'll try that out as well. Thanks for the tip!