diff --git a/cool_oneliners/README.md b/cool_oneliners/README.md new file mode 100644 index 0000000..5bb77e6 --- /dev/null +++ b/cool_oneliners/README.md @@ -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 diff --git a/cool_oneliners/npm_update_versions.nu b/cool_oneliners/npm_update_versions.nu new file mode 100644 index 0000000..9b48655 --- /dev/null +++ b/cool_oneliners/npm_update_versions.nu @@ -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 }