Commit d7adaf9
authored
Fix $env.PATH for direnv (#1083)
While using direnv with nushell, I noticed that my autocompletion for
external programs stopped working as soon as I entered a directory and
direnv loaded.
Turns out, direnv exports $PATH as a string, and nushell stores $PATH as
a table and expects it to be one. Worse, nu just silently fails any
operations with the $PATH (except for running programs) instead of
reporting an error.
This PR fixes that by adding a line in the direnv config.nu script that
parses that string into the appropriate table.
Testing it on my system (NixOS, nushell, direnv + lorri) it seems to
work perfectly fine and the $PATH works again.1 parent b7869a8 commit d7adaf9
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
0 commit comments