Add direnv to nu config

This commit is contained in:
2022-12-03 20:46:41 +00:00
parent 6b97acda78
commit 9fe3051c09

View File

@@ -282,7 +282,11 @@ let-env config = {
hooks: { hooks: {
pre_prompt: [{ pre_prompt: [{
$nothing # replace with source code to run before the prompt is shown code: "
let direnv = (direnv export json | from json)
let direnv = if ($direnv | length) == 1 { $direnv } else { {} }
$direnv | load-env
"
}] }]
pre_execution: [{ pre_execution: [{
$nothing # replace with source code to run before the repl input is run $nothing # replace with source code to run before the repl input is run