1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00
nixpkgs/pkgs/shells/fish/plugins/foreign-env/suppress-harmless-warnings.patch
pacien d94921db12 fish-foreign-env: move to fishPlugins.foreign-env
And relocate the installed fish functions to the `vendor_functions.d` so
that they're automatically loaded.
2021-01-04 18:53:59 +01:00

24 lines
650 B
Diff

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 2>/dev/null
+ else
+ set -g -x $key $value
+ end
+
end
end