From 2d9e279ad87372d083148eb6c061f24975167962 Mon Sep 17 00:00:00 2001 From: TWSiO <83514642+TWSiO@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:11:44 -0800 Subject: [PATCH] Adding http oneliner and changing reference to renamed Discord channel. (#731) 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. --- sourced/cool-oneliners/README.md | 2 +- sourced/cool-oneliners/simple_http_request.nu | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 sourced/cool-oneliners/simple_http_request.nu diff --git a/sourced/cool-oneliners/README.md b/sourced/cool-oneliners/README.md index 5bb77e6..4921833 100644 --- a/sourced/cool-oneliners/README.md +++ b/sourced/cool-oneliners/README.md @@ -1,6 +1,6 @@ # cool oneliners -Capturing oneliners to and from the nushell Discourse channel `#cool-oneliners`. +Capturing oneliners to and from the nushell community. Consider these a living library. Or an ongoing story of how people actually use `nu`. diff --git a/sourced/cool-oneliners/simple_http_request.nu b/sourced/cool-oneliners/simple_http_request.nu new file mode 100644 index 0000000..8246693 --- /dev/null +++ b/sourced/cool-oneliners/simple_http_request.nu @@ -0,0 +1,2 @@ +# Makes an http request to a URL and gets the "value" field off the JSON response. +(http get https://api.chucknorris.io/jokes/random).value