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: Always return an error #566

Merged
merged 1 commit into from
Nov 27, 2016
Merged

Conversation

anisse
Copy link
Contributor

@anisse anisse commented Nov 27, 2016

Fixes #564

@fornwall
Copy link
Member

Nice! Could you change the return code to 127 in both instances? 127 historically means command not found and seems to be what command-not-found on debian/ubuntu returns, so nice to be compatible!

@anisse
Copy link
Contributor Author

anisse commented Nov 27, 2016

Done.

@fornwall fornwall merged commit 9f05726 into termux:master Nov 27, 2016
@fornwall
Copy link
Member

Thanks! The update command-not-found package (version 1.15) is now available for installation from the apt repository.

@Neo-Oli
Copy link
Member

Neo-Oli commented Nov 28, 2016

This has caused zsh output to change from:

The program 'sl' is not installed. Install it by executing:
 apt install sl

to

The program 'sl' is not installed. Install it by executing:
 apt install sl
zsh: command not found: sl

fornwall added a commit that referenced this pull request Nov 28, 2016
"The function should return status zero if it successfully handled
the command, or non-zero status if it failed. In the latter case
the standard handling is applied: ‘command not found’ is printed
to standard error and the shell exits with status 127."
- http://zsh.sourceforge.net/Doc/Release/Command-Execution.html

Needed after changes in
#566
where the command-not-found program no longer exists itself with 0.
@fornwall
Copy link
Member

@Neo-Oli Thanks, fixed in the 5.2.0-5 update of the zsh package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants