Skip to content

Commit 32baeb7

Browse files
authored
Added std-rfc README with installation instructions (#1030)
Includes a `README.md` for the `std-rfc` modules with information on how to checkout *just* `std-rfc` from the repo.
1 parent bab7845 commit 32baeb7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

stdlib-candidate/std-rfc/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
`std-rfc` is the root directory for modules and commands under consideration for the Nushell [Standard Library](https://www.nushell.sh/book/standard_library.html).
2+
3+
As a part of the the larger nu_scripts mono-repo, users may find it more convenient (and efficient) to checkout `std-rfc` separately.
4+
5+
This can be done in Nushell using:
6+
7+
```nushell
8+
let spec = {
9+
repo: 'https://github.com/nushell/nu_scripts'
10+
sparse_dir: 'stdlib-candidate/std-rfc'
11+
branch: 'main'
12+
}
13+
14+
# Change to the parent directory location before running
15+
let install_dir = './nu_scripts'
16+
17+
mkdir $install_dir
18+
git -C $install_dir init
19+
git -C $install_dir remote add origin $spec.repo
20+
git -C $install_dir sparse-checkout set --no-cone --sparse-index $spec.sparse_dir
21+
git -C $install_dir fetch --depth 1 --filter=blob:none origin $spec.branch
22+
git -C $install_dir checkout $spec.branch
23+
```
24+
25+
Then imported using:
26+
27+
```nushell
28+
use ./nu_scripts/stdlib-candidate/std-rfc/<module>
29+
# or
30+
use ./nu_scripts/stdlib-candidate/std-rfc/<module> *
31+
```
32+
33+
A sparse git checkout like the one above requires the full parent path from the repository, but you can symlink the `std-rfc` directory to a more convenient location if you prefer.

0 commit comments

Comments
 (0)