From eb55292a97c2b7cab8f4d9b87cbdaf044f633f19 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Wed, 4 Dec 2019 18:27:21 +0100 Subject: [PATCH] command-not-found: suggest nix-shell as well --- .../modules/programs/command-not-found/command-not-found.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/programs/command-not-found/command-not-found.pl b/nixos/modules/programs/command-not-found/command-not-found.pl index ab7aa204653cd..df895fa64ed63 100644 --- a/nixos/modules/programs/command-not-found/command-not-found.pl +++ b/nixos/modules/programs/command-not-found/command-not-found.pl @@ -7,6 +7,7 @@ use Config; my $program = $ARGV[0]; +my $quoted_command = '"' . shell_quote(@ARGV) . '"'; my $dbPath = "@dbPath@"; @@ -38,6 +39,9 @@ print STDERR <{package}\n" foreach @$res; + print STDERR "\nOr run it once with:\n"; + print STDERR " nix-shell -p $_->{package} --run $quoted_command\n" foreach @$res; } exit 127;