1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

use $env. instead of let-env (#543)

related to nushell/nushell#9574

Commands used
```nushell
sd --string-mode "let-env " '$env.' **/*
git rst before_v0.60/
```
This commit is contained in:
Antoine Stevan 2023-07-01 10:40:16 +02:00 committed by GitHub
parent c37fd0449f
commit a61256da0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 98 additions and 98 deletions

View file

@ -9,7 +9,7 @@
use get-weather.nu get_weather
# Create a mutable weather table to hold the weather data
let-env WEATHER = (get_weather | upsert last_run_time { (date now | date format '%Y-%m-%d %H:%M:%S %z')})
$env.WEATHER = (get_weather | upsert last_run_time { (date now | date format '%Y-%m-%d %H:%M:%S %z')})
#command to run at interval
def-env timed_weather_run [
@ -30,7 +30,7 @@ def-env timed_weather_run [
} else {
# $"interval met, running command: [($command)](char nl)"
let-env WEATHER = (get_weather | upsert last_run_time { (date now | date format '%Y-%m-%d %H:%M:%S %z')})
$env.WEATHER = (get_weather | upsert last_run_time { (date now | date format '%Y-%m-%d %H:%M:%S %z')})
let temp = ($env.WEATHER.Temperature)
let emoji = ($env.WEATHER.Emoji)
{