nushell is genuinely such a brilliant shell.
-
nushell is genuinely such a brilliant shell. like, look at this shit
$env.instance = $old
let muted = open (here ./data/muted_accounts.csv)
| rename acct notifications_off
| insert muted true
| update notifications_off { into bool }
let blocked = open (here ./data/blocked_accounts.csv) --raw
| split row "\n"
| each { {acct: $in, blocked: true} }
($muted ++ $blocked)
| group-by acct | values
| each { prepend [{ muted: false, blocked: false, notifications_off: false }] }
| each { reduce {|it| merge $it} }
| each { merge (api-get api/v1/accounts/lookup -q { acct: $in.acct }) }
| save -f (here ./data/restricted.json)it has a few gripes with it but voiddamn this is actually quite a good language!
-
replied to ⬡-49016 last edited by