nu: Have the command not found hook output modern nix

This commit is contained in:
Erwin Boskma 2023-07-04 20:25:47 +02:00
parent ffa37b9b3e
commit b4c9ed1297
Signed by: erwin
SSH key fingerprint: SHA256:9LmFDe1C6jSrEyqxxvX8NtJBmcbB105XoqyUZF092bg

View file

@ -227,7 +227,7 @@ let-env config = {
if ($candidates | is-empty) { if ($candidates | is-empty) {
return null return null
} }
let packages = ($candidates | each {|pkg| $"\tnix-shell -p ($pkg.package)" } | str join "\n") let packages = ($candidates | each {|pkg| $"\tnix shell nixpkgs#($pkg.package)" } | str join "\n")
let multiple = if ($candidates | length) > 1 { " one of the following" } else { "" } let multiple = if ($candidates | length) > 1 { " one of the following" } else { "" }
( (
$"The program (ansi $env.config.color_config.shape_external)($cmdname)(ansi reset) " + $"The program (ansi $env.config.color_config.shape_external)($cmdname)(ansi reset) " +