Skip to content

Commit

Permalink
use nuenv from nu-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Jun 29, 2024
1 parent c72474c commit 0684d7a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .config/nushell/config.nu
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ $env.config = ($env.config? | default {} | merge {
}
})

use nu-hooks/nuenv/hook.nu [ "nuenv allow", "nuenv disallow" ]

$env.config.hooks = {
env_change: {
PWD: [
Expand All @@ -59,13 +61,7 @@ $env.config.hooks = {
use nu-hooks/toolkit.nu;
toolkit setup --name "tk" --color "yellow_bold"
)
{
condition: {|_, after| $after | path join '.env.nu' | path exists }
code: "
print $'[(ansi yellow_bold)hook(ansi reset)] loading env file'
source .env.nu
"
},
(use nu-hooks/nuenv/hook.nu; hook setup)
(source nu-hooks/direnv/config.nu)
{
condition: {|_, after| $after | path join 'dune-project' | path exists }
Expand Down

0 comments on commit 0684d7a

Please sign in to comment.