Autocomplete function in ZSH

It amazes me how smart tab completion with zsh sometimes is!
Check out the content of the following directory:

I wanted to remove everything except readme.install and PKGBUILD. So I started typing:

I hit the TAB key and it auto completes to:

Now here comes the interesting part: I continue to type:

and I hit the TAB key again. This is what happens:

Nice! What happens is that zsh recognizes checkip is already in the arguments list and automatically selects the next file in the list.

I checked to see if bash does this too, but alas it doesn’t.

If you want to get started with zsh, make sure to checkout oh-my-zsh: https://github.com/robbyrussell/oh-my-zsh

Get the logo as a sticker here: http://www.unixstickers.com/stickers/software_stickers/zsh-terminal-shell-shaped-sticker

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">