does linux have a "did you mean......" component for the command line like Google?

Owen Townend bowbowbow at optushome.com.au
Fri Nov 16 14:11:53 UTC 2007


On Fri, 2007-11-16 at 01:34 -0500, John Toliver wrote:
> You know how when you type something that may be misspelled and Google 
> comes back with "Did you mean this?" spelling properly what you were 
> trying to search for.  Can I install a package that lets me get to the 
> command I am looking for even  if I happen to mis a letter? For example 
> smbpaswd vs. smbpasswd.  Big difference when trying to get the system to 
> play nice in a windows network.
> 
> 

Hey,
  Try zsh, it has this feature as well as a host of others. The feature
is called 'Command Correction'.

This site should sell it for you:
http://friedcpu.wordpress.com/2007/07/24/zsh-the-last-shell-youll-ever-need/

An extract:
	Typo correction. How many times have you typed something 
	like aptg-et or other mangled commands? Well, if I do that 
	in zsh, I get a message asking: “zsh: correct 'aptg-et' to
	'apt-get' [nyae]? “. Magical, isn’t it? This autocorrect also 
	applies to any parameters or paths or filenames you type.

This one is a good setup guide:
http://www.gentoo.org/doc/en/zsh.xml

cheers,
Owen.





More information about the ubuntu-users mailing list