This PR is part of porting all old scripts #221 and includes a set of
modules:
- `data_extraction`
- `examples`
- `duplicates`
## 7 changed files:
### `data_extraction`
- `data_extraction/ultimate_extractor.nu`: removed. Has already been
ported to `modules/data_extraction/ultimate_extractor.nu`
### `duplicates`
- `duplicates/duplicates.nu` -> `modules/duplicates/duplicates.nu`
- `duplicates/example.nu` -> `modules/duplicates/example.nu`
- `duplicates/README.md` -> `modules/duplicates/README.md`: unchanged
### `examples`
- `examples/netstat.nu` -> `modules/examples/netstat.nu`
- `examples/date_in_local_timezones.nu` ->
`modules/examples/date_in_local_timezones.nu`
- `befove_v0.60/assets/core_team.nu`: removed. This table has been
embedded into `date_in_local_timezones.nu`
This PR is part of porting all old scripts #221 and includes a set of
modules:
- fuzzy -> `modules/fuzzy/fuzzy_command_search.nu`
- ls-mods -> `modules/ls-mods`: `ls-less.nu`, `ls-wide.nu` and
`ls-wide-with-color.nu`
- nu_101 -> `modules/nu_101`: `nothing.nu` and `inner_outer_loop.nu`
Edit: `fuzzy` and `nu_101` have been moved to `sourced`
This PR is part of porting all old scripts #221 and ports `fun` folder
<details><summary>Summary</summary>
### star.nu
```yaml
from: before_v0.60/fun/star.nu
to: modules/fun/star.nu
```
### spark.nu
The script has already been ported. I've removed old version.
```yaml
from: before_v0.60/fun/spark.nu
to: sourced/fun/spark.nu
functions:
spark: sourced/fun/spark.nu:1:spark
```
### life.nu
```yaml
from: before_v0.60/fun/life.nu
to: modules/fun/life.nu
```
### lisp_mode.nu
There is a problem with this module because `-` is not allowed in names
anymore, however `def "-"` is a valid syntax, but you will be unable to
call this function.
```yaml
from: before_v0.60/fun/lisp_mode.nu
to: sourced/fun/lisp_mode.nu
```
### nyancat.nu
I also fixed animation frames from https://github.com/klange/nyancat
```yaml
from: before_v0.60/fun/nyancat.nu
to: modules/fun/nyancat.nu
```
</details>
This PR is part of porting all old scripts #221 and ports
`cool_oneliners` folder
## Summary
### dict.nu
This script has already been ported to `sourced/cool_oneliners/dict.nu`
in
28c7e097db
```yaml
from: before_v0.60/cool_oneliners/dict.nu
to: sourced/cool-oneliners/dict.nu
functions:
dict: sourced/cool-oneliners/dict.nu:2:dict
```
### file_cat.nu
has already been ported to `sourced/cool_oneliners/file_cat.nu` in
c47ccd42b8
```yaml
from: before_v0.60/cool_oneliners/file_cat.nu
to: sourced/cool-oneliners/file_cat.nu
```
### filesize.nu
```yaml
from: before_v0.60/cool_oneliners/filesize.nu
to: sourced/cool-oneliners/filesize.nu
```
### js_map_to_markdown.nu
```yaml
from: before_v0.60/cool_oneliners/js_map_to_markdown.nu
to: sourced/cool-oneliners/js_map_to_markdown.nu
```
I created `sourced/cool-oneliners/assets/js_map.json` with the data for
this script as it was before
### cdpath-implementation.nu
```yaml
from: before_v0.60/cool_oneliners/cdpath-implementation.nu
to: sourced/cool-oneliners/cdpath-implementation.nu
functions:
c: sourced/cool-oneliners/cdpath-implementation.nu:18:c
```
### parse_aws_s3_ls.nu
I don't have aws so I just ported the syntax
```yaml
from: before_v0.60/cool_oneliners/parse_aws_s3_ls.nu
to: null
```
Edit: I considered not porting this script yet because I can't test it
for now
### npm_update_versions.nu
```yaml
from: before_v0.60/cool_oneliners/npm_update_versions.nu
to: sourced/cool-oneliners/npm_update_versions.nu
```
### xml_search_schema.nu
```yaml
from: before_v0.60/cool_oneliners/xml_search_schema.nu
to: sourced/cool-oneliners/xml_search_schema.nu
```
I used [typos](https://github.com/crate-ci/typos/).
I manually checked all the corrections and they seem safe to me.
There are still some left, but those in this PR are good
This is some legwork to the CI
- [x] fix one `get-row.nu` before 0.60, just because it was easy
- [x] `modules/formats/to-ini.nu`
- [x] `modules/git/git-v2.nu`
- [x] `modules/git/git.nu`
- [x] `modules/log/log.nu`
- [x] `modules/weather/weatherdark.nu`
- [x] `sourced/api_wrappers/worlframalpha.nu`
- [x] `sourced/cool-oneliners/pwd-short.nu`
- [x] `sourced/github/branch-protections/branch-protections.nu`
- [x] `sourced/gitlab/gitlab.nu`
- [x] `sourced/misc/nu_defs.nu`
- [x] `sourced/update-path.nu`
- [x] `sourced/webscraping/shell_starts.nu`
I moved some auto-generated commands:
- [x] `ack`
- [x] `as`
- [x] `curl`
- [x] `fsarprc`
- [x] `fsarpri`
- [x] `godoc`
- [x] `mysql`
- [x] and `xgettext`
to custom, so we keep the modifications.
I had to comment some of the flags because the parser is not able to
parse some flags. Those are explained in comments
A nu_101 script to give some examples of how to treat lists like other
data structures that nushell doesn't have natively. Namely queues,
stacks, and sets (and multisets sort of).
I'm also considering making some examples for trees and graphs, probably
using tables, although I might put them in another script so it doesn't
get too long.
The [cookbook intro page](https://www.nushell.sh/cookbook/) gives an
example of a oneliner that I recently changed to imply is one of the
oneliners from this repo (nushell/nushell.github.io#1205), however that
oneliner isn't actually in this repo. This adds that oneliner to the
repo.
I also replaced the mention of the \#cool-oneliners channel that was
renamed to \#cool-scripts to just mention the general Nushell community.
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.
```
This updated `c` command supports:
* Changing to the previous directory with `c -`
* Changing to absolute directories
* Completion of CDPATH entries
* Completion of absolute paths
* Completion of children
When completing CDPATH entries the parent directory is shown to provide
context in case multiple CDPATH entries have the same child directory
names.
Fixes#244
* Move `random-list decimal` to `random-list float`
Updates internally to `random float` published with `0.85`
* Update kubernetes wrapper to `into float`
* Update temp script to `into float`
* Update `nupass` to `random float`
* function to display bars of given percentage from given width
* adding --progress, moving width to options
thanks @amtoine
* typos of ESL studnet
* added examples and tests
* feat(nano): add completions (#479)
* feat(nano): add completions
* feat(nano): add readme
* removed escape symbols from tests, fixed fraction indexing
* fixed tests
Fixed tests, although they need escape sequences, as the bar function has the ability to change the colors of both the background and foreground and uses the default color by default.
* Rename bar_fn.nu to bar.nu
---------
Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>
* Update ReadMe.md
Added explanation of how to use new --threads switch to feed to the par-each loops
* Update nupass.nu
Added --threads flag to allow setting of same in par-each loops, for performance fine tuning
* Use par-each in main list builders
Using par-each on the main list builders for random words, symbols and numbers results in a significant performance gain
* Add benchmarking section
Explain how par-each really can improve performance
* Refactor nupass.nu
Major refactor for more flexibility
To allow number of words to be specified, one solution is to add random
words, symbols, & numbers to lists, then operate on the lists.
You can combine lists with the ++ operator, then use shuffle on them,
as well as various other methods.
* Update ReadMe.md
Updated to match latest version, adding some new sample commands
Last version `nupass 4` meant "generate password with 3 words of length <=4".
This version `nupass 4` means "generate password with 4 words".
Length can be specified with `-l`, so: `nupass 4 -l 8` means "generate password with 4 words of length <=8".
* Update ReadMe.md
Screenshot showing new version's output
* refactor: ✨ move in one commit
Eveything in modules should probably be changed to `exported` defs.
The idea is to move everything first to keep proper history.
* refactor: 📝 add modules readme (wip)
* refactor: ✨ small move
* refactor: 📝 changed nestring, updated modules readme
* refactor: 📝 to document or not to document
* fix: 🐛 themes
replaced the template to use `main` and regenerated them
from lemnos themes.
* Revert "fix: 🐛 themes"
This reverts commit 4918d3633c.
* refactor: ✨ introduce sourced
- Created a source `root` in which sourcable demos are stored.
Some might get converted to modules later on.
- Moved some files to bin too.
* fix: 🐛 fehbg.nu
* fix: 🐛 modules/after.nu
* moved some other stuff around
---------
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>