nu_scripts/hooks
Antoine Stevan 1019cca060
update the direnv hook (#628)
i wanted to install and run `direnv` with Nushell, came accross this
hook and thought i could update it a bit 😋


## changelog
- make `config.nu` possible to `source` => it will add the hook to the
list of hooks, without overwriting
- will run the hook on environment change thank to
`$env.config.hooks.env_change.PWD` instead of
`$env.config.hooks.pre_prompt` => i think this is the most controversial
change, we can discuss that of course
- checks if `direnv` is in the `PATH` before running the rest of the
hook
- uses a oneliner with `default` to load the environment
- uses directly a closure instead of string
- the comments were out of date, so i removed them

i tested this before and after and i think this works just as before
😌
2023-10-04 19:33:11 +02:00
..
command_not_found add a "command not found" hook (#526) 2023-06-08 21:17:54 -05:00
direnv update the direnv hook (#628) 2023-10-04 19:33:11 +02:00
dynamic-load Replace use of $nothing with null (#621) 2023-09-26 18:52:49 +02:00
filesystem Replace use of $nothing with null (#621) 2023-09-26 18:52:49 +02:00
rusty-paths feat(hooks): add rusty-paths.nu (#596) 2023-09-10 10:40:59 +02:00