Add direnv to nu config
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user