summary refs log tree commit diff
path: root/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch')
-rw-r--r--pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch b/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch
new file mode 100644
index 00000000000..5e4569f0a15
--- /dev/null
+++ b/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch
@@ -0,0 +1,23 @@
+diff --git a/functions/fenv.apply.fish b/functions/fenv.apply.fish
+index 34a25e3..3d94135 100644
+--- a/functions/fenv.apply.fish
++++ b/functions/fenv.apply.fish
+@@ -27,11 +27,17 @@ function fenv.apply
+     for variable in $variables
+         set key (echo $variable | sed 's/=.*//')
+         set value (echo $variable | sed 's/[^=]*=//')
++        set ignore PATH _
+ 
+         if test "$key" = 'PATH'
+           set value (echo $value | tr ':' '\n')
+         end
+ 
+-        set -g -x $key $value
++        if contains $key $ignore
++          set -g -x $key $value ^/dev/null
++        else
++          set -g -x $key $value
++        end
++
+     end
+ end