mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
Merge pull request #40 from efx/idea-cool-oneliners
create a home for cool one liners
This commit is contained in:
commit
fcfe70563d
2 changed files with 21 additions and 0 deletions
19
cool_oneliners/README.md
Normal file
19
cool_oneliners/README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# cool oneliners
|
||||
|
||||
Capturing oneliners to and from the nushell Discourse channel `#cool-oneliners`.
|
||||
|
||||
Consider these a living library.
|
||||
Or an ongoing story of how people actually use `nu`.
|
||||
|
||||
## Naming and script requirements
|
||||
|
||||
- the filename should be an abbreviation of the general topic of the script
|
||||
For example:
|
||||
|
||||
```sh
|
||||
git_batch_extract.nu
|
||||
```
|
||||
|
||||
- the script should have two lines
|
||||
- the first line should be a comment describing the script's purpose
|
||||
- the second line should be the cool oneliner
|
2
cool_oneliners/npm_update_versions.nu
Normal file
2
cool_oneliners/npm_update_versions.nu
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Increment the minor version for any package.json in the current directory (eigenrick — 08/16/2020)
|
||||
ls */package.json | each { open $it.name | inc version --minor | to json --pretty 2 | save --raw }
|
Loading…
Add table
Add a link
Reference in a new issue