From 9f954799abc679e33c953ad5f2cef8f48c1e3cbb Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Thu, 19 Sep 2024 21:14:11 +0200 Subject: [PATCH] fix(fish): export variables resolves #158 --- src/shell/env_test.go | 4 ++-- src/shell/fish.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shell/env_test.go b/src/shell/env_test.go index 7e1d58a..16ef733 100644 --- a/src/shell/env_test.go +++ b/src/shell/env_test.go @@ -40,13 +40,13 @@ func TestEnvironmentVariable(t *testing.T) { Case: "FISH", Shell: FISH, Env: envs[String], - Expected: "set --global HELLO world", + Expected: "set --global --export HELLO world", }, { Case: "FISH Array", Shell: FISH, Env: envs[Array], - Expected: "set --global ARRAY hello array world", + Expected: "set --global --export ARRAY hello array world", }, { Case: "NU", diff --git a/src/shell/fish.go b/src/shell/fish.go index fb26ffc..3c8d185 100644 --- a/src/shell/fish.go +++ b/src/shell/fish.go @@ -18,7 +18,7 @@ end` } func (e *Env) fish() *Env { - e.template = `set --global {{ .Name }} {{ .Value }}` + e.template = `set --global --export {{ .Name }} {{ .Value }}` return e }