From 32baeb7995bd0f8d37e8887668e71c91cc1c801e Mon Sep 17 00:00:00 2001 From: Douglas <32344964+NotTheDr01ds@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:19:04 -0500 Subject: [PATCH] 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. --- stdlib-candidate/std-rfc/README.md | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 stdlib-candidate/std-rfc/README.md diff --git a/stdlib-candidate/std-rfc/README.md b/stdlib-candidate/std-rfc/README.md new file mode 100644 index 0000000..ec854d7 --- /dev/null +++ b/stdlib-candidate/std-rfc/README.md @@ -0,0 +1,33 @@ +`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). + +As a part of the the larger nu_scripts mono-repo, users may find it more convenient (and efficient) to checkout `std-rfc` separately. + +This can be done in Nushell using: + +```nushell +let spec = { + repo: 'https://github.com/nushell/nu_scripts' + sparse_dir: 'stdlib-candidate/std-rfc' + branch: 'main' +} + +# Change to the parent directory location before running +let install_dir = './nu_scripts' + +mkdir $install_dir +git -C $install_dir init +git -C $install_dir remote add origin $spec.repo +git -C $install_dir sparse-checkout set --no-cone --sparse-index $spec.sparse_dir +git -C $install_dir fetch --depth 1 --filter=blob:none origin $spec.branch +git -C $install_dir checkout $spec.branch +``` + +Then imported using: + +```nushell +use ./nu_scripts/stdlib-candidate/std-rfc/ +# or +use ./nu_scripts/stdlib-candidate/std-rfc/ * +``` + +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.