mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-09-11 13:45:56 +03:00
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 😌 |
||
---|---|---|
.. | ||
command_not_found | ||
direnv | ||
dynamic-load | ||
filesystem | ||
rusty-paths |