mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-10-05 17:48:11 +03:00
A place to share Nushell scripts with each other
ed9165fda1
related to - https://github.com/nushell/nushell/pull/10567 - https://github.com/nushell/nushell/pull/10668 - https://github.com/nushell/nushell/pull/10568 this PR removes mentions to removed commands from https://github.com/nushell/nushell/pull/10567, https://github.com/nushell/nushell/pull/10668 and https://github.com/nushell/nushell/pull/10568. the main change has been introduced with ```nushell sd 'random integer' 'random int' **/*.nu ``` running `rg "$nothing|random integer|to xml .* --pretty"` gives - before ``` modules/random-list/random-list.nu 85:# Generate a random integer list. 95: random integer $range modules/fun/wordle.nu 11: let word = ($words | get (random integer 0..($words | length)) | get column1) benchmarks/random-bytes.nu 5: | each { random integer } sourced/misc/password_generator/ReadMe.md 84:Obviously you can just use the `random chars` or `random integers` commands but I like to have words I can read in my passwords, and I think those generated by this script have sufficient entropy. sourced/misc/password_generator/nupass.nu 43: let random_numbers = (1..$words | par-each { |i| (random integer 0..99) } --threads $threads) 71: return (0..($words - 1) | each { |it| (random integer 0..99 | into string) + ($random_words | get $it) } | reduce { |it , acc| $acc + $it }) 92: | get (random integer 1..($numlines)) 99: let rint = (random integer 1..4) 119: | get (random integer 0..($symbolcharslen - 1)) ``` - after ``` modules/random-list/random-list.nu 85:# Generate a random integer list. sourced/misc/password_generator/ReadMe.md 84:Obviously you can just use the `random chars` or `random integers` commands but I like to have words I can read in my passwords, and I think those generated by this script have sufficient entropy. ``` |
||
---|---|---|
aliases | ||
assets | ||
before_v0.60 | ||
benchmarks | ||
custom-completions | ||
custom-menus | ||
example-config | ||
hooks | ||
make_release | ||
modules | ||
sourced | ||
stdlib-candidate | ||
themes | ||
.gitattributes | ||
.gitignore | ||
LICENSE | ||
package.nuon | ||
README.md |
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
- 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.