diff --git a/users/daniel/configs/system/nushell/config.nu b/users/daniel/configs/system/nushell/config.nu index 0750c60..01af66c 100644 --- a/users/daniel/configs/system/nushell/config.nu +++ b/users/daniel/configs/system/nushell/config.nu @@ -282,7 +282,11 @@ let-env config = { hooks: { 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: [{ $nothing # replace with source code to run before the repl input is run