From 308257960dd9fbcac17cd44f6b9c407b07503d8c Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Wed, 8 Jan 2025 23:09:09 -0600 Subject: [PATCH] fish: set explicit local scope for vars in fish_greeting func --- home/modules/tui/shell/fish/functions.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/modules/tui/shell/fish/functions.nix b/home/modules/tui/shell/fish/functions.nix index b9e5922..13ef9db 100644 --- a/home/modules/tui/shell/fish/functions.nix +++ b/home/modules/tui/shell/fish/functions.nix @@ -6,9 +6,9 @@ # Display weather from tempest station fish_greeting = '' if test -f "${config.sops.secrets.tempest-station.path}" - set station (cat ${config.sops.secrets.tempest-station.path}) - set token (cat ${config.sops.secrets.tempest-token.path}) - set wxjson (curl --max-time 2 --compressed -sL "https://swd.weatherflow.com/swd/rest/better_forecast?station_id=$station&token=$token&units_temp=f") + set -l station (cat ${config.sops.secrets.tempest-station.path}) + set -l token (cat ${config.sops.secrets.tempest-token.path}) + set -l wxjson (curl --max-time 2 --compressed -sL "https://swd.weatherflow.com/swd/rest/better_forecast?station_id=$station&token=$token&units_temp=f") if test $status -eq 0; and echo $wxjson | jq empty >/dev/null 2>&1 set -l wxdata (echo $wxjson | jq -r '[ (.current_conditions.conditions | ascii_downcase),