Skip to content

Commit 94941cb

Browse files
rnhmjojMic92
authored andcommittedJul 11, 2017
fish-foreign-env: hide warnings when setting PATH
1 parent 9948e91 commit 94941cb

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed
 

‎pkgs/shells/fish-foreign-env/default.nix

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ stdenv.mkDerivation rec {
1111
sha256 = "0lwp6hy3kfk7xfx4xvbk1ir8zkzm7gfjbm4bf6xg1y6iw9jq9dnl";
1212
};
1313

14-
buildCommand = ''
14+
installPhase = ''
1515
mkdir -p $out/share/fish-foreign-env/functions/
16-
cp $src/functions/* $out/share/fish-foreign-env/functions/
16+
cp functions/* $out/share/fish-foreign-env/functions/
1717
sed -e "s|sed|${gnused}/bin/sed|" \
1818
-e "s|bash|${bash}/bin/bash|" \
1919
-e "s|\| tr|\| ${coreutils}/bin/tr|" \
2020
-i $out/share/fish-foreign-env/functions/*
2121
'';
2222

23+
patches = [ ./hide-path-warnings.patch ];
24+
2325
meta = with stdenv.lib; {
2426
description = "A foreign environment interface for Fish shell";
2527
license = licenses.mit;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/functions/fenv.apply.fish b/functions/fenv.apply.fish
2+
index 34a25e3..6837e7f 100644
3+
--- a/functions/fenv.apply.fish
4+
+++ b/functions/fenv.apply.fish
5+
@@ -30,8 +30,9 @@ function fenv.apply
6+
7+
if test "$key" = 'PATH'
8+
set value (echo $value | tr ':' '\n')
9+
+ set -g -x $key $value ^/dev/null
10+
+ else
11+
+ set -g -x $key $value
12+
end
13+
-
14+
- set -g -x $key $value
15+
end
16+
end

3 commit comments

Comments
 (3)

Mic92 commented on Jul 11, 2017

@Mic92
Member

I noticed, I missed -x in git cherry-pick. Is their a way to get this behavior by default?

bjornfor commented on Jul 11, 2017

@bjornfor
Contributor

I tried adding "cherry-pick = !git cherry-pick -x" git alias, but it doesn't work. The only thing I got to work was using a different name for the custom cherry-pick command, e.g. "cp = cherry-pick -x".

Mic92 commented on Jul 11, 2017

@Mic92
Member

ok. Let's call it backport: backport = cherry-pick -x

Please sign in to comment.