Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command-not-found plugin has strange behavior with unrecognized commands #8026

Closed
nicolas-van opened this issue Jul 22, 2019 · 3 comments
Closed
Labels
Bug Something isn't working Resolution: not our issue Issue or pull request not related to Oh My Zsh

Comments

@nicolas-van
Copy link

Describe the bug
I'm on Ubuntu 18.04 freshly installed with zsh and latest version of oh-my-zsh. I activated the command-not-found plugin.

When I type a command for a program that is not installed everything performs normally:

 ✘ xxx  ~  ksh

Command 'ksh' not found, but can be installed with:

sudo apt install ksh 
sudo apt install mksh

Same thing if I type a command that looks like a known command:

 ✘ xxx  ~  ksb

Command 'ksb' not found, did you mean:

  command 'k3b' from deb k3b
  command 'sb' from deb lrzsz
  command 'kgb' from deb kgb
  command 'kdb' from deb elektra-bin
  command 'ksu' from deb heimdal-clients
  command 'ksu' from deb krb5-user
  command 'msb' from deb mysql-sandbox
  command 'ksh' from deb ksh
  command 'ksh' from deb mksh

Try: sudo apt install <deb name>

But when I type something totally unrelated to a known command it displays nothing at all:

 ✘ xxx  ~  hahahaha
 ✘ xxx  ~  

To Reproduce
On ubuntu, try to activate the command-not-found plugin and type an unknown command (like hahahaha in my example).

Expected behavior
Something more similar to a vanilla bash on ubuntu:

xxx:~$ hahahaha
hahahaha: command not found
xxx:~$

Screenshots or recordings

System:

  • OS: Ubuntu 18.04
  • Zsh version 5.4.2
  • Terminal emulator 'Terminal' application on Ubuntu

Additional context

@nicolas-van nicolas-van added the Bug Something isn't working label Jul 22, 2019
@redtux
Copy link

redtux commented Jul 22, 2019

I can confirm this. If I type oc for the Openshift CLI e.g. (which has no deb or snap package), I get no info at all… (I have always considered this to be a "feature" or rather an intended behavior. 😃)

@nicolas-van
Copy link
Author

I doubt it was intended. If it's the case it's totally not ergonomic as it makes you think that the command was executed properly (and that it produced no output).

@mcornella
Copy link
Member

This is an old bug in the ubuntu package. Track it here https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1766068

@mcornella mcornella added the Resolution: not our issue Issue or pull request not related to Oh My Zsh label Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Resolution: not our issue Issue or pull request not related to Oh My Zsh
Projects
None yet
Development

No branches or pull requests

3 participants