mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-08-16 08:50:31 +03:00
A place to share Nushell scripts with each other
cf88c11509
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. ``` |
||
---|---|---|
.github/workflows | ||
aliases | ||
assets | ||
before_v0.60 | ||
benchmarks | ||
custom-completions | ||
custom-menus | ||
example-config | ||
make_release | ||
modules | ||
nu-hooks | ||
sourced | ||
stdlib-candidate | ||
themes | ||
.gitattributes | ||
.gitignore | ||
LICENSE | ||
README.md | ||
toolkit.nu |
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
- aliases
- benchmarks
- cool-oneliners
- custom-completions - collection of custom completions for external commands.
- custom-menus - collection of custom nushell menus
- example-config
- nu-hooks
- modules - This has its dedicated readme
- nu_101 - Beginner introduction to nushell concepts.
- prompt
- themes
Running Scripts
You can run nushell scripts in a few different ways.
- You can type
nu <script name>
. - 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.