3

When I use bash in ubuntu and I type aa wrong command, it can guess for me, which correct common I could use:

bash:

haochen@ubuntu-dd:~$ aptget
No command 'aptget' found, did you mean:
 Command 'apt-get' from package 'apt' (main)

oh-my-zsh:

# haochen @ ubuntu-dd in ~ [9:13:14] C:100
$ aptget
zsh: command not found: aptget

Is there any settings that can enable this feature?

4
  • Remove OMZ: then Zsh will work correctly... – jasonwryan May 22 '17 at 1:25
  • 1
    @jasonwryan, any way to not remove omz? – How Chen May 22 '17 at 1:31
  • Why would you want to keep it? It turns a wonderful, modern shell into a bloated trainwreck. – jasonwryan May 22 '17 at 1:35
  • 1
    @jasonwryan, I just want to ask this question and get feedback – How Chen May 22 '17 at 6:58
3

Enable command-not-found plugin from oh-my-zsh

Refer to https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins

3
  • 1
    nice, fixed, I only need this plugin – How Chen May 22 '17 at 6:58
  • 2
    So wonderful it needs a plugin for a one-liner... – jasonwryan May 22 '17 at 7:05
  • This didn't work for me. – Turkeyphant Apr 27 '20 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.