55 points · by fouric · 11y ago · 27 comments
How is that more efficient than "tabtabbing" (hitting tab two times) to see possible completions? To me it seems less efficient to use up/down than hitting the few necessary keys to get the autocomplete you need.
That said, this is not for everyone; I anticipate it being useful for about 20% of *nix programmers in 90% of their file-opening cases. I just submitted it because (1) I thought that the style of the tool might be interesting to some and (2) that 20% might really enjoy and benefit from having this.
find ~/Documents -exec ls -l {} \; > ~/Documents/filelist.txt && grep "somefileiwant" ~/Documents/filelist.txt
Its all I've ever needed.Alternatively, if you really wanted to use find and grep together, there is no need for any file I/O. You can just use `find ~/Documents -exec ls -l {} + | grep somefileiwant`.
Lightning was built because I was tired of both the "cd x; ls; cd x; ls; cd x" and "cd x<tab>x<tab>/xx<tab>x<tab>" patterns and wanted something faster where all I had to do was hit the right keys and I would automagically get to my destination. It's less about finding files than it is about getting to them; in fact, I can imagine myself opening files found with the above method much faster with Lightning than I would using standard shell tools. But that might just be me.
ls -lh $(find ~/Documents | grep "somefileiwant")
It's all you should ever need. find ~/Documents -name somefile -lsPlus, you don't have to clutter your bash history with loads of 'i' commands (I know about HISTCONTROL=ignorespace and HISTIGNORE, but still).
I am considering adding in a fuzzy searching engine. However, because Lightning's primary mode (search mode) works by selecting on uniquely identifying substrings of filenames (the ones at the beginning in particular), a fuzzy search might make it more difficult to get a particular file because the algorithm would grab other filenames that you didn't want. I'll give it a try and see how it works.
The good thing about fuzzy search is that "ligy" would match "lightning-cd.py", and "ligs" would match "lightning-cd.lisp".
Does Midnight Commander? It's one of the features I have been missing on Linux.