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;