martes, 22 de septiembre de 2009

zsh spell checking

I was talking to David about bash vs zsh features, and looking at the wikipedia page on comparison between shells We saw They only mentioned a couple (maybe 4) things where zsh is superior to bash.

One of the things that seem to make a very little difference (if any at all) is spell checking. Is it useful?

Well, the answer is: Definately!

If the next command outputs a zero, then you don't need this feature

history| grep 'ks\|,ale\|male\|gi\|' | grep -v "history" | wc -l

Otherwise, keep reading.

For short commands you don't use tab, you can misspell them and zsh guesses what you meant.

rgrau@ares [ ~ ] %,ake
zsh: correct ',ake' to 'make' [nyae]? y
make: *** No targets specified and no makefile found. Stop.
rgrau@ares [ ~ ]:2 %ks
zsh: correct 'ks' to 'ls' [nyae]? n
zsh: command not found: ks
rgrau@ares [ ~ ]:127 %
Great, If you ask me.

No hay comentarios: