Hacker News new | ask | show | jobs
by grannyg00se 5128 days ago
"You type something in, and the machine either executes your command, or goes “I have no clue what you just said, did you by any chance mean XYZ?”"

What sort of wizardry is this? My shell (BASH) does not say "did you by any chance mean XYZ?" It stops after saying "I have no clue what you just said" and then stares at me like I'm an idiot.

3 comments

>What sort of wizardry is this?

  [Redacted]@[Redacted]:~$ nncat
  No command 'nncat' found, did you mean:
   Command 'sncat' from package 'sn' (universe)
   Command 'ncat' from package 'nmap' (main)
   Command 'uncat' from package 'socklog' (universe)
  nncat: command not found
Zsh has an autocorrect feature that suggests different spellings of your command if it can't find anything exactly matching it. I'm sure that I recall hearing of similar functionality available for bash, too.

Also, recent versions of Ubuntu include shell aliases that will search for packages related to missing commands. I'm sure that if you don't use Ubuntu, you could rip this functionality out and port it to whatever packaging system you use.

Have you considered zsh? Much better autocomplete options available (and enabled by default).