A place to share Nushell scripts with each other
Go to file
Texas Toland cf88c11509
Refactor stdlib-candidate for nupm (#790)
Easier to review individual commits because of renames. Happy to provide
DiffNow links if helpful. Involved:

1. Moving scripts to a subdirectory
2. Copying `nupm.nuon` from another directory
3. Making modules work
4. Extracting tests
5. Fixing tests (related to nushell/nushell#12193)

To test first set up nupm then:

```console
nu_scripts on  std-nupm-integration
❯ $env.NUPM_REGISTRIES.nupm_test = 'https://raw.githubusercontent.com/texastoland/nupm/registry-std-rfc/registry.nuon'

nu_scripts on  std-nupm-integration
❯ nupm install std-rfc
╭──────────┬───────────────────────────────────────────╮
│ name     │ std-rfc                                   │
│ version  │ 0.1.0                                     │
│ url      │ https://github.com/texastoland/nu_scripts │
│ revision │ 65aa7cc                                   │
│ path     │ stdlib-candidate                          │
│ type     │ git                                       │
╰──────────┴───────────────────────────────────────────╯
Cloning into 'nu_scripts-4a047f13a05fe35393f3a8d73377b02c-65aa7cc'...
remote: Enumerating objects: 8015, done.
remote: Counting objects: 100% (822/822), done.
remote: Compressing objects: 100% (333/333), done.
remote: Total 8015 (delta 538), reused 641 (delta 445), pack-reused 7193
Receiving objects: 100% (8015/8015), 49.72 MiB | 23.12 MiB/s, done.
Resolving deltas: 100% (4605/4605), done.
Note: switching to '65aa7cc'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 65aa7cc Fix nupm test --dir stdlib-candidate
2024-03-12T20:42:49.462|INF|installing package std-rfc

nu_scripts on  std-nupm-integration took 4s
❯ use std-rfc set-env

nu_scripts on  std-nupm-integration
❯ set-env -h
Gracefully set an environment variable or merge a nested option.
...etc.

nu_scripts on  std-nupm-integration
❯ nupm test --dir stdlib-candidate
Testing package /Users/texas/Developer/nu_scripts/stdlib-candidate
tests record filter-name predicate ... SUCCESS
tests record filter-value predicate ... SUCCESS
tests record list_merge ... SUCCESS
tests str append ... SUCCESS
tests fs file bulk-rename ... SUCCESS
tests str prepend ... SUCCESS
tests record filter-name text ... SUCCESS
Ran 7 tests. 7 succeeded, 0 failed.
```
2024-03-16 13:57:05 +02:00
.github/workflows Refactor toolkit.nu (#791) 2024-03-15 19:17:31 +02:00
aliases Add chezmoi aliases (#788) 2024-03-12 10:55:37 -05:00
assets move assets so they're more accessible (#445) 2023-04-12 08:29:47 -05:00
before_v0.60 🐛 fix more parser errors (#783) 2024-03-15 21:10:27 -05:00
benchmarks fix removed commands (#645) 2023-10-19 19:35:23 +02:00
custom-completions 🐛 fix more parser errors (#783) 2024-03-15 21:10:27 -05: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
make_release Add option list-merged-pr --table (#774) 2024-03-07 06:19:29 -06:00
modules 🐛 fix more parser errors (#783) 2024-03-15 21:10:27 -05:00
nu-hooks rename package files (#701) 2024-02-18 16:23:47 +01:00
sourced 🐛 fix a couple of parser errors (#782) 2024-03-10 14:05:01 -05:00
stdlib-candidate Refactor stdlib-candidate for nupm (#790) 2024-03-16 13:57:05 +02:00
themes Support for catppuccin-latte (#741) 2024-03-07 06:18:50 -06:00
.gitattributes Add Nushell Language detect for linguist (#532) 2023-06-21 11:36:01 +03:00
.gitignore add a nu-check verification CI (#771) 2024-03-12 20:48:08 +01:00
LICENSE Initial commit 2021-01-23 07:33:45 +13:00
README.md 🐛 fix more parser errors (#783) 2024-03-15 21:10:27 -05:00
toolkit.nu Refactor toolkit.nu (#791) 2024-03-15 19:17:31 +02:00

Nushell Scripts

CI

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.