command-not-found: Instruct to use 'packages'

Running 'packages install' wraps apt to run 'apt update' before
running 'apt install', so it should avoid the initial confusion
with 'apt install' not working for any packages.
This commit is contained in:
Fredrik Fornwall 2017-03-20 20:22:57 +01:00
parent 2565699009
commit 6ebd8dafa5

View File

@ -42,7 +42,7 @@ int main(int argc, char** argv) {
char const* binary_name = current_line + 1;
int distance = termux_levenshtein_distance(command_not_found, binary_name);
if (distance == 0 && strcmp(command_not_found, binary_name) == 0) {
printf("The program '%s' is not installed. Install it by executing:\n apt install %s\n", binary_name, current_package);
printf("The program '%s' is not installed. Install it by executing:\n packages install %s\n", binary_name, current_package);
return 127;
} else if (best_distance == distance) {
guesses_at_best_distance++;