From 6892829a35037ee1dd0cf6707f0107346558f0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 23 Nov 2025 02:56:59 -0300 Subject: [PATCH] fish: add envsource function for exporting environment variables --- user/fish/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/user/fish/default.nix b/user/fish/default.nix index dd28030..2c04ca6 100644 --- a/user/fish/default.nix +++ b/user/fish/default.nix @@ -35,6 +35,14 @@ in set_color normal bind \cy 'commandline | wl-copy -n' + + function envsource + for line in (cat $argv | grep -v '^#' | grep -v '^\s*$' | sed -e 's/=/ /' -e "s/'//g" -e 's/"//g' ) + set export (string split ' ' $line) + set -gx $export[1] $export[2] + echo "Exported key $export[1]" + end + end ''; shellAliases = { rm = "trash";