A place to share Nushell scripts with each other
Go to file
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
aliases Add eza aliases (#591) 2023-09-07 08:36:19 -05:00
assets move assets so they're more accessible (#445) 2023-04-12 08:29:47 -05:00
before_v0.60 move assets so they're more accessible (#445) 2023-04-12 08:29:47 -05:00
benchmarks Replace use of $nothing with null (#621) 2023-09-26 18:52:49 +02:00
custom-completions Replace use of $nothing with null (#621) 2023-09-26 18:52:49 +02:00
custom-menus move the extra menus of Nushell into custom-menus/extra/ (#550) 2023-07-21 10:44:27 +02:00
example-config export env is not in nushell (#529) 2023-06-17 07:48:08 -05:00
hooks update the direnv hook (#628) 2023-10-04 19:33:11 +02:00
make_release Replace use of $nothing with null (#621) 2023-09-26 18:52:49 +02:00
modules Add gnu wc wrapper (#625) 2023-09-30 17:14:19 -05:00
sourced Replace use of $nothing with null (#621) 2023-09-26 18:52:49 +02:00
stdlib-candidate add tests to str.nu (#627) 2023-10-02 19:12:08 +02:00
themes FEATURE: add catppuccin-mocha theme (#601) 2023-09-12 18:20:16 -05:00
.gitattributes Add Nushell Language detect for linguist (#532) 2023-06-21 11:36:01 +03:00
.gitignore update gitignore (#270) 2022-07-30 08:04:58 -05:00
LICENSE Initial commit 2021-01-23 07:33:45 +13:00
package.nuon add $.type to package.nuon (#582) 2023-09-10 13:24:05 +02:00
README.md Update README.md: typo (#545) 2023-07-05 10:39:08 -05:00

Nushell Scripts

This is a place to share Nushell scripts with each other. If you'd like to share your scripts, fork this repository, and create a PR that adds it to the repo.

Sections

Running Scripts

You can run nushell scripts in a few different ways.

  1. You can type nu <script name>.
  2. From with nushell, you can type source <script name> and if the script is just a bunch of commands it will run the script. If the script is a custom command it will load those custom commands into your current scope so you can run them like any other command.