1 |
commit: 6529c95301c9f8d936869dd0496c88cffbab2aa1 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 6 00:48:53 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 6 00:48:53 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6529c953 |
7 |
|
8 |
app-shells/fish: Removed old. |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
app-shells/fish/Manifest | 1 + |
13 |
app-shells/fish/files/profile-env.fish | 34 +++++++++++++--------- |
14 |
.../{fish-2.4.0-r1.ebuild => fish-2.5.0.ebuild} | 0 |
15 |
3 files changed, 22 insertions(+), 13 deletions(-) |
16 |
|
17 |
diff --git a/app-shells/fish/Manifest b/app-shells/fish/Manifest |
18 |
index bc12de2..858f28c 100644 |
19 |
--- a/app-shells/fish/Manifest |
20 |
+++ b/app-shells/fish/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST fish-2.4.0.tar.gz 3455874 SHA256 06bbb2323360439c4044da762d114ec1aa1aba265cec71c0543e6a0095c9efc5 SHA512 b27a2291c284fda7a12b3cd5dcba8dfcbf2738f50de40d9aac1500afa3bd98be04b4f67d7e6d3bb2f808c11a8c2dd6b1b5cc2dfe3e8e0e7d1bc88f8d8994d57b WHIRLPOOL abb9c31237a33553b25920fe3284f4ca90941aed2b8f1ec4b69fdb4231f7b2585f0292bc647ffe3acf88f6b01ac61931f615fa9a56ede35a8182e3a69aa11861 |
23 |
+DIST fish-2.5.0.tar.gz 3496831 SHA256 f8c0edadca2de379ccf305aeace660a9255fa2180c72e85e97705a24c256b2a5 SHA512 6d94bb70a5f1cefaada4d10ac845992f87c9bfc8c253f38bdfcc3a573a35503d825c9487d2ce8ef3819713594ab7b54ebf6c89fe3362c7010c63dbefc99b424d WHIRLPOOL a16d5f75e95573f2b766527fb124d99083a7ab84522a4826cd5b3aaf3a73ae6728f30defbd0598698b496f279f686eddcb4e81779767e89888037abe0b908849 |
24 |
|
25 |
diff --git a/app-shells/fish/files/profile-env.fish b/app-shells/fish/files/profile-env.fish |
26 |
index 21a918a..af3b133 100644 |
27 |
--- a/app-shells/fish/files/profile-env.fish |
28 |
+++ b/app-shells/fish/files/profile-env.fish |
29 |
@@ -1,15 +1,23 @@ |
30 |
-# since fish supports export via upstream provided function |
31 |
-# we can source directly, only ommiting $PATH and comments. |
32 |
-grep -Ev "^(#|export (PATH|ROOTPATH)=)" /etc/profile.env | source |
33 |
+# only apply env for login shells, as we'd like fish to |
34 |
+# inherit existing shell environment without overriding it |
35 |
+# using csh env, as it's cleaner and less too parse/strip |
36 |
|
37 |
-# strip unneded stuff from bash export lines |
38 |
-# apply paths and cleanup |
39 |
-if [ "$EUID" = "0" ] ; or [ "$USER" = "root" ] |
40 |
- set _rootpath (grep -o " ROOTPATH='.*'" /etc/profile.env | sed "s@.*'\(.*\)'@\1@;s@:@\n@g") |
41 |
- set -xg PATH /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin $_rootpath |
42 |
- set -e _rootpath |
43 |
-else |
44 |
- set _userpath (grep -o " PATH='.*'" /etc/profile.env | sed "s@.*'\(.*\)'@\1@;s@:@\n@g") |
45 |
- set -xg PATH /usr/local/bin /usr/bin /bin $_userpath |
46 |
- set -e _userpath |
47 |
+if status --is-login |
48 |
+ # since fish supports export via upstream provided function |
49 |
+ # we can source directly, only ommiting $PATH and comments. |
50 |
+ string match -r -v '^(#|setenv (PATH|ROOTPATH) )' < /etc/csh.env | source |
51 |
+ |
52 |
+ # strip unneded stuff from setenv lines |
53 |
+ # apply paths and cleanup |
54 |
+ if [ "$EUID" = "0" ] ; or [ "$USER" = "root" ] |
55 |
+ string match -r '^setenv ROOTPATH .+' < /etc/csh.env | string replace -ra '\'|\:' ' ' | source |
56 |
+ set -gx PATH /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin $ROOTPATH |
57 |
+ set -e ROOTPATH |
58 |
+ else |
59 |
+ string match -r '^setenv PATH .+' < /etc/csh.env | string replace -ra '\'|\:' ' ' | source |
60 |
+ set -gx PATH /usr/local/bin /usr/bin /bin $PATH |
61 |
+ end |
62 |
+ |
63 |
+ # re-prepend $fish_user_paths |
64 |
+ __fish_reconstruct_path |
65 |
end |
66 |
|
67 |
diff --git a/app-shells/fish/fish-2.4.0-r1.ebuild b/app-shells/fish/fish-2.5.0.ebuild |
68 |
similarity index 100% |
69 |
rename from app-shells/fish/fish-2.4.0-r1.ebuild |
70 |
rename to app-shells/fish/fish-2.5.0.ebuild |