Skip to content

Commit

Permalink
Merge branch 'dev/#9-refactor-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddanier committed Apr 13, 2024
2 parents 96053d8 + 7d6c5ab commit 26fb0d4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "nur"
description = "nur - a taskrunner based on nu shell"
version = "0.1.17"
version = "0.2.0"
rust-version = "1.77.2"
edition = "2021"
license = "MIT"
Expand Down
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,26 @@ def "nur hello" [] {

I recommend reading about [`nu` modules](https://www.nushell.sh/book/modules.html) in the official `nu` documentation.

### Provide `env.nu` and `config.nu` for project specific setup

Like [with `nu`](https://www.nushell.sh/book/configuration.html) you can have your own environment
and configuration files in `nur. Unline `nu` those don't live in your `$HOME` folder but can be put into the
project and as of this into version control. This also means you can have different configurations for
different projects.

`nur` will load those files if they exist:
* `.nur/env.nu` for the environment
* `.nur/config.nu` for the configuration

The recommended usage is to put environment changes like changes to `$env.NU_LIB_DIRS` into `env.nur`.
After this file was loaded those changes will already be active, allowing you to for example `source` or
`use` modules from additional paths. Then you may use the `config.nu` to add project specific, but global,
configuration.

See the [`nu` documentation on `env.nu` and `config.nu` files](https://www.nushell.sh/book/configuration.html#nushell-configuration-with-env-nu-and-config-nu)
for some more insights. You may use the [default variants of both files](https://github.com/ddanier/nur/tree/main/src/nu-scripts)
as the base to do any modifications.

### Advanced topics and further reading

You may also look into those `nu` topics:
Expand Down Expand Up @@ -418,10 +438,3 @@ decided for just "nur" as:
* `nur` is very fast to type (one less character 💪)
* `nur` is the reverse of `run`, which I like as a side effect 🥳
* and then as a nice and also weird side effect: You could translate "just" to "nur" in german 😂

## Warning / disclaimer

In its current state `nur` is more or less a **beta** software. I wanted to put it out there, so I may
receive some feedback. But I am only just starting using this in some production setup myself.
So feel free to poke around with this, but be aware this is far from being finished or anything.
Meaning: There might be dragons!

0 comments on commit 26fb0d4

Please sign in to comment.