4 ms·
The tab completion isn't limited to the beginning of file names either. Useful when many of your file names start with the same pattern but then diverge. ls
by andrewstuart2 12y ago
The tab completion isn't limited to the beginning of file names either. Useful when many of your file names start with the same pattern but then diverge.
ls something<TAB>
will complete to
ls prefixSomething.sh
if it's unique enough. This is probably my single favorite zsh feature.
- taeric 12y agoHaving gotten used to ido in emacs, I must say that I am now disappointed in most all autocompletes. Shame it doesn't work in the shell. (Quick, someone prove me wrong! Please! :) )
- wging 12y agoI also love ido and I was made curious by your comment. Just found this. The top answer, unfortunately, is not really of ido quality and doesn't provide the same near-magical feeling: it only seems to do contiguous-substring matching. http://stackoverflow.com/questions/1112805/emacs-ido-style-shell http://stackoverflow.com/questions/1112805/emacs-ido-style-s... http://pgas.freeshell.org/shell/bash-ido http://pgas.freeshell.org/shell/bash-ido It also does not work in my zsh. Just trying to save others some time here.
- ash 12y agoHow does ido work? Is there any demo or a quick tutorial? (I don't use Emacs.)
- wging 12y agohttps://www.youtube.com/watch?v=AfZX39jd6cw#t=80s https://www.youtube.com/watch?v=AfZX39jd6cw#t=80s Ignore the first 1:20 or so, in which he configures things the slow way. The real magic of ido is the completion engine. It's not made super explicit in that video, but it's actually possible to complete on arbitrary subsequences of strings you want. With my configuration (using the popular "flx-ido" matching engine), if you wanted to match "README.md", you could achieve this by just typing ED. Even though E and D aren't consecutive, E appears before D. (But "GOOD_EDITING_SOFTWARE" would be matched before "README.md", because it prioritizes consecutive matches and characters at the beginnings of logical groups of characters.)
- pmoriarty 12y agoFor emacs M-x completion, I prefer smex.[1][2] It's like ido, but reorders the commands it presents to you in most-frequently-used order, which can be a real time-saver. [1] - http://www.emacswiki.org/emacs/Smex http://www.emacswiki.org/emacs/Smex [2] - https://github.com/nonsequitur/smex/ https://github.com/nonsequitur/smex/