Fix nushell local env detection by using direnv export (#13902)

I don't intend fully on getting this merged, this is just an experiment
on using `direnv` directly without relying on shell-specific behaviours.
It works though, so this finally closes #8633
Release Notes:

- Fixed nushell not picking up `direnv` environments by directly
interfacing with it using `direnv export`

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
This commit is contained in:
Stanislav Alekseev
2024-07-12 10:29:32 +02:00
committed by GitHub
co-authored by Thorsten Ball
parent 9f5309cedd
commit 8abc000553
4 changed files with 90 additions and 3 deletions
+8
View File
@@ -546,6 +546,14 @@
// "delay_ms": 600
}
},
// Configuration for how direnv configuration should be loaded. May take 2 values:
// 1. Load direnv configuration through the shell hook, works for POSIX shells and fish.
// "direnv": "shell_hook"
// 2. Load direnv configuration using `direnv export json` directly.
// This can help with some shells that otherwise would not detect
// the direnv environment, such as nushell or elvish.
// "direnv": "direct"
"direnv": "shell_hook",
"inline_completions": {
// A list of globs representing files that inline completions should be disabled for.
"disabled_globs": [".env"]