mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-09 17:01:16 -03:00
Compare commits
801 Commits
2.2.0
...
Integratio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
216a45edee | ||
|
|
7828f2303a | ||
|
|
245be2c2e4 | ||
|
|
14b953e414 | ||
|
|
ade6ebf522 | ||
|
|
768277a312 | ||
|
|
c53951b9b3 | ||
|
|
46b819a265 | ||
|
|
4d1e77fcae | ||
|
|
4efd0dfd65 | ||
|
|
c1e15ef084 | ||
|
|
8ec81393a3 | ||
|
|
49838c768d | ||
|
|
862e0127f6 | ||
|
|
1cd4731c2d | ||
|
|
05a432da32 | ||
|
|
404ab5e9ab | ||
|
|
901652d5c3 | ||
|
|
4bb805b5fe | ||
|
|
52731c480c | ||
|
|
f44ef3ad3f | ||
|
|
54319435f4 | ||
|
|
8e19c82e09 | ||
|
|
09bb713989 | ||
|
|
6466ffe82d | ||
|
|
ce41e3468e | ||
|
|
75064ed786 | ||
|
|
5f4a77a324 | ||
|
|
8a940a2ee7 | ||
|
|
d5797c5439 | ||
|
|
d0fdc80725 | ||
|
|
375bef4443 | ||
|
|
0e7ab7a7d0 | ||
|
|
413ac86da2 | ||
|
|
0f888ad4e6 | ||
|
|
43535cf5a5 | ||
|
|
bf0e91cc97 | ||
|
|
fc78e70d08 | ||
|
|
aefcf544ca | ||
|
|
0fd3f5c0dd | ||
|
|
e7599fd18c | ||
|
|
8d3eae0d76 | ||
|
|
d7fd0427f3 | ||
|
|
baee807837 | ||
|
|
c2e9cda7b3 | ||
|
|
4aa8fc753f | ||
|
|
635a1e9dd2 | ||
|
|
574851f092 | ||
|
|
2d5eaed745 | ||
|
|
6adc35c636 | ||
|
|
6c5f923a47 | ||
|
|
d7c690b416 | ||
|
|
8eb9dac4bc | ||
|
|
2ff3a36675 | ||
|
|
e395a0eb69 | ||
|
|
36691df6fe | ||
|
|
790c7f80c7 | ||
|
|
155befe90e | ||
|
|
9347630d1e | ||
|
|
784b438d4a | ||
|
|
d2ae00ca44 | ||
|
|
8477126ae4 | ||
|
|
9c75546724 | ||
|
|
e1e1e558ce | ||
|
|
c37c93fcf6 | ||
|
|
35e282928a | ||
|
|
02f18cae0a | ||
|
|
4ff8e6e781 | ||
|
|
8e8b5a6481 | ||
|
|
200a10e78d | ||
|
|
9e93ddc097 | ||
|
|
3435e94994 | ||
|
|
fd1b7ba529 | ||
|
|
a4642f141f | ||
|
|
8f33b55ccc | ||
|
|
484c1484c9 | ||
|
|
cb6d5d76c8 | ||
|
|
47f1a92cc4 | ||
|
|
0953590cca | ||
|
|
411d573ba9 | ||
|
|
9dd6873e58 | ||
|
|
3f1fc332e7 | ||
|
|
bbf0007c46 | ||
|
|
6fa09e6a70 | ||
|
|
4f5d42858c | ||
|
|
83233ccc5a | ||
|
|
6888c3d604 | ||
|
|
35cee1e39c | ||
|
|
7e014174b8 | ||
|
|
aacdaee6a9 | ||
|
|
0e18e2ba78 | ||
|
|
a148b755a6 | ||
|
|
dfb23c4fce | ||
|
|
d30f8fffc8 | ||
|
|
19dd28e400 | ||
|
|
daf94e14d4 | ||
|
|
2eb518f59c | ||
|
|
0eb3fd6b3f | ||
|
|
6663c73eb0 | ||
|
|
bb5608e920 | ||
|
|
6495bd470d | ||
|
|
7accadc33f | ||
|
|
ad97a122c9 | ||
|
|
516695ff21 | ||
|
|
9d2b53450a | ||
|
|
de1258e09b | ||
|
|
2a4a539d86 | ||
|
|
a81bd697a8 | ||
|
|
2e0205a746 | ||
|
|
168a156e58 | ||
|
|
879ee61a30 | ||
|
|
c2f1df1d4a | ||
|
|
fb0921249f | ||
|
|
1828def866 | ||
|
|
dedc7f6f03 | ||
|
|
de0349399c | ||
|
|
b1b2698a84 | ||
|
|
9f0417b587 | ||
|
|
03460a3928 | ||
|
|
19c13c72f6 | ||
|
|
f20e8420a8 | ||
|
|
a7012648fe | ||
|
|
46b9f263ac | ||
|
|
540bdfcb02 | ||
|
|
6288f89bf9 | ||
|
|
6a16bdb808 | ||
|
|
5e09411340 | ||
|
|
f4c14b69a2 | ||
|
|
b4b52b8234 | ||
|
|
ed4b78918a | ||
|
|
6bee85fefa | ||
|
|
a37d4d809e | ||
|
|
3044697baa | ||
|
|
1e7c3fe709 | ||
|
|
333415f42a | ||
|
|
e3968ba872 | ||
|
|
58d56f91f3 | ||
|
|
0e8a8a7c80 | ||
|
|
fbd53f2da1 | ||
|
|
65aeaab054 | ||
|
|
94c12d84e2 | ||
|
|
a5f5e6c1ef | ||
|
|
61fd8b9861 | ||
|
|
f2246dfb34 | ||
|
|
b41b962336 | ||
|
|
5446841069 | ||
|
|
60bd3c809a | ||
|
|
fb5a8a089e | ||
|
|
9151ec7092 | ||
|
|
3633c51ad8 | ||
|
|
e3970f9cbb | ||
|
|
077757a30b | ||
|
|
211d626152 | ||
|
|
e8aab9183e | ||
|
|
10f3ea0008 | ||
|
|
88a785e321 | ||
|
|
d628fe0dea | ||
|
|
cbd3fa6b01 | ||
|
|
584cca59bf | ||
|
|
6cb48c6380 | ||
|
|
99be3ee96f | ||
|
|
c1c35e0f21 | ||
|
|
d8a497434f | ||
|
|
211829c586 | ||
|
|
2bb7c587f4 | ||
|
|
2187c0a84b | ||
|
|
c359d28b21 | ||
|
|
c1b384e5d3 | ||
|
|
8b67a1b26f | ||
|
|
c79ade9627 | ||
|
|
d61e95e4f9 | ||
|
|
68807f274e | ||
|
|
a805d401b8 | ||
|
|
2f52f073da | ||
|
|
c4cc9f9b8d | ||
|
|
6c401bc587 | ||
|
|
35160db268 | ||
|
|
5b0996fd80 | ||
|
|
585c03db72 | ||
|
|
613739ba07 | ||
|
|
947f659f96 | ||
|
|
8703c5bc00 | ||
|
|
43e1c0a2bf | ||
|
|
99e18d9cef | ||
|
|
718d9baead | ||
|
|
e2f4584220 | ||
|
|
4138073a2f | ||
|
|
1907323afc | ||
|
|
c39b94949b | ||
|
|
31bc88d16f | ||
|
|
5dbf40ca75 | ||
|
|
2d68b25025 | ||
|
|
1767681f9a | ||
|
|
0395c33982 | ||
|
|
83d3c9fc04 | ||
|
|
c184c1a81a | ||
|
|
31a617408f | ||
|
|
a6565bbea8 | ||
|
|
81cdceddd3 | ||
|
|
5b506499c1 | ||
|
|
62b76b26b4 | ||
|
|
b72837a0f4 | ||
|
|
c4f702b7c4 | ||
|
|
00cd01c89e | ||
|
|
eb0d18add4 | ||
|
|
585bdf45c8 | ||
|
|
89206d8654 | ||
|
|
a00e26b109 | ||
|
|
de17bdb130 | ||
|
|
3345f5d0d0 | ||
|
|
28837a8b30 | ||
|
|
96e688ea91 | ||
|
|
52f8707c3e | ||
|
|
b6e058985b | ||
|
|
bc9e3c7546 | ||
|
|
57fcbecb41 | ||
|
|
c4d0612e5c | ||
|
|
992dfcc4ce | ||
|
|
1e6492ef93 | ||
|
|
4c5aa8860a | ||
|
|
adc3b0e122 | ||
|
|
29d06760bc | ||
|
|
218843b9e4 | ||
|
|
25ad8866c9 | ||
|
|
2646d51a0b | ||
|
|
e88bfbc440 | ||
|
|
4e465ee04c | ||
|
|
1d446b74ff | ||
|
|
dae0f63e5b | ||
|
|
0779c89a65 | ||
|
|
b908d0b89b | ||
|
|
cadb5d51ea | ||
|
|
fcdc6a48c0 | ||
|
|
16aa0b93e9 | ||
|
|
158ea98189 | ||
|
|
962f9914c6 | ||
|
|
df8c4ce835 | ||
|
|
1b8face1a3 | ||
|
|
b4a44deb7b | ||
|
|
60a477a303 | ||
|
|
f8da754884 | ||
|
|
1688b2384f | ||
|
|
0c94c2b9e8 | ||
|
|
d3f6c8a694 | ||
|
|
e086e27f98 | ||
|
|
2f5d750393 | ||
|
|
b88e31b3f1 | ||
|
|
7c4f553acc | ||
|
|
4eb6aaf36f | ||
|
|
08edfaeae8 | ||
|
|
8081e9f189 | ||
|
|
0dac245b58 | ||
|
|
c7ba446c23 | ||
|
|
4b2495f28f | ||
|
|
11785c2bf4 | ||
|
|
4b9fece9f4 | ||
|
|
766176443d | ||
|
|
3552d073f6 | ||
|
|
49d3042bd3 | ||
|
|
701d141109 | ||
|
|
870593e345 | ||
|
|
5cf0e918b0 | ||
|
|
d7f38a0802 | ||
|
|
a77ce393ba | ||
|
|
f8ed1d182e | ||
|
|
68fcb790b0 | ||
|
|
8db1a5fae7 | ||
|
|
6bf70c86d2 | ||
|
|
b7d98fa873 | ||
|
|
daafe4ef37 | ||
|
|
ed1919b266 | ||
|
|
fdb2559425 | ||
|
|
ac545940de | ||
|
|
7a8cbcda06 | ||
|
|
8e79da3b2d | ||
|
|
1dac0041d5 | ||
|
|
43728fe7a0 | ||
|
|
e1f988b987 | ||
|
|
03fe30a774 | ||
|
|
c56df11128 | ||
|
|
6027eae1a1 | ||
|
|
bd482898d4 | ||
|
|
4417a6ee34 | ||
|
|
2a4f21cc92 | ||
|
|
8cc213ed4f | ||
|
|
4f519297dd | ||
|
|
4c4020babe | ||
|
|
ef31aa94f8 | ||
|
|
bc3260402a | ||
|
|
c5ed4e5cdf | ||
|
|
92d0d98a24 | ||
|
|
23fabf81d7 | ||
|
|
19112980ee | ||
|
|
8eca775977 | ||
|
|
c3971957ac | ||
|
|
9a7b2b190b | ||
|
|
6f2f0cfce2 | ||
|
|
3a249bb549 | ||
|
|
1a12071a48 | ||
|
|
b7fb11cb7f | ||
|
|
95c30f7a23 | ||
|
|
d5fe5c02a8 | ||
|
|
759b45ad79 | ||
|
|
1363c7468d | ||
|
|
834ebef53c | ||
|
|
bb932a0a0a | ||
|
|
f23c2beb61 | ||
|
|
994aba075d | ||
|
|
979b94e274 | ||
|
|
076ebf8cee | ||
|
|
6eea3992b3 | ||
|
|
6969cfab3d | ||
|
|
1a3bcf63bc | ||
|
|
814cb51eb5 | ||
|
|
d6d3977f3d | ||
|
|
c9ddad94a9 | ||
|
|
172f1e1b5f | ||
|
|
b257e79a07 | ||
|
|
f029e04047 | ||
|
|
6aa2cbe807 | ||
|
|
ad72421b2c | ||
|
|
594b460ba2 | ||
|
|
0a6f62358b | ||
|
|
8c707a4e2f | ||
|
|
7188d94c1b | ||
|
|
836b6bea73 | ||
|
|
8a6f26ff9b | ||
|
|
7143512198 | ||
|
|
5306fce16e | ||
|
|
fb1a7d9d73 | ||
|
|
482cfca84f | ||
|
|
e29d200ba5 | ||
|
|
43c7ababf9 | ||
|
|
baa6971a46 | ||
|
|
aefe084124 | ||
|
|
c68f8f3418 | ||
|
|
aa5291c6bd | ||
|
|
f045d9b143 | ||
|
|
666dcd78ba | ||
|
|
70ee7650f3 | ||
|
|
aa974b58bc | ||
|
|
6c8518dd10 | ||
|
|
346d918555 | ||
|
|
8104854d5d | ||
|
|
b4b5c2188f | ||
|
|
a0eef2663a | ||
|
|
f5dfebb6a3 | ||
|
|
2b7ffca414 | ||
|
|
96b3e1ce1b | ||
|
|
ce719a700c | ||
|
|
4280df3aa2 | ||
|
|
b73bf53bd3 | ||
|
|
d90169e79b | ||
|
|
fea798011b | ||
|
|
f17a71de74 | ||
|
|
0212314479 | ||
|
|
16c34b387f | ||
|
|
d65c63322e | ||
|
|
6943536ef3 | ||
|
|
7322c9c591 | ||
|
|
dfaefb97ff | ||
|
|
0a0acc8a2e | ||
|
|
a8837f537f | ||
|
|
ef67fc7ba0 | ||
|
|
83c0f43b33 | ||
|
|
17672b08c6 | ||
|
|
dc1f2fbb4c | ||
|
|
2d90859cab | ||
|
|
d325b4bf39 | ||
|
|
1d64c480c4 | ||
|
|
9f7334deef | ||
|
|
3dbefd08ad | ||
|
|
1a5d0fc47f | ||
|
|
17b6936f53 | ||
|
|
c5bcc4567e | ||
|
|
ce360bcfe3 | ||
|
|
789657456a | ||
|
|
7b3d93f4a1 | ||
|
|
3868203c76 | ||
|
|
e5bfdcd9a4 | ||
|
|
b7f13b4685 | ||
|
|
c2c4fbf206 | ||
|
|
bf86a92596 | ||
|
|
53fc9a4002 | ||
|
|
a8a9ac0dae | ||
|
|
3b53abecd0 | ||
|
|
3f12f75853 | ||
|
|
917c727619 | ||
|
|
6336288da1 | ||
|
|
3e0ff6db2a | ||
|
|
5db811253e | ||
|
|
e31a93040e | ||
|
|
8e55f7154b | ||
|
|
71d3357b71 | ||
|
|
3eafb3520f | ||
|
|
e50d104399 | ||
|
|
45dfa2d864 | ||
|
|
c2024a6a94 | ||
|
|
32d54e37f7 | ||
|
|
2bbad22248 | ||
|
|
22493c9df8 | ||
|
|
8d97a85834 | ||
|
|
e7d18b96f9 | ||
|
|
1854ef9823 | ||
|
|
c9577394eb | ||
|
|
0918ad6cee | ||
|
|
d3bcee9e2e | ||
|
|
1055864438 | ||
|
|
be0d9d093c | ||
|
|
bb491742ea | ||
|
|
46fbfaaa83 | ||
|
|
09bd938e25 | ||
|
|
d5f3a09ce9 | ||
|
|
036a29acf5 | ||
|
|
3e7dfd7f5e | ||
|
|
f21d826850 | ||
|
|
8e3e286577 | ||
|
|
f4b4e5b41f | ||
|
|
4a05d56337 | ||
|
|
73708061fc | ||
|
|
55abe105ea | ||
|
|
0006d23df8 | ||
|
|
df3da55602 | ||
|
|
13479fbc2a | ||
|
|
226cdc6a28 | ||
|
|
b13f0701a4 | ||
|
|
4c2cc384d2 | ||
|
|
2971887bbd | ||
|
|
b776327b9d | ||
|
|
b7e991c4b7 | ||
|
|
9788566ba4 | ||
|
|
233c443694 | ||
|
|
35bbc1d7b7 | ||
|
|
4e5e04bfda | ||
|
|
c0e8ad6f1f | ||
|
|
3472a39d07 | ||
|
|
9865a8c807 | ||
|
|
35e769d494 | ||
|
|
6e3ea5b2ea | ||
|
|
54f215294f | ||
|
|
f6f982226a | ||
|
|
98b33d7b6b | ||
|
|
86471ac21f | ||
|
|
57e22e87c2 | ||
|
|
0b3406bdc0 | ||
|
|
74cd977566 | ||
|
|
d9d2f61ba6 | ||
|
|
434eabb787 | ||
|
|
e8605cb3ef | ||
|
|
1bdf06836a | ||
|
|
0a99772572 | ||
|
|
2ffb47eba2 | ||
|
|
b208d752e2 | ||
|
|
ec74479d44 | ||
|
|
e75108fc4c | ||
|
|
176e34cf73 | ||
|
|
65415cb761 | ||
|
|
45bf843b03 | ||
|
|
610a5926a8 | ||
|
|
3b0f9911e2 | ||
|
|
55a2945449 | ||
|
|
16061d06a9 | ||
|
|
aeaacedf75 | ||
|
|
bec6d5c174 | ||
|
|
d98b6f2434 | ||
|
|
3ffbf9a7ea | ||
|
|
c481137b40 | ||
|
|
9f0b077295 | ||
|
|
5f2feee680 | ||
|
|
9ecd73d956 | ||
|
|
b9b39f7c31 | ||
|
|
37f4cbe3d7 | ||
|
|
126c8c14b8 | ||
|
|
3992315505 | ||
|
|
eb4e4fa7ad | ||
|
|
71e38dec11 | ||
|
|
11376ae25b | ||
|
|
dd245f62f0 | ||
|
|
aa37b40d93 | ||
|
|
8eccf8a6f7 | ||
|
|
7376639789 | ||
|
|
2334374fd6 | ||
|
|
f086bc9564 | ||
|
|
c30de8add4 | ||
|
|
de3cb6b374 | ||
|
|
4c8fdf6e90 | ||
|
|
1a41f908d3 | ||
|
|
95908aa2bc | ||
|
|
a19f4dd4c8 | ||
|
|
eadd4d9b71 | ||
|
|
4f3ff3d77f | ||
|
|
5bb81461f6 | ||
|
|
871a2088db | ||
|
|
abeaac6632 | ||
|
|
d591cebf44 | ||
|
|
8abb19aaca | ||
|
|
bcc937e4e0 | ||
|
|
915d92019c | ||
|
|
f24d5cb5f0 | ||
|
|
79c22c76bf | ||
|
|
20e96df85d | ||
|
|
be51fe944d | ||
|
|
54d1d98e39 | ||
|
|
6f92781992 | ||
|
|
c1bd3b5824 | ||
|
|
fb615843b3 | ||
|
|
c6d808a0d8 | ||
|
|
4f12821ca8 | ||
|
|
4fcda28d9b | ||
|
|
1883e051ba | ||
|
|
4825afbf58 | ||
|
|
ad8c7b9d0b | ||
|
|
7eb88ed7dc | ||
|
|
6afd0d8add | ||
|
|
bfe142fef0 | ||
|
|
54e626f665 | ||
|
|
f296471726 | ||
|
|
b2e8967e94 | ||
|
|
d83ef07ca7 | ||
|
|
e70ed961ea | ||
|
|
7216e36cb1 | ||
|
|
10a60b6ec2 | ||
|
|
054fb22854 | ||
|
|
b34127e346 | ||
|
|
be70ea7d49 | ||
|
|
1ef178c5e6 | ||
|
|
56399b9aa3 | ||
|
|
a79c7495c8 | ||
|
|
b13ee9da2a | ||
|
|
f86ee20579 | ||
|
|
f7e8f8031d | ||
|
|
18a116394d | ||
|
|
094948db51 | ||
|
|
18c7e97ecc | ||
|
|
c8ac48ff9a | ||
|
|
fa4ec55c96 | ||
|
|
a02d4dc27c | ||
|
|
31c75e747c | ||
|
|
8a1a446f45 | ||
|
|
7fe8a63f53 | ||
|
|
48874294d6 | ||
|
|
f5093f1625 | ||
|
|
4bc8cf1a1a | ||
|
|
527c932e93 | ||
|
|
cba3db6205 | ||
|
|
3b798b1733 | ||
|
|
f898d82536 | ||
|
|
3b5aab6edb | ||
|
|
11c8a47d22 | ||
|
|
b2323ca203 | ||
|
|
2c648c80c8 | ||
|
|
b8d9ba993d | ||
|
|
3810ef47f7 | ||
|
|
bbbadbcb78 | ||
|
|
c0acc98faa | ||
|
|
9828d787fa | ||
|
|
53456b5fc3 | ||
|
|
73a5e2bc6b | ||
|
|
9a2ac5fcb6 | ||
|
|
025b45b91e | ||
|
|
31d1e04301 | ||
|
|
a828f90d38 | ||
|
|
00556734bc | ||
|
|
b231ab7238 | ||
|
|
2587bbc4a7 | ||
|
|
40df11b162 | ||
|
|
a66d44054c | ||
|
|
e9fcbb334e | ||
|
|
babc6f0f9c | ||
|
|
bffeb664cc | ||
|
|
b85a8bbbfe | ||
|
|
925f451773 | ||
|
|
8bf1e694fe | ||
|
|
c5bc221b27 | ||
|
|
7f28acc5ed | ||
|
|
f36d2ff55f | ||
|
|
396e01a0e0 | ||
|
|
787c1304c6 | ||
|
|
d92c08c9bb | ||
|
|
bd3b4e03e9 | ||
|
|
cb5511c8db | ||
|
|
54b6a1c08e | ||
|
|
8cc154bc48 | ||
|
|
ab6d9ad521 | ||
|
|
5e1c71b059 | ||
|
|
f3695b95fc | ||
|
|
32a3e15309 | ||
|
|
0661553484 | ||
|
|
5f080fcfc9 | ||
|
|
a21e44c155 | ||
|
|
60089f9750 | ||
|
|
5043b9d06e | ||
|
|
a17b9fdaba | ||
|
|
2f3123e175 | ||
|
|
17c756971a | ||
|
|
f71e877f18 | ||
|
|
d6c97a6a13 | ||
|
|
e0e732523e | ||
|
|
47b9993469 | ||
|
|
7bfad18ec7 | ||
|
|
b0504f7739 | ||
|
|
67ed58b0ba | ||
|
|
a815e6ca14 | ||
|
|
b59904632d | ||
|
|
c1b9b27f86 | ||
|
|
2b87705a46 | ||
|
|
34faf7638e | ||
|
|
5e555fc1cf | ||
|
|
cb5d36d89f | ||
|
|
e2f16ec20e | ||
|
|
b615534d8d | ||
|
|
93d57bd73a | ||
|
|
60798798ef | ||
|
|
81696c16d2 | ||
|
|
89c504daf6 | ||
|
|
5a2287c52f | ||
|
|
a65a288eca | ||
|
|
cf80baa2d8 | ||
|
|
871a822379 | ||
|
|
b9b6b6108e | ||
|
|
3a2ba60b70 | ||
|
|
aa76f64a94 | ||
|
|
e34a8da5d7 | ||
|
|
6157a9a858 | ||
|
|
6b92c4867d | ||
|
|
3bd6eab88f | ||
|
|
3a3a9f5cc1 | ||
|
|
f87268e2ac | ||
|
|
5238ed309f | ||
|
|
6347988e0a | ||
|
|
b92acd3cf2 | ||
|
|
fd96bafbc8 | ||
|
|
b7e16cb0dd | ||
|
|
459df23931 | ||
|
|
e7b22a7ed2 | ||
|
|
bcbe91461e | ||
|
|
b68410d619 | ||
|
|
602e9cebd9 | ||
|
|
d2049edcab | ||
|
|
83322f63c6 | ||
|
|
f0a2f24701 | ||
|
|
97f1a8fe91 | ||
|
|
0ac9f159d6 | ||
|
|
a3f8e27bf8 | ||
|
|
b55c13f275 | ||
|
|
761651d410 | ||
|
|
70548f7cc7 | ||
|
|
f6ab0b4d07 | ||
|
|
bc8a34f8df | ||
|
|
8f0cd5508d | ||
|
|
a151c3f892 | ||
|
|
5b9135a698 | ||
|
|
db5c02fbfc | ||
|
|
938da3039d | ||
|
|
cfeae48b83 | ||
|
|
50f18ddaad | ||
|
|
2874650802 | ||
|
|
1271de321e | ||
|
|
a265ee6f6f | ||
|
|
e196203320 | ||
|
|
33d062cb60 | ||
|
|
53bcd4b1ab | ||
|
|
385f961b29 | ||
|
|
eada714a0a | ||
|
|
66f11e9bd3 | ||
|
|
158d3cc743 | ||
|
|
07c109fad8 | ||
|
|
618a4b42ad | ||
|
|
e2c81e54e2 | ||
|
|
e56f0628d5 | ||
|
|
546ba888ae | ||
|
|
9b2a17eb1e | ||
|
|
a7ecc0db1f | ||
|
|
bc7eb39781 | ||
|
|
299a383d98 | ||
|
|
75515af537 | ||
|
|
b1ed15a07a | ||
|
|
9dc6ef6771 | ||
|
|
a6a16808e3 | ||
|
|
aee71b594b | ||
|
|
6e3231a9d7 | ||
|
|
85dad6913e | ||
|
|
deacec07bf | ||
|
|
958880d972 | ||
|
|
78af59f40c | ||
|
|
c59f5e9f01 | ||
|
|
c9349f2ef6 | ||
|
|
4ebaa7b6bd | ||
|
|
618896c043 | ||
|
|
0dbd83ffaf | ||
|
|
3929e9de0e | ||
|
|
f4d1657c22 | ||
|
|
caab298f72 | ||
|
|
0d0b2ce9b3 | ||
|
|
16ad5d3a2e | ||
|
|
92e9297a15 | ||
|
|
ac72db8ef0 | ||
|
|
9b4e365517 | ||
|
|
c0cefde5d1 | ||
|
|
1786a7cdc4 | ||
|
|
a91e8887cd | ||
|
|
d3a0372e89 | ||
|
|
793e1afa08 | ||
|
|
78162a2a13 | ||
|
|
30ea4fc416 | ||
|
|
d1d36cc9af | ||
|
|
b2a97e4245 | ||
|
|
b32f770a69 | ||
|
|
78d4f22ce4 | ||
|
|
3925929979 | ||
|
|
60fdd71f74 | ||
|
|
b4f53143b0 | ||
|
|
9c2fdc6da5 | ||
|
|
821e8ec59a | ||
|
|
4401abb166 | ||
|
|
27be004c64 | ||
|
|
6c668868e9 | ||
|
|
6add8a7df9 | ||
|
|
7fa69ef8be | ||
|
|
f77f71c17e | ||
|
|
749b9182ab | ||
|
|
3b0805f4d7 | ||
|
|
0c1485c325 | ||
|
|
86554d66d0 | ||
|
|
6475d763d0 | ||
|
|
7add4d5782 | ||
|
|
f70b1ffbbf | ||
|
|
8a9b7dc63a | ||
|
|
3f30096727 | ||
|
|
52ff997bf0 | ||
|
|
08911e2dcc | ||
|
|
dd4639e5db | ||
|
|
2109af0987 | ||
|
|
68bbe13d23 | ||
|
|
b1a0498ff9 | ||
|
|
882f4714ac | ||
|
|
e7273e1d81 | ||
|
|
f359ded336 | ||
|
|
ff4b1104a2 | ||
|
|
a550695cba | ||
|
|
9438d33358 | ||
|
|
e35a2450d9 | ||
|
|
616d848fac | ||
|
|
a4b17b162c | ||
|
|
9fd6b5e1e2 | ||
|
|
466806fb11 | ||
|
|
97edc96afd | ||
|
|
8b14f1050d | ||
|
|
9cf2bb18c2 | ||
|
|
4b8febd44e | ||
|
|
d49f6e1b29 | ||
|
|
1e32f9431d | ||
|
|
4a3cda1495 | ||
|
|
05daedf7c6 | ||
|
|
f07d59c55d | ||
|
|
b057efdb37 | ||
|
|
7954b95f5d | ||
|
|
ebf91d59c7 | ||
|
|
0effcf6df1 | ||
|
|
a5fabc6875 | ||
|
|
506720003d | ||
|
|
0f3306870b | ||
|
|
a1b86749cf | ||
|
|
25d19f7d63 | ||
|
|
ae58809c9f | ||
|
|
976ce1e8fd | ||
|
|
6ec58a20c0 | ||
|
|
ad237136e7 | ||
|
|
a4d6a104a6 | ||
|
|
a150ae76ac | ||
|
|
4621e763b6 | ||
|
|
8db162e048 | ||
|
|
7d94b7fd1b | ||
|
|
d018ef39e1 | ||
|
|
4115a2f2d1 | ||
|
|
767742c7e7 | ||
|
|
0ddd0ed4fb | ||
|
|
2d1331e104 | ||
|
|
9223b643b6 | ||
|
|
f3560b8e62 | ||
|
|
18d7465592 | ||
|
|
ec7dd1ece8 | ||
|
|
cdfb425ac4 | ||
|
|
cb984cf761 | ||
|
|
7efbcc039d | ||
|
|
d31eceddaf | ||
|
|
3a190bbe49 | ||
|
|
5c4acc8ee1 | ||
|
|
92a9ba478b | ||
|
|
71a5db6961 | ||
|
|
013d91d4ee | ||
|
|
8e0c1c70ce | ||
|
|
bfbeca8b6c | ||
|
|
412a42246f | ||
|
|
781b61d074 | ||
|
|
2008415106 | ||
|
|
386d6a77f2 | ||
|
|
29d22e4e8b | ||
|
|
286c60bc9d | ||
|
|
c26d317da5 | ||
|
|
534fd1a59e |
8
.clang-format
Normal file
8
.clang-format
Normal file
@@ -0,0 +1,8 @@
|
||||
# Use the Google style with these modifications:
|
||||
#
|
||||
# 1) lines can be up to 100 chars long rather than 80, and
|
||||
# 2) use a four space indent rather than two spaces.
|
||||
#
|
||||
BasedOnStyle: Google
|
||||
ColumnLimit: 100
|
||||
IndentWidth: 4
|
||||
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -1,6 +1,7 @@
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.travis.yml export-ignore
|
||||
fish.spec.in export-ignore
|
||||
/build_tools/make_svn_completions.fish export-ignore
|
||||
/build_tools/description-pak export-ignore
|
||||
/build_tools/make_hg_completions.fish export-ignore
|
||||
@@ -18,4 +19,7 @@
|
||||
/build_tools/osx_package_scripts/postinstall export-ignore
|
||||
/build_tools/make_pkg.sh export-ignore
|
||||
/build_tools/make_darcs_completions.fish export-ignore
|
||||
|
||||
/debian export-ignore
|
||||
/debian/* export-ignore
|
||||
/.github export-ignore
|
||||
/.github/* export-ignore
|
||||
|
||||
40
.github/ISSUE_TEMPLATE.md
vendored
Normal file
40
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
Thanks for helping to make fish better!
|
||||
|
||||
If you are asking for help with fish, or you've found a bug:
|
||||
- Make sure it's not a known or solved issue, by searching https://github.com/fish-shell/fish-shell/issues
|
||||
- Fill in the following information carefully:
|
||||
|
||||
-->
|
||||
|
||||
[Please include a short description of the problem here]
|
||||
|
||||
### Reproduction Steps:
|
||||
|
||||
1. [First Step]
|
||||
2. [Second Step]
|
||||
3. [Other Steps...]
|
||||
|
||||
### Expected behavior:
|
||||
|
||||
[Describe expected behavior here]
|
||||
|
||||
### Observed behavior:
|
||||
|
||||
[Describe observed behavior here]
|
||||
|
||||
### Additional information:
|
||||
|
||||
[ Other useful information, such as:
|
||||
When did this problem start?
|
||||
Does this happen all the time?
|
||||
Has anything changed on your system recently?
|
||||
]
|
||||
|
||||
|
||||
---
|
||||
Fish version: [from the output of fish --version]
|
||||
|
||||
Operating system: [your operating system and how you installed fish e.g. Homebrew, Ubuntu PPA, distribution package]
|
||||
|
||||
Terminal or terminal emulator: [e.g. PuTTy, iTerm2, GNOME Terminal, VT220]
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -24,20 +24,20 @@ fish
|
||||
fish_indent
|
||||
fish_tests
|
||||
fish.pc
|
||||
mimedb
|
||||
seq
|
||||
set_color
|
||||
share/config.fish
|
||||
share/__fish_build_paths.fish
|
||||
share/man/
|
||||
toc.txt
|
||||
user_doc/
|
||||
xcuserdata
|
||||
tests/*tmp.*
|
||||
tests/foo.txt
|
||||
test/
|
||||
FISH-BUILD-VERSION-FILE
|
||||
version
|
||||
messages.pot
|
||||
lexicon.txt
|
||||
lexicon_filter
|
||||
lexicon.log
|
||||
|
||||
DerivedData/
|
||||
compile_commands.json
|
||||
xcodebuild.log
|
||||
|
||||
8
.oclint
Normal file
8
.oclint
Normal file
@@ -0,0 +1,8 @@
|
||||
rules:
|
||||
rule-configurations:
|
||||
# This is the default value (as of the time I wrote this) but I'm making
|
||||
# it explicit since it needs to agree with the value used by clang-format.
|
||||
# Thus, if we ever change the fish style to allow longer lines this should
|
||||
# be changed (as well as the corresponding clang-format config).
|
||||
- key: LONG_LINE
|
||||
value: 100
|
||||
64
.travis.yml
64
.travis.yml
@@ -1,27 +1,63 @@
|
||||
language: cpp
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
before_install:
|
||||
- sudo apt-get update
|
||||
install:
|
||||
- sudo apt-get install --no-install-recommends bc doxygen expect gettext libncurses5-dev
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- bc
|
||||
- expect
|
||||
- gettext
|
||||
- libncurses5-dev
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-precise-3.8
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- clang-3.8
|
||||
- llvm-3.8 # for llvm-symbolizer
|
||||
- bc
|
||||
- expect
|
||||
- gettext
|
||||
- libncurses5-dev
|
||||
env:
|
||||
- CXXFLAGS="-g -fno-omit-frame-pointer -fsanitize=address"
|
||||
- ASAN_OPTIONS=check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1
|
||||
before_install: export CXX=clang++-3.8
|
||||
|
||||
- os: osx
|
||||
before_install:
|
||||
- brew update
|
||||
- brew install pcre2 # use system PCRE2
|
||||
|
||||
fast_finish: true
|
||||
|
||||
script:
|
||||
- autoreconf
|
||||
- ./configure
|
||||
- ./configure --prefix=$HOME/prefix || cat config.log
|
||||
- make -j2
|
||||
- sudo make install
|
||||
- make test SHOW_INTERACTIVE_LOG=1
|
||||
- make install
|
||||
- make test DESTDIR=$HOME/prefix/ SHOW_INTERACTIVE_LOG=1
|
||||
|
||||
notifications:
|
||||
# Some items are encrypted so that notifications from other repositories
|
||||
# don't flood the official repositories.
|
||||
irc:
|
||||
channels:
|
||||
- "irc.oftc.net#fish"
|
||||
#- "irc.oftc.net#fish"
|
||||
secure: "eRk9KGZ5+mrlD2SoI8yg2Sp8OYrh7YPyGe3WCDQUwTnNgNDII34rbM9a6UOA/l7AeWSNY8joLq5xVLCU4wpFgUcJ11SYIpMnLosZK29OW4ubDOHmdBDvJ971rLgAVG9cXngZtIxEVVxN/jnS1Qr8GKZx4DjkaTMgz1pemb4WxCc="
|
||||
template:
|
||||
- "%{repository}#%{build_number} (%{commit} on %{branch} by %{author}): %{message} Details at %{build_url}"
|
||||
use_notice: true
|
||||
skip_join: true
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/61821cec3015bf0f8bb1
|
||||
matrix:
|
||||
fast_finish: true
|
||||
#- https://webhooks.gitter.im/e/61821cec3015bf0f8bb1
|
||||
secure: fPfOmxnC3MCsfR1oocVFeWLawGcRZkn+8fNHlSOeZ+SqqoZfcCHgQTvQ22TqmVl1yvkXbNlaXjo6dbVzTOAh7r7H0bRMEKBVh3dQS7wqjB1sKivpXd8PAS3BTj5MQpGeJzdHnDuwVlwDktGtfHfhGeq1Go/4IosOq8u+6RTe28g=
|
||||
|
||||
401
CHANGELOG.md
Normal file
401
CHANGELOG.md
Normal file
@@ -0,0 +1,401 @@
|
||||
# fish 2.3.0 (released May 20, 2016)
|
||||
|
||||
There are no significant changes between 2.3.0 and 2.3b2.
|
||||
|
||||
## Other notable fixes and improvements
|
||||
|
||||
- `abbr` now allows non-letter keys (#2996).
|
||||
- Define a few extra colours on first start (#2987).
|
||||
- Multiple documentation updates.
|
||||
- Added completions for rmmod (#3007).
|
||||
- Improved completions for git (#2998).
|
||||
|
||||
## Known issues
|
||||
|
||||
- Interactive commands started from fish configuration files or from the `-c` option may, under certain circumstances, be started with incorrect terminal modes and fail to behave as expected. A fix is planned but requires further testing (#2619).
|
||||
|
||||
---
|
||||
|
||||
# fish 2.3b2 (released May 5, 2016)
|
||||
|
||||
## Significant changes
|
||||
|
||||
- A new `fish_realpath` builtin and associated function to allow the use of `realpath` even on those platforms that don't ship an appropriate command (#2932).
|
||||
- Alt-# toggles the current command line between commented and uncommented states, making it easy to save a command in history without executing it.
|
||||
- The `fish_vi_mode` function is now deprecated in favour of `fish_vi_key_bindings`.
|
||||
|
||||
## Other notable fixes and improvements
|
||||
|
||||
- Fix the build on Cygwin (#2952) and RedHat Enterprise Linux/CentOS 5 (#2955).
|
||||
- Avoid confusing the terminal line driver with non-printing characters in `fish_title` (#2453).
|
||||
- Improved completions for busctl, git (#2585, #2879, #2984), and netctl.
|
||||
|
||||
---
|
||||
|
||||
# fish 2.3b1 (released April 19, 2016)
|
||||
|
||||
## Significant Changes
|
||||
|
||||
- A new `string` builtin to handle... strings! This builtin will measure, split, search and replace text strings, including using regular expressions. It can also be used to turn lists into plain strings using `join`. `string` can be used in place of `sed`, `grep`, `tr`, `cut`, and `awk` in many situations. (#2296)
|
||||
- Allow using escape as the Meta modifier key, by waiting after seeing an escape character wait up to 300ms for an additional character. This is consistent with readline (e.g. bash) and can be configured via the `fish_escape_delay_ms variable`. This allows using escape as the Meta modifier. (#1356)
|
||||
- Add new directories for vendor functions and configuration snippets (#2500)
|
||||
- A new `fish_realpath` builtin and associated `realpath` function should allow scripts to resolve path names via `realpath` regardless of whether there is an external command of that name; albeit with some limitations. See the associated documentation.
|
||||
|
||||
## Backward-incompatible changes
|
||||
|
||||
- Unmatched globs will now cause an error, except when used with `for`, `set` or `count` (#2719)
|
||||
- `and` and `or` will now bind to the closest `if` or `while`, allowing compound conditions without `begin` and `end` (#1428)
|
||||
- `set -ql` now searches up to function scope for variables (#2502)
|
||||
- `status -f` will now behave the same when run as the main script or using `source` (#2643)
|
||||
- `source` no longer puts the file name in `$argv` if no arguments are given (#139)
|
||||
- History files are stored under the `XDG_DATA_HOME` hierarchy (by default, in `~/.local/share`), and existing history will be moved on first use (#744)
|
||||
|
||||
## Other notable fixes and improvements
|
||||
|
||||
- Fish no longer silences errors in config.fish (#2702)
|
||||
- Directory autosuggestions will now descend as far as possible if there is only one child directory (#2531)
|
||||
- Add support for bright colors (#1464)
|
||||
- Allow Ctrl-J (\cj) to be bound separately from Ctrl-M (\cm) (#217)
|
||||
- psub now has a "-s"/"–suffix" option to name the temporary file with that suffix
|
||||
- Enable 24-bit colors on select terminals (#2495)
|
||||
- Support for SVN status in the prompt (#2582)
|
||||
- Mercurial and SVN support have been added to the Classic + Git (now Classic + VCS) prompt (via the new \__fish_vcs_prompt function) (#2592)
|
||||
- export now handles variables with a "=" in the value (#2403)
|
||||
- New completions for:
|
||||
- alsactl
|
||||
- Archlinux's asp, makepkg
|
||||
- Atom's apm (#2390)
|
||||
- entr - the "Event Notify Test Runner" (#2265)
|
||||
- Fedora's dnf (#2638)
|
||||
- OSX diskutil (#2738)
|
||||
- pkgng (#2395)
|
||||
- pulseaudio's pacmd and pactl
|
||||
- rust's rustc and cargo (#2409)
|
||||
- sysctl (#2214)
|
||||
- systemd's machinectl (#2158), busctl (#2144), systemd-nspawn, systemd-analyze, localectl, timedatectl
|
||||
- and more
|
||||
- Fish no longer has a function called sgrep, freeing it for user customization (#2245)
|
||||
- A rewrite of the completions for cd, fixing a few bugs (#2299, #2300, #562)
|
||||
- Linux VTs now run in a simplified mode to avoid issues (#2311)
|
||||
- The vi-bindings now inherit from the emacs bindings
|
||||
- Fish will also execute `fish_user_key_bindings` when in vi-mode
|
||||
- `funced` will now also check $VISUAL (#2268)
|
||||
- A new `suspend` function (#2269)
|
||||
- Subcommand completion now works better with split /usr (#2141)
|
||||
- The command-not-found-handler can now be overridden by defining a function called `__fish_command_not_found_handler` in config.fish (#2332)
|
||||
- A few fixes to the Sorin theme
|
||||
- PWD shortening in the prompt can now be configured via the `fish_prompt_pwd_dir_length` variable, set to the length per path component (#2473)
|
||||
- fish no longer requires `/etc/fish/config.fish` to correctly start, and now ships a skeleton file that only contains some documentation (#2799)
|
||||
|
||||
---
|
||||
|
||||
# fish 2.2.0 (released July 12, 2015)
|
||||
|
||||
### Significant changes ###
|
||||
|
||||
* Abbreviations: the new `abbr` command allows for interactively-expanded abbreviations, allowing quick access to frequently-used commands (#731).
|
||||
* Vi mode: run `fish_vi_mode` to switch fish into the key bindings and prompt familiar to users of the Vi editor (#65).
|
||||
* New inline and interactive pager, which will be familiar to users of zsh (#291).
|
||||
* Underlying architectural changes: the `fishd` universal variable server has been removed as it was a source of many bugs and security problems. Notably, old fish sessions will not be able to communicate universal variable changes with new fish sessions. For best results, restart all running instances of `fish`.
|
||||
* The web-based configuration tool has been redesigned, featuring a prompt theme chooser and other improvements.
|
||||
* New German, Brazilian Portuguese, and Chinese translations.
|
||||
|
||||
### Backward-incompatible changes ###
|
||||
|
||||
These are kept to a minimum, but either change undocumented features or are too hard to use in their existing forms. These changes may break existing scripts.
|
||||
|
||||
* `commandline` no longer interprets functions "in reverse", instead behaving as expected (#1567).
|
||||
* The previously-undocumented `CMD_DURATION` variable is now set for all commands and contains the execution time of the last command in milliseconds (#1585). It is no longer exported to other commands (#1896).
|
||||
* `if` / `else` conditional statements now return values consistent with the Single Unix Specification, like other shells (#1443).
|
||||
* A new "top-level" local scope has been added, allowing local variables declared on the commandline to be visible to subsequent commands. (#1908)
|
||||
|
||||
### Other notable fixes and improvements ###
|
||||
|
||||
* New documentation design (#1662), which requires a Doxygen version 1.8.7 or newer to build.
|
||||
* Fish now defines a default directory for other packages to provide completions. By default this is `/usr/share/fish/vendor-completions.d`; on systems with `pkgconfig` installed this path is discoverable with `pkg-config --variable completionsdir fish`.
|
||||
* A new parser removes many bugs; all existing syntax should keep working.
|
||||
* New `fish_preexec` and `fish_postexec` events are fired before and after job execution respectively (#1549).
|
||||
* Unmatched wildcards no longer prevent a job from running. Wildcards used interactively will still print an error, but the job will proceed and the wildcard will expand to zero arguments (#1482).
|
||||
* The `.` command is deprecated and the `source` command is preferred (#310).
|
||||
* `bind` supports "bind modes", which allows bindings to be set for a particular named mode, to support the implementation of Vi mode.
|
||||
* A new `export` alias, which behaves like other shells (#1833).
|
||||
* `command` has a new `--search` option to print the name of the disk file that would be executed, like other shells' `command -v` (#1540).
|
||||
* `commandline` has a new `--paging-mode` option to support the new pager.
|
||||
* `complete` has a new `--wraps` option, which allows a command to (recursively) inherit the completions of a wrapped command (#393), and `complete -e` now correctly erases completions (#380).
|
||||
* Completions are now generated from manual pages by default on the first run of fish (#997).
|
||||
* `fish_indent` can now produce colorized (`--ansi`) and HTML (`--html`) output (#1827).
|
||||
* `functions --erase` now prevents autoloaded functions from being reloaded in the current session.
|
||||
* `history` has a new `--merge` option, to incorporate history from other sessions into the current session (#825).
|
||||
* `jobs` returns 1 if there are no active jobs (#1484).
|
||||
* `read` has several new options:
|
||||
* `--array` to break input into an array (#1540)
|
||||
* `--null` to break lines on NUL characters rather than newlines (#1694)
|
||||
* `--nchars` to read a specific number of characters (#1616)
|
||||
* `--right-prompt` to display a right-hand-side prompt during interactive read (#1698).
|
||||
* `type` has a new `-q` option to suppress output (#1540 and, like other shells, `type -a` now prints all matches for a command (#261).
|
||||
* Pressing F1 now shows the manual page for the current command (#1063).
|
||||
* `fish_title` functions have access to the arguments of the currently running argument as `$argv[1]` (#1542).
|
||||
* The OS command-not-found handler is used on Arch Linux (#1925), nixOS (#1852), openSUSE and Fedora (#1280).
|
||||
* `Alt`+`.` searches backwards in the token history, mapping to the same behavior as inserting the last argument of the previous command, like other shells (#89).
|
||||
* The `SHLVL` environment variable is incremented correctly (#1634 & #1693).
|
||||
* Added completions for `adb` (#1165 & #1211), `apt` (#2018), `aura` (#1292), `composer` (#1607), `cygport` (#1841), `dropbox` (#1533), `elixir` (#1167), `fossil`, `heroku` (#1790), `iex` (#1167), `kitchen` (#2000), `nix` (#1167), `node`/`npm` (#1566), `opam` (#1615), `setfacl` (#1752), `tmuxinator` (#1863), and `yast2` (#1739).
|
||||
* Improved completions for `brew` (#1090 & #1810), `bundler` (#1779), `cd` (#1135), `emerge` (#1840),`git` (#1680, #1834 & #1951), `man` (#960), `modprobe` (#1124), `pacman` (#1292), `rpm` (#1236), `rsync` (#1872), `scp` (#1145), `ssh` (#1234), `sshfs` (#1268), `systemctl` (#1462, #1950 & #1972), `tmux` (#1853), `vagrant` (#1748), `yum` (#1269), and `zypper` (#1787).
|
||||
|
||||
---
|
||||
|
||||
# fish 2.1.2 (released Feb 24, 2015)
|
||||
|
||||
fish 2.1.2 contains a workaround for a filesystem bug in Mac OS X Yosemite. #1859
|
||||
|
||||
Specifically, after installing fish 2.1.1 and then rebooting, "Verify Disk" in Disk Utility will report "Invalid number of hard links." We don't have any reports of data loss or other adverse consequences. fish 2.1.2 avoids triggering the bug, but does not repair an already affected filesystem. To repair the filesystem, you can boot into Recovery Mode and use Repair Disk from Disk Utility. Linux and versions of OS X prior to Yosemite are believed to be unaffected.
|
||||
|
||||
There are no other changes in this release.
|
||||
|
||||
---
|
||||
|
||||
# fish 2.1.1 (released September 26, 2014)
|
||||
|
||||
__Important:__ if you are upgrading, stop all running instances of `fishd` as soon as possible after installing this release; it will be restarted automatically. On most systems, there will be no further action required. Note that some environments (where `XDG_RUNTIME_DIR` is set), such as Fedora 20, will require a restart of all running fish processes before universal variables work as intended.
|
||||
|
||||
Distributors are highly encouraged to call `killall fishd`, `pkill fishd` or similar in installation scripts, or to warn their users to do so.
|
||||
|
||||
### Security fixes
|
||||
* The fish_config web interface now uses an authentication token to protect requests and only responds to requests from the local machine with this token, preventing a remote code execution attack. (closing CVE-2014-2914). #1438
|
||||
* `psub` and `funced` are no longer vulnerable to attacks which allow local privilege escalation and data tampering (closing CVE-2014-2906 and CVE-2014-3856). #1437
|
||||
* `fishd` uses a secure path for its socket, preventing a local privilege escalation attack (closing CVE-2014-2905). #1436
|
||||
* `__fish_print_packages` is no longer vulnerable to attacks which would allow local privilege escalation and data tampering (closing CVE-2014-3219). #1440
|
||||
|
||||
### Other fixes
|
||||
* `fishd` now ignores SIGPIPE, fixing crashes using tools like GNU Parallel and which occurred more often as a result of the other `fishd` changes. #1084 & #1690
|
||||
|
||||
---
|
||||
|
||||
# fish 2.1.0
|
||||
|
||||
Significant Changes
|
||||
-------------------
|
||||
|
||||
* **Tab completions will fuzzy-match files.** #568
|
||||
|
||||
When tab-completing a file, fish will first attempt prefix matches (`foo` matches `foobar`), then substring matches (`ooba` matches `foobar`), and lastly subsequence matches (`fbr` matches `foobar`). For example, in a directory with files foo1.txt, foo2.txt, foo3.txt…, you can type only the numeric part and hit tab to fill in the rest.
|
||||
|
||||
This feature is implemented for files and executables. It is not yet implemented for options (like `--foobar`), and not yet implemented across path components (like `/u/l/b` to match `/usr/local/bin`).
|
||||
|
||||
* **Redirections now work better across pipelines.** #110, #877
|
||||
|
||||
In particular, you can pipe stderr and stdout together, for example, with `cmd ^&1 | tee log.txt`, or the more familiar `cmd 2>&1 | tee log.txt`.
|
||||
|
||||
* **A single `%` now expands to the last job backgrounded.** #1008
|
||||
|
||||
Previously, a single `%` would pid-expand to either all backgrounded jobs, or all jobs owned by your user. Now it expands to the last job backgrounded. If no job is in the background, it will fail to expand. In particular, `fg %` can be used to put the most recent background job in the foreground.
|
||||
|
||||
Other Notable Fixes
|
||||
-------------------
|
||||
|
||||
* alt-U and alt+C now uppercase and capitalize words, respectively. #995
|
||||
|
||||
* VTE based terminals should now know the working directory. #906
|
||||
|
||||
* The autotools build now works on Mavericks. #968
|
||||
|
||||
* The end-of-line binding (ctrl+E) now accepts autosuggestions. #932
|
||||
|
||||
* Directories in `/etc/paths` (used on OS X) are now prepended instead of appended, similar to other shells. #927
|
||||
|
||||
* Option-right-arrow (used for partial autosuggestion completion) now works on iTerm2. #920
|
||||
|
||||
* Tab completions now work properly within nested subcommands. #913
|
||||
|
||||
* `printf` supports \e, the escape character. #910
|
||||
|
||||
* `fish_config history` no longer shows duplicate items. #900
|
||||
|
||||
* `$fish_user_paths` is now prepended to $PATH instead of appended. #888
|
||||
|
||||
* Jobs complete when all processes complete. #876
|
||||
|
||||
|
||||
For example, in previous versions of fish, `sleep 10 | echo Done` returns control immediately, because echo does not read from stdin. Now it does not complete until sleep exits (presumably after 10 seconds).
|
||||
|
||||
* Better error reporting for square brackets. #875
|
||||
|
||||
* fish no longer tries to add `/bin` to `$PATH` unless PATH is totally empty. #852
|
||||
|
||||
* History token substitution (alt-up) now works correctly inside subshells. #833
|
||||
|
||||
* Flow control is now disabled, freeing up ctrl-S and ctrl-Q for other uses. #814
|
||||
|
||||
* sh-style variable setting like `foo=bar` now produces better error messages. #809
|
||||
|
||||
* Commands with wildcards no longer produce autosuggestions. #785
|
||||
|
||||
* funced no longer freaks out when supplied with no arguments. #780
|
||||
|
||||
* fish.app now works correctly in a directory containing spaces. #774
|
||||
|
||||
* Tab completion cycling no longer occasionally fails to repaint. #765
|
||||
|
||||
* Comments now work in eval'd strings. #684
|
||||
|
||||
* History search (up-arrow) now shows the item matching the autosuggestion, if that autosuggestion was truncated. #650
|
||||
|
||||
* Ctrl-T now transposes characters, as in other shells. #128
|
||||
|
||||
---
|
||||
|
||||
# fish 2.0.0
|
||||
|
||||
Significant Changes
|
||||
-------------------
|
||||
|
||||
* **Command substitutions now modify `$status` #547.**
|
||||
Previously the exit status of command substitutions (like `(pwd)`) was ignored; however now it modifies $status. Furthermore, the `set` command now only sets $status on failure; it is untouched on success. This allows for the following pattern:
|
||||
|
||||
```sh
|
||||
if set python_path (which python)
|
||||
...
|
||||
end
|
||||
```
|
||||
Because set does not modify $status on success, the if branch effectively tests whether `which` succeeded, and if so, whether the `set` also succeeded.
|
||||
* **Improvements to $PATH handling.**
|
||||
* There is a new variable, `$fish_user_paths`, which can be set universally, and whose contents are appended to $PATH #527
|
||||
* /etc/paths and /etc/paths.d are now respected on OS X
|
||||
* fish no longer modifies $PATH to find its own binaries
|
||||
* **Long lines no longer use ellipsis for line breaks**, and copy and paste
|
||||
should no longer include a newline even if the line was broken #300
|
||||
* **New syntax for index ranges** (sometimes known as "slices") #212
|
||||
* **fish now supports an `else if` statement** #134
|
||||
* **Process and pid completion now works on OS X** #129
|
||||
* **fish is now relocatable**, and no longer depends on compiled-in paths #125
|
||||
* **fish now supports a right prompt (RPROMPT)** through the fish_right_prompt function #80
|
||||
* **fish now uses posix_spawn instead of fork when possible**, which is much faster on BSD and OS X #11
|
||||
|
||||
Other Notable Fixes
|
||||
-------------------
|
||||
|
||||
* Updated VCS completions (darcs, cvs, svn, etc.)
|
||||
* Avoid calling getcwd on the main thread, as it can hang #696
|
||||
* Control-D (forward delete) no longer stops at a period #667
|
||||
* Completions for many new commands
|
||||
* fish now respects rxvt's unique keybindings #657
|
||||
* xsel is no longer built as part of fish. It will still be invoked if installed separately #633
|
||||
* __fish_filter_mime no longer spews #628
|
||||
* The --no-execute option to fish no longer falls over when reaching the end of a block #624
|
||||
* fish_config knows how to find fish even if it's not in the $PATH #621
|
||||
* A leading space now prevents writing to history, as is done in bash and zsh #615
|
||||
* Hitting enter after a backslash only goes to a new line if it is followed by whitespace or the end of the line #613
|
||||
* printf is now a builtin #611
|
||||
* Event handlers should no longer fire if signals are blocked #608
|
||||
* set_color is now a builtin #578
|
||||
* man page completions are now located in a new generated_completions directory, instead of your completions directory #576
|
||||
* tab now clears autosuggestions #561
|
||||
* tab completion from within a pair of quotes now attempts to "appropriate" the closing quote #552
|
||||
* $EDITOR can now be a list: for example, `set EDITOR gvim -f`) #541
|
||||
* `case` bodies are now indented #530
|
||||
* The profile switch `-p` no longer crashes #517
|
||||
* You can now control-C out of `read` #516
|
||||
* `umask` is now functional on OS X #515
|
||||
* Avoid calling getpwnam on the main thread, as it can hang #512
|
||||
* Alt-F or Alt-right-arrow (Option-F or option-right-arrow) now accepts one word of an autosuggestion #435
|
||||
* Setting fish as your login shell no longer kills OpenSUSE #367
|
||||
* Backslashes now join lines, instead of creating multiple commands #347
|
||||
* echo now implements the -e flag to interpret escapes #337
|
||||
* When the last token in the user's input contains capital letters, use its case in preference to that of the autosuggestion #335
|
||||
* Descriptions now have their own muted color #279
|
||||
* Wildcards beginning with a . (for example, `ls .*`) no longer match . and .. #270
|
||||
* Recursive wildcards now handle symlink loops #268
|
||||
* You can now delete history items from the fish_config web interface #250
|
||||
* The OS X build now weak links `wcsdup` and `wcscasecmp` #240
|
||||
* fish now saves and restores the process group, which prevents certain processes from being erroneously reported as stopped #197
|
||||
* funced now takes an editor option #187
|
||||
* Alternating row colors are available in fish pager through `fish_pager_color_secondary` #186
|
||||
* Universal variable values are now stored based on your MAC address, not your hostname #183
|
||||
* The caret ^ now only does a stderr redirection if it is the first character of a token, making git users happy #168
|
||||
* Autosuggestions will no longer cause line wrapping #167
|
||||
* Better handling of Unicode combining characters #155
|
||||
* fish SIGHUPs processes more often #138
|
||||
* fish no longer causes `sudo` to ask for a password every time
|
||||
* fish behaves better under Midnight Commander #121
|
||||
* `set -e` no longer crashes #100
|
||||
* fish now will automatically import history from bash, if there is no fish history #66
|
||||
* Backslashed-newlines inside quoted strings now behave more intuitively #52
|
||||
* Tab titles should be shown correctly in iTerm2 #47
|
||||
* scp remote path completion now sometimes works #42
|
||||
* The `read` builtin no longer shows autosuggestions #29
|
||||
* Custom key bindings can now be set via the `fish_user_key_bindings` function #21
|
||||
* All Python scripts now run correctly under both Python 2 and Python 3 #14
|
||||
* The "accept autosuggestion" key can now be configured #19
|
||||
* Autosuggestions will no longer suggest invalid commands #6
|
||||
|
||||
---
|
||||
|
||||
# fishfish Beta r2
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
* **Implicit cd** is back, for paths that start with one or two dots, a slash, or a tilde.
|
||||
* **Overrides of default functions should be fixed.** The "internalized scripts" feature is disabled for now.
|
||||
* **Disabled delayed suspend.** This is a strange job-control feature of BSD systems, including OS X. Disabling it frees up Control Y for other purposes; in particular, for yank, which now works on OS X.
|
||||
* **fish_indent is fixed.** In particular, the `funced` and `funcsave` functions work again.
|
||||
* A SIGTERM now ends the whole execution stack again (resolving #13).
|
||||
* Bumped the __fish_config_interactive version number so the default fish_color_autosuggestion kicks in.
|
||||
* fish_config better handles combined term256 and classic colors like "555 yellow".
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
||||
* **A history builtin**, and associated interactive function that enables deleting history items. Example usage:
|
||||
* Print all history items beginning with echo: `history --prefix echo`
|
||||
* Print all history items containing foo: `history --contains foo`
|
||||
* Interactively delete some items containing foo: `history --delete --contains foo`
|
||||
|
||||
Credit to @siteshwar for implementation. Thanks @siteshwar!
|
||||
|
||||
---
|
||||
|
||||
# fishfish Beta r1
|
||||
|
||||
## Scripting
|
||||
* No changes! All existing fish scripts, config files, completions, etc. from trunk should continue to work.
|
||||
|
||||
## New Features
|
||||
* **Autosuggestions**. Think URL fields in browsers. When you type a command, fish will suggest the rest of the command after the cursor, in a muted gray when possible. You can accept the suggestion with the right arrow key or Ctrl-F. Suggestions come from command history, completions, and some custom code for cd; there's a lot of potential for improvement here. The suggestions are computed on a background pthread, so they never slow down your typing. The autosuggestion feature is incredible. I miss it dearly every time I use anything else.
|
||||
|
||||
* **term256 support** where available, specifically modern xterms and OS X Lion. You can specify colors the old way ('set_color cyan') or by specifying RGB hex values ('set_color FF3333'); fish will pick the closest supported color. Some xterms do not advertise term256 support either in the $TERM or terminfo max_colors field, but nevertheless support it. For that reason, fish will default into using it on any xterm (but it can be disabled with an environment variable).
|
||||
|
||||
* **Web-based configuration** page. There is a new function 'fish_config'. This spins up a simple Python web server and opens a browser window to it. From this web page, you can set your shell colors and view your functions, variables, and history; all changes apply immediately to all running shells. Eventually all configuration ought to be supported via this mechanism (but in addition to, not instead of, command line mechanisms).
|
||||
|
||||
* **Man page completions**. There is a new function 'fish_update_completions'. This function reads all the man1 files from your manpath, removes the roff formatting, parses them to find the commands and options, and outputs fish completions into ~/.config/fish/completions. It won't overwrite existing completion files (except ones that it generated itself).
|
||||
|
||||
## Programmatic Changes
|
||||
* fish is now entirely in C++. I have no particular love for C++, but it provides a ready memory-model to replace halloc. We've made an effort to keep it to a sane and portable subset (no C++11, no boost, no going crazy with templates or smart pointers), but we do use the STL and a little tr1.
|
||||
* halloc is entirely gone, replaced by normal C++ ownership semantics. If you don't know what halloc is, well, now you have two reasons to be happy.
|
||||
* All the crufty C data structures are entirely gone. array_list_t, priority_queue_t, hash_table_t, string_buffer_t have been removed and replaced by STL equivalents like std::vector, std::map, and std::wstring. A lot of the string handling now uses std::wstring instead of wchar_t *
|
||||
* fish now spawns pthreads for tasks like syntax highlighting that require blocking I/O.
|
||||
* History has been completely rewritten. History files now use an extensible YAML-style syntax. History "merging" (multiple shells writing to the same history file) now works better. There is now a maximum history length of about 250k items (256 * 1024).
|
||||
* The parser has been "instanced," so you can now create more than one.
|
||||
* Total #LoC has shrunk slightly even with the new features.
|
||||
|
||||
## Performance
|
||||
* fish now runs syntax highlighting in a background thread, so typing commands is always responsive even on slow filesystems.
|
||||
* echo, test, and pwd are now builtins, which eliminates many forks.
|
||||
* The files in share/functions and share/completions now get 'internalized' into C strings that get compiled in with fish. This substantially reduces the number of files touched at startup. A consequence is that you cannot change these functions without recompiling, but often other functions depend on these "standard" functions, so changing them is perhaps not a good idea anyways.
|
||||
|
||||
Here are some system call counts for launching and then exiting fish with the default configuration, on OS X. The first column is fish trunk, the next column is with our changes, and the last column is bash for comparison. This data was collected via dtrace.
|
||||
|
||||
<table>
|
||||
<tr> <th> <th> before <th> after <th> bash
|
||||
<tr> <th> open <td> 9 <td> 4 <td> 5
|
||||
<tr> <th> fork <td> 28 <td> 14 <td> 0
|
||||
<tr> <th> stat <td> 131 <td> 85 <td> 11
|
||||
<tr> <th> lstat <td> 670 <td> 0 <td> 0
|
||||
<tr> <th> read <td> 332 <td> 80 <td> 4
|
||||
<tr> <th> write <td> 172 <td> 149 <td> 0
|
||||
</table>
|
||||
|
||||
The large number of forks relative to bash are due to fish's insanely expensive default prompt, which is unchanged in my version. If we switch to a prompt comparable to bash's (lame) default, the forks drop to 16 with trunk, 4 after our changes.
|
||||
|
||||
The large reduction in lstat() numbers is due to fish no longer needing to call ttyname() on OS X.
|
||||
|
||||
We've got some work to do to be as lean as bash, but we're on the right track.
|
||||
194
CONTRIBUTING.md
194
CONTRIBUTING.md
@@ -1,105 +1,153 @@
|
||||
# Style guide
|
||||
# Guidelines For Developers
|
||||
|
||||
This is style guide for fish contributors. You should use it for any new code
|
||||
that you would add to this project and try to format existing code to use this
|
||||
style.
|
||||
This document provides guidelines for making changes to the fish-shell project. This includes rules for how to format the code, naming conventions, etc. It also includes recommended best practices such as creating a Travis-CI account so you can verify your changes pass all the tests before making a pull-request.
|
||||
|
||||
## Formatting
|
||||
See the bottom of this document for help on installing the linting and style reformatting tools discussed in the following sections.
|
||||
|
||||
1. fish uses the Allman/BSD style of indentation.
|
||||
2. Indent with spaces, not tabs.
|
||||
3. Use 4 spaces per indent (unless needed like `Makefile`).
|
||||
4. Opening curly bracket is on the following line:
|
||||
## Lint Free Code
|
||||
|
||||
// ✔:
|
||||
struct name
|
||||
{
|
||||
// code
|
||||
};
|
||||
Automated analysis tools like cppcheck and oclint can point out potential bugs. They also help ensure the code has a consistent style and that it avoids patterns that tend to confuse people.
|
||||
|
||||
void func()
|
||||
{
|
||||
// code
|
||||
}
|
||||
Ultimately we want lint free code. However, at the moment a lot of cleanup is required to reach that goal. For now simply try to avoid introducing new lint.
|
||||
|
||||
if (...)
|
||||
{
|
||||
// code
|
||||
}
|
||||
To make linting the code easy there are two make targets: `lint` and `lint-all`. The latter does just what the name implies. The former will lint any modified but not committed `*.cpp` files. If there is no uncommitted work it will lint the files in the most recent commit.
|
||||
|
||||
// ✗:
|
||||
void func() {
|
||||
// code
|
||||
}
|
||||
### Dealing With Lint Warnings
|
||||
|
||||
5. Put space after `if`, `while` and `for` before conditions.
|
||||
You are strongly encouraged to address a lint warning by refactoring the code, changing variable names, or whatever action is implied by the warning.
|
||||
|
||||
// ✔:
|
||||
if () {}
|
||||
### Suppressing Lint Warnings
|
||||
|
||||
// ✗:
|
||||
if() {}
|
||||
Once in a while the lint tools emit a false positive warning. For example, cppcheck might suggest a memory leak is present when that is not the case. To suppress that cppcheck warning you should insert a line like the following immediately prior to the line cppcheck warned about:
|
||||
|
||||
6. Put spaces before and after operators excluding increment and decrement;
|
||||
```
|
||||
// cppcheck-suppress memleak // addr not really leaked
|
||||
```
|
||||
|
||||
// ✔:
|
||||
int a = 1 + 2 * 3;
|
||||
a++;
|
||||
The explanatory portion of the suppression comment is optional. For other types of warnings replace "memleak" with the value inside the parenthesis (e.g., "nullPointerRedundantCheck") from a warning like the following:
|
||||
|
||||
// ✗:
|
||||
int a=1+2*3;
|
||||
a ++;
|
||||
```
|
||||
[src/complete.cpp:1727]: warning (nullPointerRedundantCheck): Either the condition 'cmd_node' is redundant or there is possible null pointer dereference: cmd_node.
|
||||
```
|
||||
|
||||
7. Never put spaces between function name and parameters list.
|
||||
Suppressing oclint warnings is more complicated to describe so I'll refer you to the [OCLint HowTo](http://docs.oclint.org/en/latest/howto/suppress.html#annotations) on the topic.
|
||||
|
||||
// ✔:
|
||||
func(args);
|
||||
## Ensuring Your Changes Conform to the Style Guides
|
||||
|
||||
// ✗:
|
||||
func (args);
|
||||
The following sections discuss the specific rules for the style that should be used when writing fish code. To ensure your changes conform to the style rules you simply need to run
|
||||
|
||||
8. Never put spaces after `(` and before `)`.
|
||||
9. Always put space after comma and semicolon.
|
||||
```
|
||||
make style
|
||||
```
|
||||
|
||||
// ✔:
|
||||
func(arg1, arg2);
|
||||
before commiting your change. If you've already committed your changes that's okay since it will then check the files in the most recent commit. This can be useful after you've merged someone elses change and want to check that it's style is acceptable.
|
||||
|
||||
for (int i = 0; i < LENGTH; i++) {}
|
||||
If you want to check the style of the entire code base run
|
||||
|
||||
// ✗:
|
||||
func(arg1,arg2);
|
||||
```
|
||||
make style-all
|
||||
```
|
||||
|
||||
for (int i = 0;i<LENGTH;i++) {}
|
||||
### Suppressing Reformatting of the Code
|
||||
|
||||
## Documentation
|
||||
If you have a good reason for doing so you can tell `clang-format` to not reformat a block of code by enclosing it in comments like this:
|
||||
|
||||
Document your code using [Doxygen][dox].
|
||||
```
|
||||
// clang-format off
|
||||
code to ignore
|
||||
// clang-format on
|
||||
```
|
||||
|
||||
1. Documentation comment should use double star notation or tripple slash:
|
||||
## Fish Script Style Guide
|
||||
|
||||
// ✔:
|
||||
/// Some var
|
||||
int var;
|
||||
Fish scripts such as those in the *share/functions* and *tests* directories should be formatted using the `fish_indent` command.
|
||||
|
||||
/**
|
||||
* Some func
|
||||
*/
|
||||
void func();
|
||||
Function names should be all lowercase with undescores separating words. Private functions should begin with an underscore. The first word should be `fish` if the function is unique to fish.
|
||||
|
||||
2. Use slash as tag mark:
|
||||
The first word of global variable names should generally be `fish` for public vars or `_fish` for private vars to minimize the possibility of name clashes with user defined vars.
|
||||
|
||||
// ✔:
|
||||
## C++ Style Guide
|
||||
|
||||
/**
|
||||
* \param a an integer argument.
|
||||
* \param s a constant character pointer.
|
||||
* \return The results
|
||||
*/
|
||||
int foo(int a, const char *s);
|
||||
1. The [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) forms the basis of the fish C++ style guide. There are two major deviations for the fish project. First, a four, rather than two, space indent. Second, line lengths up to 100, rather than 80, characters.
|
||||
|
||||
## Naming
|
||||
1. The `clang-format` command is authoritative with respect to indentation, whitespace around operators, etc. **Note**: this rule should be ignored at this time. After the code is cleaned up this rule will become mandatory.
|
||||
|
||||
All names in code should be `small_snake_case`. No Hungarian notation is used.
|
||||
Classes and structs names should be followed by `_t`.
|
||||
1. All names in code should be `small_snake_case`. No Hungarian notation is used. Classes and structs names should be followed by `_t`.
|
||||
|
||||
[dox]: http://www.stack.nl/~dimitri/doxygen/ "Doxygen homepage"
|
||||
1. Always attach braces to the surrounding context.
|
||||
|
||||
1. Indent with spaces, not tabs and use four spaces per indent.
|
||||
|
||||
1. Comments should always use the C++ style; i.e., each line of the comment should begin with a `//` and should be limited to 100 characters. Comments that do not begin a line should be separated from the previous text by two spaces.
|
||||
|
||||
## Testing
|
||||
|
||||
The source code for fish includes a large collection of tests. If you are making any changes to fish, running these tests is highly recommended to make sure the behaviour remains consistent.
|
||||
|
||||
You are also strongly encouraged to add tests when changing the functionality of fish. Especially if you are fixing a bug to help ensure there are no regressions in the future (i.e., we don't reintroduce the bug).
|
||||
|
||||
### Local testing
|
||||
|
||||
The tests can be run on your local computer on all operating systems.
|
||||
|
||||
Running the tests is only supported from the autotools build and not xcodebuild. On OS X, you will need to install autoconf — we suggest using [Homebrew](http://brew.sh/) to install these tools.
|
||||
|
||||
autoconf
|
||||
./configure
|
||||
make test [gmake on BSD]
|
||||
|
||||
### Travis CI Build and Test
|
||||
|
||||
The Travis Continuous Integration services can be used to test your changes using multiple configurations. This is the same service that the fish shell project uses to ensure new changes haven't broken anything. Thus it is a really good idea that you leverage Travis CI before making a pull-request to avoid embarrasment at breaking the build.
|
||||
|
||||
You will need to [fork the fish-shell repository on GitHub](https://help.github.com/articles/fork-a-repo/). Then setup Travis to test your changes before you make a pull-request:
|
||||
|
||||
1. [Sign in to Travis CI](https://travis-ci.org/auth) with your GitHub account, accepting the GitHub access permissions confirmation.
|
||||
1. Once you're signed in, and your repositories are synchronised, go to your [profile page](https://travis-ci.org/profile) and enable the fish-shell repository.
|
||||
1. Push your changes to GitHub.
|
||||
|
||||
You'll receive an email when the tests are complete telling you whether or not any tests failed.
|
||||
|
||||
You'll find the configuration used to control Travis in the `.travis.yml` file.
|
||||
|
||||
## Installing the Required Tools
|
||||
|
||||
### Installing the Linting Tools
|
||||
|
||||
To install the lint checkers on Mac OS X using HomeBrew:
|
||||
|
||||
```
|
||||
brew tap oclint/formulae
|
||||
brew install oclint
|
||||
brew install cppcheck
|
||||
```
|
||||
|
||||
To install the lint checkers on Linux distros that use Apt:
|
||||
|
||||
```
|
||||
sudo apt-get install clang
|
||||
sudo apt-get install oclint
|
||||
sudo apt-get install cppcheck
|
||||
```
|
||||
|
||||
### Installing the Reformatting Tools
|
||||
|
||||
To install the reformatting tool on Mac OS X using HomeBrew:
|
||||
|
||||
```
|
||||
brew install clang-format
|
||||
```
|
||||
|
||||
To install the reformatting tool on Linux distros that use Apt:
|
||||
|
||||
```
|
||||
apt-cache search clang-format
|
||||
```
|
||||
|
||||
That will list the versions available. Pick the newest one available (3.6 for Ubuntu 14.04 as I write this) and install it:
|
||||
|
||||
```
|
||||
sudo apt-get install clang-format-3.6
|
||||
sudo ln -s /usr/bin/clang-format-3.6 /usr/bin/clang-format
|
||||
|
||||
```
|
||||
|
||||
16
Doxyfile
16
Doxyfile
@@ -274,6 +274,8 @@ ALIASES += "span{2}=\2"
|
||||
ALIASES += "spcl{2}=\2"
|
||||
|
||||
ALIASES += "bksl{1}=\\\1"
|
||||
ALIASES += "pcnt{1}=\%\1"
|
||||
ALIASES += "atat{1}=\@"
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
@@ -835,19 +837,7 @@ RECURSIVE = NO
|
||||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE = print_help.c \
|
||||
xdgmimealias.c \
|
||||
xdgmimealias.h \
|
||||
xdgmime.c \
|
||||
xdgmimeglob.c \
|
||||
xdgmimeglob.h \
|
||||
xdgmime.h \
|
||||
xdgmimeint.c \
|
||||
xdgmimeint.h \
|
||||
xdgmimemagic.c \
|
||||
xdgmimemagic.h \
|
||||
xdgmimeparent.c \
|
||||
xdgmimeparent.h
|
||||
EXCLUDE = print_help.c
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
|
||||
@@ -274,6 +274,8 @@ ALIASES += "span{2}=\2"
|
||||
ALIASES += "spcl{2}=\2"
|
||||
|
||||
ALIASES += "bksl{1}=\\\1"
|
||||
ALIASES += "pcnt{1}=\%\1"
|
||||
ALIASES += "atat{1}=\@"
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
|
||||
@@ -274,6 +274,8 @@ ALIASES += "span{2}=<span style=\"\1\">\2</span>"
|
||||
ALIASES += "spcl{2}=<span class=\"\1\">\2</span>"
|
||||
|
||||
ALIASES += "bksl{1}=<span>\</span>\1"
|
||||
ALIASES += "pcnt{1}=<span>%</span>\1"
|
||||
ALIASES += "atat{1}=<span>@</span>"
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
|
||||
678
Makefile.in
678
Makefile.in
@@ -23,6 +23,11 @@
|
||||
# applications, install them, and recalculate dependencies.
|
||||
#
|
||||
|
||||
# This is the default value for SHELL but I like to be explicit about such
|
||||
# things. Especially in a project like fish where someone might otherwise
|
||||
# think fish will be used to execute make recipes.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# Used by docdir
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
|
||||
@@ -48,13 +53,27 @@ mandir = @mandir@
|
||||
sysconfdir = @sysconfdir@
|
||||
docdir = @docdir@
|
||||
localedir = @localedir@
|
||||
extra_completionsdir = @extra_completionsdir@
|
||||
extra_functionsdir = @extra_functionsdir@
|
||||
extra_confdir = @extra_confdir@
|
||||
|
||||
#
|
||||
# pcre2
|
||||
#
|
||||
|
||||
PCRE2_WIDTH = @WCHAR_T_BITS@
|
||||
PCRE2_DIR = pcre2-10.21
|
||||
PCRE2_LIBDIR = $(PCRE2_DIR)/.libs
|
||||
PCRE2_LIB = $(PCRE2_LIBDIR)/libpcre2-$(PCRE2_WIDTH).a
|
||||
PCRE2_H = $(PCRE2_DIR)/src/pcre2.h
|
||||
EXTRA_PCRE2 = @EXTRA_PCRE2@
|
||||
|
||||
#
|
||||
# Various flags
|
||||
#
|
||||
|
||||
MACROS = -DLOCALEDIR=\"$(localedir)\" -DPREFIX=L\"$(prefix)\" -DDATADIR=L\"$(datadir)\" -DSYSCONFDIR=L\"$(sysconfdir)\" -DBINDIR=L\"$(bindir)\" -DDOCDIR=L\"$(docdir)\"
|
||||
CXXFLAGS = @CXXFLAGS@ $(MACROS) $(EXTRA_CXXFLAGS)
|
||||
CXXFLAGS = @CXXFLAGS@ -iquote. -iquote./src/ $(MACROS) $(EXTRA_CXXFLAGS)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
@@ -72,52 +91,45 @@ HAVE_GETTEXT=@HAVE_GETTEXT@
|
||||
|
||||
HAVE_DOXYGEN=@HAVE_DOXYGEN@
|
||||
|
||||
#
|
||||
#Additional .cpp files used by common.o. These also have a corresponding
|
||||
#.h file.
|
||||
#
|
||||
|
||||
COMMON_FILES := util.cpp fallback.cpp
|
||||
|
||||
|
||||
#
|
||||
# All objects that the system needs to build fish, except fish.o
|
||||
#
|
||||
|
||||
FISH_OBJS := function.o builtin.o complete.o env.o exec.o expand.o \
|
||||
highlight.o history.o kill.o parser.o proc.o reader.o sanity.o \
|
||||
tokenizer.o wildcard.o wgetopt.o wutil.o input.o output.o intern.o \
|
||||
env_universal_common.o input_common.o event.o \
|
||||
signal.o io.o parse_util.o common.o screen.o path.o autoload.o \
|
||||
parser_keywords.o iothread.o color.o postfork.o \
|
||||
builtin_test.o parse_tree.o parse_productions.o parse_execution.o \
|
||||
pager.o utf8.o fish_version.o wcstringutil.o
|
||||
FISH_OBJS := obj/function.o obj/builtin.o obj/complete.o obj/env.o obj/exec.o \
|
||||
obj/expand.o obj/highlight.o obj/history.o obj/kill.o obj/parser.o \
|
||||
obj/proc.o obj/reader.o obj/sanity.o obj/tokenizer.o obj/wildcard.o \
|
||||
obj/wgetopt.o obj/wutil.o obj/input.o obj/output.o obj/intern.o \
|
||||
obj/env_universal_common.o obj/input_common.o obj/event.o obj/signal.o \
|
||||
obj/io.o obj/parse_util.o obj/common.o obj/screen.o obj/path.o \
|
||||
obj/autoload.o obj/parser_keywords.o obj/iothread.o obj/color.o \
|
||||
obj/postfork.o obj/builtin_string.o obj/builtin_test.o obj/parse_tree.o \
|
||||
obj/parse_productions.o obj/parse_execution.o obj/pager.o obj/utf8.o \
|
||||
obj/fish_version.o obj/wcstringutil.o
|
||||
|
||||
FISH_INDENT_OBJS := fish_indent.o print_help.o $(FISH_OBJS)
|
||||
FISH_INDENT_OBJS := obj/fish_indent.o obj/print_help.o $(FISH_OBJS)
|
||||
|
||||
#
|
||||
# Additional files used by builtin.o
|
||||
#
|
||||
|
||||
BUILTIN_FILES := builtin_set.cpp builtin_commandline.cpp \
|
||||
builtin_ulimit.cpp builtin_complete.cpp builtin_jobs.cpp \
|
||||
builtin_set_color.cpp builtin_printf.cpp
|
||||
BUILTIN_FILES := src/builtin_set.cpp src/builtin_commandline.cpp \
|
||||
src/builtin_ulimit.cpp src/builtin_complete.cpp \
|
||||
src/builtin_jobs.cpp src/builtin_set_color.cpp \
|
||||
src/builtin_printf.cpp
|
||||
|
||||
|
||||
#
|
||||
# All objects that the system needs to build fish_tests
|
||||
#
|
||||
|
||||
FISH_TESTS_OBJS := $(FISH_OBJS) fish_tests.o
|
||||
FISH_TESTS_OBJS := $(FISH_OBJS) obj/fish_tests.o
|
||||
|
||||
|
||||
#
|
||||
# All objects needed to build mimedb
|
||||
# All of the sources that produce object files
|
||||
# (that is, are not themselves #included in other source files)
|
||||
#
|
||||
|
||||
MIME_OBJS := mimedb.o print_help.o xdgmimealias.o xdgmime.o \
|
||||
xdgmimeglob.o xdgmimeint.o xdgmimemagic.o xdgmimeparent.o wutil.o \
|
||||
common.o fish_version.o
|
||||
FISH_ALL_OBJS := $(sort $(FISH_OBJS) $(FISH_INDENT_OBJS) $(FISH_TESTS_OBJS) \
|
||||
obj/fish.o obj/key_reader.o)
|
||||
|
||||
|
||||
#
|
||||
@@ -178,7 +190,7 @@ FUNCTIONS_DIR_FILES := $(wildcard share/functions/*.fish)
|
||||
# Programs to install
|
||||
#
|
||||
|
||||
PROGRAMS := fish mimedb fish_indent
|
||||
PROGRAMS := fish fish_indent
|
||||
|
||||
#
|
||||
# Manual pages to install
|
||||
@@ -204,7 +216,7 @@ endif
|
||||
#
|
||||
|
||||
ifeq ($(HAVE_DOXYGEN), 1)
|
||||
user_doc=user_doc
|
||||
user_doc=doc
|
||||
share_man=share/man
|
||||
else
|
||||
user_doc=
|
||||
@@ -215,7 +227,7 @@ endif
|
||||
# Make everything needed for installing fish
|
||||
#
|
||||
|
||||
all: $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) fish.pc
|
||||
all: $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) fish.pc share/__fish_build_paths.fish
|
||||
@echo fish has now been built.
|
||||
@echo Use \'$(MAKE) install\' to install fish.
|
||||
.PHONY: all
|
||||
@@ -227,9 +239,9 @@ all: $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) fish.pc
|
||||
FISH-BUILD-VERSION-FILE: FORCE
|
||||
@./build_tools/git_version_gen.sh
|
||||
-include FISH-BUILD-VERSION-FILE
|
||||
CPPFLAGS += -DFISH_BUILD_VERSION=\"$(FISH_BUILD_VERSION)\"
|
||||
CXXFLAGS += -DFISH_BUILD_VERSION=\"$(FISH_BUILD_VERSION)\"
|
||||
.PHONY: FORCE
|
||||
fish_version.o: FISH-BUILD-VERSION-FILE
|
||||
obj/fish_version.o: FISH-BUILD-VERSION-FILE
|
||||
|
||||
|
||||
#
|
||||
@@ -257,41 +269,52 @@ prof: all
|
||||
#
|
||||
# User documentation, describing the features of the fish shell.
|
||||
#
|
||||
|
||||
# Depend on the sources (*.hdr.in) and manually make the
|
||||
# intermediate *.hdr and doc.h files if needed
|
||||
# The sed command deletes everything including and after the first -, for simpler version numbers
|
||||
# Cleans up the user_doc/html directory once Doxygen is done.
|
||||
|
||||
user_doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h $(HDR_FILES) lexicon_filter
|
||||
# Depend on the sources (*.hdr.in) and manually make the intermediate *.hdr
|
||||
# and doc.h files if needed. The sed command deletes everything including and
|
||||
# after the first -, for simpler version numbers. Cleans up the user_doc/html
|
||||
# directory once Doxygen is done.
|
||||
#
|
||||
doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h \
|
||||
$(HDR_FILES) lexicon_filter
|
||||
(cat Doxyfile.user; echo INPUT_FILTER=./lexicon_filter; \
|
||||
echo PROJECT_NUMBER=$(FISH_BUILD_VERSION) | $(SED) "s/-.*//") | doxygen - && touch user_doc; \
|
||||
cd user_doc/html && rm -f bc_s.png bdwn.png closed.png ftv2*.png nav*.png open.png sync_*.png tab*.* doxygen.* dynsections.js jquery.js pages.html
|
||||
|
||||
#
|
||||
# Source code documentation. Also includes user documentation.
|
||||
#
|
||||
|
||||
doc: *.h *.cpp doc.h Doxyfile lexicon_filter
|
||||
(cat Doxyfile; echo INPUT_FILTER=./lexicon_filter; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION)) | doxygen - ;
|
||||
|
||||
echo PROJECT_NUMBER=$(FISH_BUILD_VERSION) | $(SED) "s/-.*//") | \
|
||||
doxygen - && touch user_doc; \
|
||||
cd user_doc/html && rm -f arrow*.png bc_s.png bdwn.png closed.png \
|
||||
doc.png folder*.png ftv2*.png nav*.png open.png splitbar.png \
|
||||
sync_*.png tab*.* doxygen.* dynsections.js jquery.js pages.html
|
||||
|
||||
#
|
||||
# PDF version of the source code documentation.
|
||||
#
|
||||
|
||||
doc/refman.pdf: doc
|
||||
cd doc/latex && \
|
||||
make && \
|
||||
mv refman.pdf ..;
|
||||
rm -r doc/latex;
|
||||
|
||||
# Prep the environment for running the unit tests. When specifying DESTDIR on
|
||||
# the command line (e.g., `make DESTDIR=/usr/local/`) you must have previously
|
||||
# installed fish using the same prefix; e.g., `./configure --prefix=/usr/local`
|
||||
# followed by `make install`.
|
||||
test-prep:
|
||||
rm -rf test
|
||||
mkdir test test/data test/home test/temp
|
||||
ifdef DESTDIR
|
||||
ln -s $(DESTDIR) test/root
|
||||
else
|
||||
mkdir test/root
|
||||
endif
|
||||
.PHONY: test-prep
|
||||
|
||||
# The test target runs both the low level code tests and the high level script
|
||||
# tests.
|
||||
#
|
||||
# This target runs both the low level code tests and the high level script tests.
|
||||
#
|
||||
|
||||
test: test_low_level test_high_level
|
||||
# Note that doing `make DESTDIR=/some/path/ test` overrides this assignment.
|
||||
test: DESTDIR = $(PWD)/test/root/
|
||||
test: prefix = .
|
||||
test: test-prep install-force test_low_level test_high_level
|
||||
@rm -f /tmp/file_truncation_test.txt /tmp/tee_test.txt /tmp/fish_foo.txt
|
||||
@rm -rf /tmp/is_potential_path_test
|
||||
.PHONY: test
|
||||
|
||||
# We want the various tests to run serially so their output doesn't mix
|
||||
@@ -314,12 +337,12 @@ test_low_level: fish_tests $(call filter_up_to,test_low_level,$(active_test_goal
|
||||
test_high_level: test_fishscript test_interactive
|
||||
.PHONY: test_high_level
|
||||
|
||||
test_fishscript: $(PROGRAMS) $(call filter_up_to,test_fishscript,$(active_test_goals))
|
||||
cd tests && ../fish test.fish
|
||||
test_fishscript: $(call filter_up_to,test_fishscript,$(active_test_goals))
|
||||
cd tests; ../test/root/bin/fish test.fish
|
||||
.PHONY: test_fishscript
|
||||
|
||||
test_interactive: $(PROGRAMS) $(call filter_up_to,test_interactive,$(active_test_goals))
|
||||
cd tests && ../fish interactive.fish
|
||||
test_interactive: $(call filter_up_to,test_interactive,$(active_test_goals))
|
||||
cd tests; ../test/root/bin/fish interactive.fish
|
||||
.PHONY: test_interactive
|
||||
|
||||
#
|
||||
@@ -447,6 +470,9 @@ doc.h: $(HDR_FILES)
|
||||
-e "s,@sysconfdir\@,$(sysconfdir),g" \
|
||||
-e "s,@datadir\@,$(datadir),g" \
|
||||
-e "s,@docdir\@,$(docdir),g" \
|
||||
-e "s,@extra_completionsdir\@,$(extra_completionsdir),g" \
|
||||
-e "s,@extra_functionsdir\@,$(extra_functionsdir),g" \
|
||||
-e "s,@extra_confdir\@,$(extra_confdir),g" \
|
||||
-e "s|@configure_input\@|$@, generated from $@.in by the Makefile. DO NOT MANUALLY EDIT THIS FILE!|g" \
|
||||
-e "s,@prefix\@,$(prefix),g" \
|
||||
-e "s,@fish_build_version\@,$(FISH_BUILD_VERSION),g" \
|
||||
@@ -474,14 +500,15 @@ doc.h: $(HDR_FILES)
|
||||
# Create a template translation object
|
||||
#
|
||||
|
||||
messages.pot: *.cpp *.h share/completions/*.fish share/functions/*.fish
|
||||
xgettext -k_ -kN_ *.cpp *.h -o messages.pot
|
||||
messages.pot: src/*.cpp src/*.h share/completions/*.fish share/functions/*.fish
|
||||
xgettext -k_ -kN_ src/*.cpp src/*.h -o messages.pot
|
||||
xgettext -j -k_ -kN_ -k--description -LShell --from-code=UTF-8 share/completions/*.fish share/functions/*.fish -o messages.pot
|
||||
|
||||
builtin.o: $(BUILTIN_FILES)
|
||||
|
||||
common.o: $(COMMON_FILES)
|
||||
|
||||
ifdef EXTRA_PCRE2
|
||||
src/builtin_string.cpp: $(PCRE2_H)
|
||||
endif
|
||||
|
||||
#
|
||||
# Generate the internal help functions by making doxygen create
|
||||
@@ -563,10 +590,19 @@ check-legacy-binaries:
|
||||
echo "An outdated set_color from a previous fish install was found. You should remove it with:";\
|
||||
echo " rm '$$SETCOLOR_LOC'";\
|
||||
fi;
|
||||
@MIMEDB_LOC=$(prefix)/bin/mimedb;\
|
||||
if test -x "$$MIMEDB_LOC" && $$MIMEDB_LOC --version 2>&1 | grep -q "^mimedb, version "; then\
|
||||
echo "An outdated mimedb binary from a previous fish install was found. You should remove it with:";\
|
||||
echo " rm '$$MIMEDB_LOC'";\
|
||||
fi;
|
||||
@FISHD_LOC=$(prefix)/bin/fishd;\
|
||||
if test -x "$$FISHD_LOC" && $$FISHD_LOC --version 2>&1 | grep -q "^fishd: fishd, version "; then\
|
||||
echo "An outdated fishd binary from a previous fish install was found. You should remove it with:";\
|
||||
echo " rm '$$FISHD_LOC'";\
|
||||
fi;
|
||||
@true;
|
||||
.PHONY: check-legacy-binaries
|
||||
|
||||
|
||||
#
|
||||
# This check makes sure that the install-sh script is executable. The
|
||||
# darcs repo doesn't preserve the executable bit, so this needs to be
|
||||
@@ -577,12 +613,30 @@ install-sh:
|
||||
if test -x $@; then true; else chmod 755 $@; fi
|
||||
.PHONY: install-sh
|
||||
|
||||
|
||||
#
|
||||
# Try to install after checking for incompatible installed versions.
|
||||
#
|
||||
|
||||
install: all install-sh check-uninstall install-force check-legacy-binaries
|
||||
@echo fish is now installed on your system.
|
||||
@echo To run fish, type \'fish\' in your terminal.
|
||||
@echo
|
||||
@if type chsh >/dev/null 2>&1; then \
|
||||
echo To use fish as your login shell:; \
|
||||
grep -q -- "$(DESTDIR)$(bindir)/fish" /etc/shells || echo \* add the line \'$(DESTDIR)$(bindir)/fish\' to the file \'/etc/shells\'.; \
|
||||
echo \* use the command \'chsh -s $(DESTDIR)$(bindir)/fish\'.; \
|
||||
echo; \
|
||||
fi;
|
||||
@if type chcon >/dev/null 2>&1; then \
|
||||
echo If you have SELinux enabled, you may need to manually update the security policy:; \
|
||||
echo \* use the command \'chcon -t shell_exec_t $(DESTDIR)$(bindir)/fish\'.; \
|
||||
echo; \
|
||||
fi;
|
||||
@echo To set your colors, run \'fish_config\'
|
||||
@echo To scan your man pages for completions, run \'fish_update_completions\'
|
||||
@echo To autocomplete command suggestions press Ctrl + F or right arrow key.
|
||||
@echo
|
||||
@echo Have fun!
|
||||
.PHONY: install
|
||||
|
||||
#
|
||||
@@ -595,11 +649,10 @@ xcode-install:
|
||||
.PHONY: xcode-install
|
||||
|
||||
#
|
||||
# Force installation, even in presense of incompatible previous
|
||||
# version. This may fail.
|
||||
# These 'true' lines are to prevent installs from failing for (e.g.) missing man pages.
|
||||
# Force installation, even in presense of incompatible previous version. This
|
||||
# may fail. These 'true' lines are to prevent installs from failing for (e.g.)
|
||||
# missing man pages.
|
||||
#
|
||||
|
||||
install-force: all install-translations
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
|
||||
for i in $(PROGRAMS); do\
|
||||
@@ -607,9 +660,12 @@ install-force: all install-translations
|
||||
true ;\
|
||||
done;
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/fish
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/fish/conf.d
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/vendor_completions.d
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(extra_completionsdir)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(extra_functionsdir)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(extra_confdir)
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/functions
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/man/man1
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools
|
||||
@@ -619,6 +675,7 @@ install-force: all install-translations
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/sample_prompts
|
||||
$(INSTALL) -m 644 etc/config.fish $(DESTDIR)$(sysconfdir)/fish/
|
||||
$(INSTALL) -m 644 share/config.fish $(DESTDIR)$(datadir)/fish/
|
||||
$(INSTALL) -m 644 share/__fish_build_paths.fish $(DESTDIR)$(datadir)/fish/
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/pkgconfig
|
||||
$(INSTALL) -m 644 fish.pc $(DESTDIR)$(datadir)/pkgconfig
|
||||
for i in $(COMPLETIONS_DIR_FILES:%='%'); do \
|
||||
@@ -669,25 +726,6 @@ install-force: all install-translations
|
||||
$(INSTALL) -m 644 $$i $(DESTDIR)$(mandir)/man1/; \
|
||||
true; \
|
||||
done;
|
||||
@echo fish is now installed on your system.
|
||||
@echo To run fish, type \'fish\' in your terminal.
|
||||
@echo
|
||||
@if type chsh >/dev/null 2>&1; then \
|
||||
echo To use fish as your login shell:; \
|
||||
grep -q -- "$(DESTDIR)$(bindir)/fish" /etc/shells || echo \* add the line \'$(DESTDIR)$(bindir)/fish\' to the file \'/etc/shells\'.; \
|
||||
echo \* use the command \'chsh -s $(DESTDIR)$(bindir)/fish\'.; \
|
||||
echo; \
|
||||
fi;
|
||||
@if type chcon >/dev/null 2>&1; then \
|
||||
echo If you have SELinux enabled, you may need to manually update the security policy:; \
|
||||
echo \* use the command \'chcon -t shell_exec_t $(DESTDIR)$(bindir)/fish\'.; \
|
||||
echo; \
|
||||
fi;
|
||||
@echo To set your colors, run \'fish_config\'
|
||||
@echo To scan your man pages for completions, run \'fish_update_completions\'
|
||||
@echo To autocomplete command suggestions press Ctrl + F or right arrow key.
|
||||
@echo
|
||||
@echo Have fun!
|
||||
.PHONY: install-force
|
||||
|
||||
|
||||
@@ -760,263 +798,313 @@ uninstall-translations:
|
||||
# The build rules for all the commands
|
||||
#
|
||||
|
||||
#
|
||||
# How basic files get compiled
|
||||
#
|
||||
obj/%.o: src/%.cpp | obj
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
#
|
||||
# obj directory
|
||||
#
|
||||
obj:
|
||||
mkdir obj
|
||||
|
||||
#
|
||||
# Build the fish program.
|
||||
#
|
||||
|
||||
fish: $(FISH_OBJS) fish.o
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) $(FISH_OBJS) fish.o $(LIBS) -o $@
|
||||
fish: $(FISH_OBJS) obj/fish.o $(EXTRA_PCRE2)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) $(FISH_OBJS) obj/fish.o $(LIBS) -o $@
|
||||
|
||||
$(PCRE2_LIB): $(PCRE2_H)
|
||||
$(MAKE) -C $(PCRE2_DIR) libpcre2-$(PCRE2_WIDTH).la
|
||||
|
||||
$(PCRE2_H):
|
||||
(cd $(PCRE2_DIR) && ./config.status)
|
||||
|
||||
#
|
||||
# Build the fish_tests program.
|
||||
#
|
||||
|
||||
fish_tests: $(FISH_TESTS_OBJS)
|
||||
fish_tests: $(FISH_TESTS_OBJS) $(EXTRA_PCRE2)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) $(FISH_TESTS_OBJS) $(LIBS) -o $@
|
||||
|
||||
|
||||
#
|
||||
# Build the mimedb program.
|
||||
#
|
||||
|
||||
mimedb: $(MIME_OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(MIME_OBJS) $(LIBS) -o $@
|
||||
|
||||
|
||||
#
|
||||
# Build the fish_indent program.
|
||||
#
|
||||
|
||||
fish_indent: $(FISH_INDENT_OBJS)
|
||||
fish_indent: $(FISH_INDENT_OBJS) $(EXTRA_PCRE2)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(FISH_INDENT_OBJS) $(LIBS) -o $@
|
||||
|
||||
|
||||
#
|
||||
# Neat little program to show output from terminal
|
||||
#
|
||||
|
||||
key_reader: $(FISH_OBJS) key_reader.o
|
||||
key_reader: $(FISH_OBJS) $(EXTRA_PCRE2) obj/key_reader.o
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) $^ $(LIBS) -o $@
|
||||
|
||||
|
||||
#
|
||||
# Update dependencies
|
||||
# Unfortunately makedepend cannot handle source files in one directory
|
||||
# and object files in another. So we have to cons up a fake directory
|
||||
# tree and run it there. Note that some .cpp files do not result in
|
||||
# objects because they are #include'd directly. In that case we need to
|
||||
# leave them in the 'header' directory, so they get picked up by the
|
||||
# dependencies. So we put everything in the header directory and move out
|
||||
# exactly the files that result in objects, leaving the #include'd files
|
||||
# behind.
|
||||
#
|
||||
depend:
|
||||
makedepend -fMakefile.in -Y *.cpp
|
||||
mkdir -p /tmp/fish_make_depend/src
|
||||
cp src/*.cpp src/*.h /tmp/fish_make_depend/src
|
||||
cp config.h /tmp/fish_make_depend/
|
||||
mv $(subst obj/,/tmp/fish_make_depend/src/,$(FISH_ALL_OBJS:.o=.cpp)) /tmp/fish_make_depend/
|
||||
cd /tmp/fish_make_depend && \
|
||||
makedepend -f$(CURDIR)/Makefile.in -pobj/ -Y -Isrc *.cpp
|
||||
rm -Rf /tmp/fish_make_depend
|
||||
./config.status
|
||||
.PHONY: depend
|
||||
|
||||
# Include What You Use
|
||||
iwyu:
|
||||
# Requires the --keep-going flag as it always returns 1
|
||||
# Can't set MAKEFLAGS on a target-specific basic
|
||||
$(MAKE) -k _iwyu CXX=include-what-you-use
|
||||
_iwyu: clean $(PROGRAMS)
|
||||
.PHONY: iwyu _iwyu
|
||||
|
||||
# Lint the code. This only deals with C++ files.
|
||||
lint:
|
||||
build_tools/lint.fish $(CXX) $(CXXFLAGS)
|
||||
lint-all:
|
||||
build_tools/lint.fish $(CXX) --all $(CXXFLAGS)
|
||||
.PHONY: lint lint-all
|
||||
|
||||
# Run the code through the style refomatter. This handles both C++ files and
|
||||
# fish scripts (*.fish).
|
||||
style:
|
||||
build_tools/style.fish
|
||||
style-all:
|
||||
build_tools/style.fish --all
|
||||
.PHONY: lint lint-all
|
||||
|
||||
#
|
||||
# Cleanup targets
|
||||
#
|
||||
|
||||
#
|
||||
# distclean should restore the tree to the state right after extracting a tarball.
|
||||
#
|
||||
|
||||
# Restore the source tree to the state right after extracting a tarball.
|
||||
distclean: clean
|
||||
$(MAKE) -C $(PCRE2_DIR) distclean || true
|
||||
rm -f config.status config.log config.h Makefile
|
||||
.PHONY: distclean
|
||||
|
||||
|
||||
# Remove everything built by the Makefile, but not things that are created by
|
||||
# the configure script.
|
||||
#
|
||||
# clean removes everything built by the makefile, but not things that
|
||||
# are created by the configure script.
|
||||
#
|
||||
|
||||
# Don't delete the docs unless we have Doxygen installed
|
||||
# We provide pre-built docs in the tarball, and if they get
|
||||
# deleted we won't be able to regenerate them
|
||||
|
||||
# Don't delete the docs unless we have Doxygen installed We provide pre-built
|
||||
# docs in the tarball, and if they get deleted we won't be able to regenerate
|
||||
# them.
|
||||
clean:
|
||||
rm -f *.o doc.h doc.tmp doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr
|
||||
$(MAKE) -C $(PCRE2_DIR) clean || true
|
||||
rm -f obj/*.o *.o doc.h doc.tmp
|
||||
rm -f doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr
|
||||
rm -f tests/tmp.err tests/tmp.out tests/tmp.status tests/foo.txt
|
||||
rm -f $(PROGRAMS) fish_tests key_reader
|
||||
rm -f command_list.txt command_list_toc.txt toc.txt
|
||||
rm -f doc_src/index.hdr doc_src/commands.hdr
|
||||
rm -f lexicon_filter lexicon.txt lexicon.log
|
||||
rm -f FISH-BUILD-VERSION-FILE
|
||||
rm -f compile_commands.json xcodebuild.log
|
||||
rm -f FISH-BUILD-VERSION-FILE fish.pc share/__fish_build_paths.fish
|
||||
if test "$(HAVE_DOXYGEN)" = 1; then \
|
||||
rm -rf doc user_doc share/man; \
|
||||
fi
|
||||
rm -f po/*.gmo
|
||||
rm -rf obj build test
|
||||
.PHONY: clean
|
||||
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
autoload.o: config.h autoload.h common.h util.h lru.h wutil.h signal.h env.h
|
||||
autoload.o: exec.h proc.h io.h parse_tree.h tokenizer.h parse_constants.h
|
||||
builtin.o: config.h signal.h fallback.h util.h wutil.h common.h builtin.h
|
||||
builtin.o: io.h function.h event.h env.h complete.h proc.h parse_tree.h
|
||||
builtin.o: tokenizer.h parse_constants.h parser.h reader.h highlight.h
|
||||
builtin.o: color.h wgetopt.h sanity.h wildcard.h expand.h input_common.h
|
||||
builtin.o: input.h intern.h exec.h parse_util.h autoload.h lru.h
|
||||
builtin.o: parser_keywords.h path.h history.h wcstringutil.h builtin_set.cpp
|
||||
builtin.o: builtin_commandline.cpp builtin_complete.cpp builtin_ulimit.cpp
|
||||
builtin.o: builtin_jobs.cpp builtin_set_color.cpp output.h screen.h
|
||||
builtin.o: builtin_printf.cpp
|
||||
builtin_commandline.o: config.h signal.h fallback.h util.h wutil.h common.h
|
||||
builtin_commandline.o: builtin.h io.h wgetopt.h reader.h complete.h
|
||||
builtin_commandline.o: highlight.h env.h color.h proc.h parse_tree.h
|
||||
builtin_commandline.o: tokenizer.h parse_constants.h parser.h event.h
|
||||
builtin_commandline.o: function.h input_common.h input.h parse_util.h
|
||||
builtin_commandline.o: autoload.h lru.h
|
||||
builtin_complete.o: config.h signal.h fallback.h util.h wutil.h common.h
|
||||
builtin_complete.o: builtin.h io.h complete.h wgetopt.h parser.h proc.h
|
||||
builtin_complete.o: parse_tree.h tokenizer.h parse_constants.h event.h
|
||||
builtin_complete.o: function.h env.h reader.h highlight.h color.h
|
||||
builtin_jobs.o: config.h fallback.h signal.h util.h wutil.h common.h
|
||||
builtin_jobs.o: builtin.h io.h proc.h parse_tree.h tokenizer.h
|
||||
builtin_jobs.o: parse_constants.h parser.h event.h function.h env.h wgetopt.h
|
||||
builtin_printf.o: common.h util.h
|
||||
builtin_set.o: config.h signal.h fallback.h util.h wutil.h common.h builtin.h
|
||||
builtin_set.o: io.h env.h expand.h parse_constants.h wgetopt.h proc.h
|
||||
builtin_set.o: parse_tree.h tokenizer.h parser.h event.h function.h
|
||||
builtin_set_color.o: config.h builtin.h util.h io.h common.h color.h output.h
|
||||
builtin_set_color.o: screen.h highlight.h env.h
|
||||
builtin_test.o: config.h common.h util.h builtin.h io.h wutil.h proc.h
|
||||
builtin_test.o: signal.h parse_tree.h tokenizer.h parse_constants.h
|
||||
builtin_ulimit.o: config.h fallback.h signal.h util.h builtin.h io.h common.h
|
||||
builtin_ulimit.o: wgetopt.h
|
||||
color.o: color.h config.h common.h util.h fallback.h signal.h
|
||||
common.o: config.h fallback.h signal.h util.h wutil.h common.h expand.h
|
||||
common.o: parse_constants.h proc.h io.h parse_tree.h tokenizer.h wildcard.h
|
||||
common.o: complete.h parser.h event.h function.h env.h util.cpp fallback.cpp
|
||||
complete.o: config.h signal.h fallback.h util.h tokenizer.h common.h
|
||||
complete.o: wildcard.h expand.h parse_constants.h complete.h proc.h io.h
|
||||
complete.o: parse_tree.h parser.h event.h function.h env.h builtin.h exec.h
|
||||
complete.o: reader.h highlight.h color.h history.h wutil.h intern.h
|
||||
complete.o: parse_util.h autoload.h lru.h parser_keywords.h path.h iothread.h
|
||||
env.o: config.h signal.h fallback.h util.h wutil.h common.h proc.h io.h
|
||||
env.o: parse_tree.h tokenizer.h parse_constants.h env.h sanity.h expand.h
|
||||
env.o: history.h reader.h complete.h highlight.h color.h parser.h event.h
|
||||
env.o: function.h env_universal_common.h input.h input_common.h path.h
|
||||
env.o: fish_version.h
|
||||
env_universal_common.o: config.h env_universal_common.h wutil.h common.h
|
||||
env_universal_common.o: util.h env.h fallback.h signal.h utf8.h path.h
|
||||
env_universal_common.o: iothread.h
|
||||
event.o: config.h signal.h fallback.h util.h wutil.h common.h function.h
|
||||
event.o: event.h env.h input_common.h proc.h io.h parse_tree.h tokenizer.h
|
||||
event.o: parse_constants.h parser.h
|
||||
exec.o: config.h signal.h fallback.h util.h iothread.h postfork.h common.h
|
||||
exec.o: proc.h io.h parse_tree.h tokenizer.h parse_constants.h wutil.h exec.h
|
||||
exec.o: parser.h event.h function.h env.h builtin.h wildcard.h expand.h
|
||||
exec.o: complete.h sanity.h parse_util.h autoload.h lru.h
|
||||
expand.o: config.h signal.h fallback.h util.h common.h wutil.h env.h proc.h
|
||||
expand.o: io.h parse_tree.h tokenizer.h parse_constants.h parser.h event.h
|
||||
expand.o: function.h expand.h wildcard.h complete.h exec.h iothread.h
|
||||
expand.o: parse_util.h autoload.h lru.h
|
||||
fallback.o: config.h fallback.h signal.h util.h
|
||||
fish.o: config.h signal.h fallback.h util.h common.h reader.h io.h complete.h
|
||||
fish.o: highlight.h env.h color.h builtin.h function.h event.h wutil.h
|
||||
fish.o: sanity.h proc.h parse_tree.h tokenizer.h parse_constants.h parser.h
|
||||
fish.o: expand.h intern.h exec.h output.h screen.h history.h path.h input.h
|
||||
fish.o: input_common.h fish_version.h
|
||||
fish_indent.o: config.h fallback.h signal.h util.h common.h wutil.h
|
||||
fish_indent.o: tokenizer.h print_help.h parser_keywords.h fish_version.h
|
||||
fish_tests.o: config.h signal.h fallback.h util.h common.h proc.h io.h
|
||||
fish_tests.o: parse_tree.h tokenizer.h parse_constants.h reader.h complete.h
|
||||
fish_tests.o: highlight.h env.h color.h builtin.h function.h event.h
|
||||
fish_tests.o: autoload.h lru.h wutil.h expand.h parser.h output.h screen.h
|
||||
fish_tests.o: exec.h path.h history.h iothread.h postfork.h parse_util.h
|
||||
fish_tests.o: pager.h input.h input_common.h utf8.h env_universal_common.h
|
||||
fish_tests.o: wcstringutil.h
|
||||
fish_version.o: fish_version.h
|
||||
function.o: config.h signal.h wutil.h common.h util.h fallback.h function.h
|
||||
function.o: event.h env.h proc.h io.h parse_tree.h tokenizer.h
|
||||
function.o: parse_constants.h parser.h intern.h reader.h complete.h
|
||||
function.o: highlight.h color.h parse_util.h autoload.h lru.h
|
||||
function.o: parser_keywords.h expand.h
|
||||
highlight.o: config.h signal.h fallback.h util.h wutil.h common.h highlight.h
|
||||
highlight.o: env.h color.h tokenizer.h proc.h io.h parse_tree.h
|
||||
highlight.o: parse_constants.h parser.h event.h function.h parse_util.h
|
||||
highlight.o: autoload.h lru.h parser_keywords.h builtin.h expand.h sanity.h
|
||||
highlight.o: complete.h output.h screen.h wildcard.h path.h history.h
|
||||
history.o: config.h fallback.h signal.h util.h sanity.h tokenizer.h common.h
|
||||
history.o: reader.h io.h complete.h highlight.h env.h color.h parse_tree.h
|
||||
history.o: parse_constants.h wutil.h history.h intern.h path.h autoload.h
|
||||
history.o: lru.h iothread.h
|
||||
input.o: config.h signal.h fallback.h util.h wutil.h common.h reader.h io.h
|
||||
input.o: complete.h highlight.h env.h color.h proc.h parse_tree.h tokenizer.h
|
||||
input.o: parse_constants.h sanity.h input_common.h input.h parser.h event.h
|
||||
input.o: function.h expand.h output.h screen.h intern.h
|
||||
input_common.o: config.h fallback.h signal.h util.h common.h wutil.h
|
||||
input_common.o: input_common.h env_universal_common.h env.h iothread.h
|
||||
intern.o: config.h fallback.h signal.h util.h wutil.h common.h intern.h
|
||||
io.o: config.h fallback.h signal.h util.h wutil.h common.h exec.h proc.h io.h
|
||||
io.o: parse_tree.h tokenizer.h parse_constants.h
|
||||
iothread.o: config.h iothread.h common.h util.h signal.h
|
||||
key_reader.o: config.h common.h util.h fallback.h signal.h input_common.h
|
||||
kill.o: config.h signal.h fallback.h util.h wutil.h common.h kill.h proc.h
|
||||
kill.o: io.h parse_tree.h tokenizer.h parse_constants.h sanity.h env.h exec.h
|
||||
kill.o: path.h
|
||||
mimedb.o: config.h xdgmime.h fallback.h signal.h util.h print_help.h
|
||||
mimedb.o: fish_version.h
|
||||
output.o: config.h signal.h fallback.h util.h wutil.h common.h expand.h
|
||||
output.o: parse_constants.h output.h screen.h highlight.h env.h color.h
|
||||
pager.o: config.h pager.h complete.h util.h common.h screen.h highlight.h
|
||||
pager.o: env.h color.h reader.h io.h input_common.h wutil.h
|
||||
parse_execution.o: parse_execution.h config.h util.h parse_tree.h common.h
|
||||
parse_execution.o: tokenizer.h parse_constants.h proc.h signal.h io.h
|
||||
parse_execution.o: parse_util.h autoload.h lru.h complete.h wildcard.h
|
||||
parse_execution.o: expand.h builtin.h parser.h event.h function.h env.h
|
||||
parse_execution.o: reader.h highlight.h color.h wutil.h exec.h path.h
|
||||
parse_productions.o: parse_productions.h parse_tree.h config.h util.h
|
||||
parse_productions.o: common.h tokenizer.h parse_constants.h
|
||||
parse_tree.o: parse_productions.h parse_tree.h config.h util.h common.h
|
||||
parse_tree.o: tokenizer.h parse_constants.h fallback.h signal.h wutil.h
|
||||
parse_tree.o: proc.h io.h
|
||||
parse_util.o: config.h fallback.h signal.h util.h wutil.h common.h
|
||||
parse_util.o: tokenizer.h parse_util.h autoload.h lru.h parse_tree.h
|
||||
parse_util.o: parse_constants.h expand.h intern.h exec.h proc.h io.h env.h
|
||||
parse_util.o: wildcard.h complete.h parser.h event.h function.h builtin.h
|
||||
parser.o: config.h signal.h fallback.h util.h common.h wutil.h proc.h io.h
|
||||
parser.o: parse_tree.h tokenizer.h parse_constants.h parser.h event.h
|
||||
parser.o: function.h env.h parser_keywords.h exec.h wildcard.h expand.h
|
||||
parser.o: complete.h builtin.h reader.h highlight.h color.h sanity.h intern.h
|
||||
parser.o: parse_util.h autoload.h lru.h path.h parse_execution.h
|
||||
parser_keywords.o: config.h fallback.h signal.h common.h util.h
|
||||
parser_keywords.o: parser_keywords.h
|
||||
path.o: config.h fallback.h signal.h util.h common.h env.h wutil.h path.h
|
||||
path.o: expand.h parse_constants.h
|
||||
postfork.o: signal.h postfork.h config.h common.h util.h proc.h io.h
|
||||
postfork.o: parse_tree.h tokenizer.h parse_constants.h wutil.h iothread.h
|
||||
postfork.o: exec.h
|
||||
print_help.o: print_help.h
|
||||
proc.o: config.h signal.h fallback.h util.h wutil.h common.h proc.h io.h
|
||||
proc.o: parse_tree.h tokenizer.h parse_constants.h reader.h complete.h
|
||||
proc.o: highlight.h env.h color.h sanity.h parser.h event.h function.h
|
||||
proc.o: output.h screen.h
|
||||
reader.o: config.h signal.h fallback.h util.h wutil.h common.h highlight.h
|
||||
reader.o: env.h color.h reader.h io.h complete.h proc.h parse_tree.h
|
||||
reader.o: tokenizer.h parse_constants.h parser.h event.h function.h history.h
|
||||
reader.o: sanity.h exec.h expand.h kill.h input_common.h input.h output.h
|
||||
reader.o: screen.h iothread.h intern.h path.h parse_util.h autoload.h lru.h
|
||||
reader.o: parser_keywords.h pager.h
|
||||
sanity.o: config.h signal.h fallback.h util.h common.h sanity.h proc.h io.h
|
||||
sanity.o: parse_tree.h tokenizer.h parse_constants.h history.h wutil.h
|
||||
sanity.o: reader.h complete.h highlight.h env.h color.h kill.h
|
||||
screen.o: config.h fallback.h signal.h common.h util.h wutil.h output.h
|
||||
screen.o: screen.h highlight.h env.h color.h pager.h complete.h reader.h io.h
|
||||
signal.o: config.h signal.h common.h util.h fallback.h wutil.h event.h
|
||||
signal.o: reader.h io.h complete.h highlight.h env.h color.h proc.h
|
||||
signal.o: parse_tree.h tokenizer.h parse_constants.h
|
||||
tokenizer.o: config.h fallback.h signal.h util.h wutil.h common.h tokenizer.h
|
||||
utf8.o: utf8.h
|
||||
util.o: config.h fallback.h signal.h util.h common.h wutil.h
|
||||
wcstringutil.o: config.h wcstringutil.h common.h util.h
|
||||
wgetopt.o: config.h wgetopt.h wutil.h common.h util.h fallback.h signal.h
|
||||
wildcard.o: config.h fallback.h signal.h util.h wutil.h common.h complete.h
|
||||
wildcard.o: wildcard.h expand.h parse_constants.h reader.h io.h highlight.h
|
||||
wildcard.o: env.h color.h exec.h proc.h parse_tree.h tokenizer.h
|
||||
wutil.o: config.h fallback.h signal.h util.h common.h wutil.h
|
||||
xdgmime.o: xdgmime.h xdgmimeint.h xdgmimeglob.h xdgmimemagic.h xdgmimealias.h
|
||||
xdgmime.o: xdgmimeparent.h
|
||||
xdgmimealias.o: xdgmimealias.h xdgmime.h xdgmimeint.h
|
||||
xdgmimeglob.o: xdgmimeglob.h xdgmime.h xdgmimeint.h
|
||||
xdgmimeint.o: xdgmimeint.h xdgmime.h
|
||||
xdgmimemagic.o: xdgmimemagic.h xdgmime.h xdgmimeint.h
|
||||
xdgmimeparent.o: xdgmimeparent.h xdgmime.h xdgmimeint.h
|
||||
obj/autoload.o: config.h src/autoload.h src/common.h src/fallback.h
|
||||
obj/autoload.o: src/signal.h src/lru.h src/wutil.h src/env.h src/exec.h
|
||||
obj/builtin.o: config.h src/signal.h src/fallback.h src/wutil.h src/common.h
|
||||
obj/builtin.o: src/builtin.h src/io.h src/function.h src/event.h src/env.h
|
||||
obj/builtin.o: src/complete.h src/proc.h src/parse_tree.h src/tokenizer.h
|
||||
obj/builtin.o: src/parse_constants.h src/parser.h src/reader.h
|
||||
obj/builtin.o: src/highlight.h src/color.h src/wgetopt.h src/input.h
|
||||
obj/builtin.o: src/input_common.h src/intern.h src/exec.h src/parse_util.h
|
||||
obj/builtin.o: src/parser_keywords.h src/expand.h src/path.h src/history.h
|
||||
obj/builtin.o: src/wcstringutil.h src/builtin_set.cpp src/util.h
|
||||
obj/builtin.o: src/builtin_commandline.cpp src/builtin_complete.cpp
|
||||
obj/builtin.o: src/builtin_ulimit.cpp src/builtin_jobs.cpp
|
||||
obj/builtin.o: src/builtin_set_color.cpp src/output.h src/builtin_printf.cpp
|
||||
obj/builtin.o: src/builtin_string.cpp
|
||||
obj/builtin_test.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/builtin_test.o: src/builtin.h src/io.h src/wutil.h src/proc.h
|
||||
obj/builtin_test.o: src/parse_tree.h src/tokenizer.h src/parse_constants.h
|
||||
obj/color.o: src/color.h src/common.h config.h src/fallback.h src/signal.h
|
||||
obj/common.o: config.h src/signal.h src/fallback.h src/wutil.h src/common.h
|
||||
obj/common.o: src/expand.h src/parse_constants.h src/wildcard.h
|
||||
obj/common.o: src/complete.h src/util.cpp src/util.h src/fallback.cpp
|
||||
obj/complete.o: config.h src/fallback.h src/signal.h src/util.h
|
||||
obj/complete.o: src/wildcard.h src/common.h src/expand.h
|
||||
obj/complete.o: src/parse_constants.h src/complete.h src/proc.h src/io.h
|
||||
obj/complete.o: src/parse_tree.h src/tokenizer.h src/parser.h src/event.h
|
||||
obj/complete.o: src/function.h src/env.h src/builtin.h src/exec.h
|
||||
obj/complete.o: src/parse_util.h src/wutil.h src/path.h src/iothread.h
|
||||
obj/complete.o: src/autoload.h src/lru.h
|
||||
obj/env.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
|
||||
obj/env.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
|
||||
obj/env.o: src/parse_constants.h src/env.h src/sanity.h src/expand.h
|
||||
obj/env.o: src/history.h src/reader.h src/complete.h src/highlight.h
|
||||
obj/env.o: src/color.h src/env_universal_common.h src/input.h
|
||||
obj/env.o: src/input_common.h src/event.h src/path.h src/fish_version.h
|
||||
obj/env_universal_common.o: config.h src/env_universal_common.h src/common.h
|
||||
obj/env_universal_common.o: src/fallback.h src/signal.h src/wutil.h src/env.h
|
||||
obj/env_universal_common.o: src/util.h src/utf8.h
|
||||
obj/event.o: config.h src/signal.h src/fallback.h src/wutil.h src/common.h
|
||||
obj/event.o: src/input_common.h src/proc.h src/io.h src/parse_tree.h
|
||||
obj/event.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h
|
||||
obj/exec.o: config.h src/signal.h src/fallback.h src/postfork.h src/io.h
|
||||
obj/exec.o: src/common.h src/wutil.h src/proc.h src/parse_tree.h
|
||||
obj/exec.o: src/tokenizer.h src/parse_constants.h src/exec.h src/parser.h
|
||||
obj/exec.o: src/event.h src/builtin.h src/function.h src/env.h
|
||||
obj/exec.o: src/parse_util.h
|
||||
obj/expand.o: config.h src/fallback.h src/signal.h src/util.h src/common.h
|
||||
obj/expand.o: src/wutil.h src/env.h src/proc.h src/io.h src/parse_tree.h
|
||||
obj/expand.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h
|
||||
obj/expand.o: src/expand.h src/wildcard.h src/complete.h src/exec.h
|
||||
obj/expand.o: src/iothread.h src/parse_util.h
|
||||
obj/fish.o: config.h src/fallback.h src/signal.h src/common.h src/reader.h
|
||||
obj/fish.o: src/io.h src/complete.h src/highlight.h src/env.h src/color.h
|
||||
obj/fish.o: src/parse_constants.h src/builtin.h src/function.h src/event.h
|
||||
obj/fish.o: src/wutil.h src/proc.h src/parse_tree.h src/tokenizer.h
|
||||
obj/fish.o: src/parser.h src/expand.h src/intern.h src/history.h src/path.h
|
||||
obj/fish.o: src/input.h src/input_common.h src/fish_version.h
|
||||
obj/fish_indent.o: config.h src/color.h src/common.h src/fallback.h
|
||||
obj/fish_indent.o: src/signal.h src/highlight.h src/env.h
|
||||
obj/fish_indent.o: src/parse_constants.h src/wutil.h src/output.h src/input.h
|
||||
obj/fish_indent.o: src/input_common.h src/parse_tree.h src/tokenizer.h
|
||||
obj/fish_indent.o: src/print_help.h src/fish_version.h
|
||||
obj/fish_tests.o: config.h src/signal.h src/fallback.h src/util.h
|
||||
obj/fish_tests.o: src/common.h src/proc.h src/io.h src/parse_tree.h
|
||||
obj/fish_tests.o: src/tokenizer.h src/parse_constants.h src/reader.h
|
||||
obj/fish_tests.o: src/complete.h src/highlight.h src/env.h src/color.h
|
||||
obj/fish_tests.o: src/builtin.h src/function.h src/event.h src/autoload.h
|
||||
obj/fish_tests.o: src/lru.h src/wutil.h src/expand.h src/parser.h
|
||||
obj/fish_tests.o: src/output.h src/exec.h src/path.h src/history.h
|
||||
obj/fish_tests.o: src/iothread.h src/postfork.h src/parse_util.h src/pager.h
|
||||
obj/fish_tests.o: src/screen.h src/input.h src/input_common.h src/wildcard.h
|
||||
obj/fish_tests.o: src/utf8.h src/env_universal_common.h src/wcstringutil.h
|
||||
obj/fish_version.o: src/fish_version.h
|
||||
obj/function.o: config.h src/wutil.h src/common.h src/fallback.h src/signal.h
|
||||
obj/function.o: src/autoload.h src/lru.h src/function.h src/event.h src/env.h
|
||||
obj/function.o: src/intern.h src/reader.h src/io.h src/complete.h
|
||||
obj/function.o: src/highlight.h src/color.h src/parse_constants.h
|
||||
obj/function.o: src/parser_keywords.h
|
||||
obj/highlight.o: config.h src/fallback.h src/signal.h src/wutil.h
|
||||
obj/highlight.o: src/common.h src/highlight.h src/env.h src/color.h
|
||||
obj/highlight.o: src/tokenizer.h src/parse_util.h src/parse_constants.h
|
||||
obj/highlight.o: src/builtin.h src/io.h src/function.h src/event.h
|
||||
obj/highlight.o: src/expand.h src/output.h src/wildcard.h src/complete.h
|
||||
obj/highlight.o: src/path.h src/history.h src/parse_tree.h
|
||||
obj/history.o: config.h src/fallback.h src/signal.h src/sanity.h src/reader.h
|
||||
obj/history.o: src/io.h src/common.h src/complete.h src/highlight.h src/env.h
|
||||
obj/history.o: src/color.h src/parse_constants.h src/parse_tree.h
|
||||
obj/history.o: src/tokenizer.h src/wutil.h src/history.h src/path.h
|
||||
obj/history.o: src/iothread.h src/lru.h
|
||||
obj/input_common.o: config.h src/fallback.h src/signal.h src/util.h
|
||||
obj/input_common.o: src/common.h src/input_common.h
|
||||
obj/input_common.o: src/env_universal_common.h src/wutil.h src/env.h
|
||||
obj/input_common.o: src/iothread.h
|
||||
obj/input.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
|
||||
obj/input.o: src/reader.h src/io.h src/complete.h src/highlight.h src/env.h
|
||||
obj/input.o: src/color.h src/parse_constants.h src/proc.h src/parse_tree.h
|
||||
obj/input.o: src/tokenizer.h src/input_common.h src/input.h src/parser.h
|
||||
obj/input.o: src/event.h src/output.h
|
||||
obj/intern.o: config.h src/fallback.h src/signal.h src/common.h src/intern.h
|
||||
obj/io.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
|
||||
obj/io.o: src/exec.h src/io.h
|
||||
obj/iothread.o: config.h src/iothread.h src/common.h src/fallback.h
|
||||
obj/iothread.o: src/signal.h
|
||||
obj/key_reader.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/key_reader.o: src/input_common.h
|
||||
obj/kill.o: config.h src/fallback.h src/signal.h src/kill.h src/common.h
|
||||
obj/kill.o: src/env.h src/exec.h src/path.h
|
||||
obj/output.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
|
||||
obj/output.o: src/output.h src/color.h
|
||||
obj/pager.o: config.h src/util.h src/wutil.h src/common.h src/fallback.h
|
||||
obj/pager.o: src/signal.h src/pager.h src/complete.h src/screen.h
|
||||
obj/pager.o: src/highlight.h src/env.h src/color.h src/reader.h src/io.h
|
||||
obj/pager.o: src/parse_constants.h
|
||||
obj/parse_execution.o: src/parse_execution.h src/common.h config.h
|
||||
obj/parse_execution.o: src/fallback.h src/signal.h src/io.h
|
||||
obj/parse_execution.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
|
||||
obj/parse_execution.o: src/proc.h src/env.h src/event.h src/util.h
|
||||
obj/parse_execution.o: src/parse_util.h src/complete.h src/wildcard.h
|
||||
obj/parse_execution.o: src/expand.h src/parser.h src/reader.h src/highlight.h
|
||||
obj/parse_execution.o: src/color.h src/wutil.h src/path.h src/function.h
|
||||
obj/parse_execution.o: src/builtin.h src/exec.h
|
||||
obj/parse_productions.o: src/parse_productions.h src/common.h config.h
|
||||
obj/parse_productions.o: src/fallback.h src/signal.h src/parse_constants.h
|
||||
obj/parse_productions.o: src/parse_tree.h src/tokenizer.h
|
||||
obj/parser.o: config.h src/fallback.h src/signal.h src/common.h src/wutil.h
|
||||
obj/parser.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
|
||||
obj/parser.o: src/parse_constants.h src/parser.h src/event.h src/function.h
|
||||
obj/parser.o: src/env.h src/expand.h src/reader.h src/complete.h
|
||||
obj/parser.o: src/highlight.h src/color.h src/sanity.h src/intern.h
|
||||
obj/parser.o: src/parse_util.h src/parse_execution.h
|
||||
obj/parser_keywords.o: config.h src/fallback.h src/signal.h src/common.h
|
||||
obj/parser_keywords.o: src/parser_keywords.h
|
||||
obj/parse_tree.o: src/common.h config.h src/fallback.h src/signal.h
|
||||
obj/parse_tree.o: src/parse_constants.h src/parse_productions.h
|
||||
obj/parse_tree.o: src/parse_tree.h src/tokenizer.h src/wutil.h src/proc.h
|
||||
obj/parse_tree.o: src/io.h
|
||||
obj/parse_util.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h
|
||||
obj/parse_util.o: src/common.h src/tokenizer.h src/parse_util.h
|
||||
obj/parse_util.o: src/parse_constants.h src/expand.h src/env.h src/wildcard.h
|
||||
obj/parse_util.o: src/complete.h src/parse_tree.h src/builtin.h src/io.h
|
||||
obj/path.o: config.h src/fallback.h src/signal.h src/common.h src/env.h
|
||||
obj/path.o: src/wutil.h src/path.h src/expand.h src/parse_constants.h
|
||||
obj/postfork.o: src/signal.h src/common.h config.h src/fallback.h src/proc.h
|
||||
obj/postfork.o: src/io.h src/parse_tree.h src/tokenizer.h
|
||||
obj/postfork.o: src/parse_constants.h src/wutil.h src/postfork.h
|
||||
obj/postfork.o: src/iothread.h src/exec.h
|
||||
obj/print_help.o: src/print_help.h
|
||||
obj/proc.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
|
||||
obj/proc.o: src/common.h src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
|
||||
obj/proc.o: src/parse_constants.h src/reader.h src/complete.h src/highlight.h
|
||||
obj/proc.o: src/env.h src/color.h src/sanity.h src/parser.h src/event.h
|
||||
obj/proc.o: src/output.h
|
||||
obj/reader.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
|
||||
obj/reader.o: src/common.h src/highlight.h src/env.h src/color.h src/reader.h
|
||||
obj/reader.o: src/io.h src/complete.h src/parse_constants.h src/proc.h
|
||||
obj/reader.o: src/parse_tree.h src/tokenizer.h src/parser.h src/event.h
|
||||
obj/reader.o: src/history.h src/sanity.h src/exec.h src/expand.h src/kill.h
|
||||
obj/reader.o: src/input_common.h src/input.h src/function.h src/output.h
|
||||
obj/reader.o: src/screen.h src/iothread.h src/intern.h src/parse_util.h
|
||||
obj/reader.o: src/pager.h
|
||||
obj/sanity.o: config.h src/fallback.h src/signal.h src/common.h src/sanity.h
|
||||
obj/sanity.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
|
||||
obj/sanity.o: src/parse_constants.h src/history.h src/wutil.h src/reader.h
|
||||
obj/sanity.o: src/complete.h src/highlight.h src/env.h src/color.h src/kill.h
|
||||
obj/screen.o: config.h src/fallback.h src/signal.h src/common.h src/util.h
|
||||
obj/screen.o: src/output.h src/color.h src/highlight.h src/env.h src/screen.h
|
||||
obj/screen.o: src/pager.h src/complete.h src/reader.h src/io.h
|
||||
obj/screen.o: src/parse_constants.h
|
||||
obj/signal.o: config.h src/signal.h src/common.h src/fallback.h src/wutil.h
|
||||
obj/signal.o: src/event.h src/reader.h src/io.h src/complete.h
|
||||
obj/signal.o: src/highlight.h src/env.h src/color.h src/parse_constants.h
|
||||
obj/signal.o: src/proc.h src/parse_tree.h src/tokenizer.h
|
||||
obj/tokenizer.o: config.h src/fallback.h src/signal.h src/common.h
|
||||
obj/tokenizer.o: src/wutil.h src/tokenizer.h
|
||||
obj/utf8.o: src/utf8.h
|
||||
obj/wcstringutil.o: config.h src/wcstringutil.h src/common.h src/fallback.h
|
||||
obj/wcstringutil.o: src/signal.h
|
||||
obj/wgetopt.o: config.h src/common.h src/fallback.h src/signal.h
|
||||
obj/wgetopt.o: src/wgetopt.h src/wutil.h
|
||||
obj/wildcard.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
|
||||
obj/wildcard.o: src/wildcard.h src/expand.h src/parse_constants.h
|
||||
obj/wildcard.o: src/complete.h src/reader.h src/io.h src/highlight.h
|
||||
obj/wildcard.o: src/env.h src/color.h
|
||||
obj/wutil.o: config.h src/fallback.h src/signal.h src/common.h src/wutil.h
|
||||
|
||||
24
README.md
24
README.md
@@ -7,7 +7,7 @@ For more on fish's design philosophy, see the [design document](http://fishshell
|
||||
|
||||
## Quick Start
|
||||
|
||||
fish generally works like other shells, like bash or zsh. A few important differences can be found at <http://fishshell.com/docs/current/tutorial.html> by searching for the magic phrase 'unlike other shells'.
|
||||
fish generally works like other shells, like bash or zsh. A few important differences can be found at <http://fishshell.com/docs/current/tutorial.html> by searching for the magic phrase "unlike other shells".
|
||||
|
||||
Detailed user documentation is available by running `help` within fish, and also at <http://fishshell.com/docs/current/index.html>
|
||||
|
||||
@@ -15,17 +15,19 @@ Detailed user documentation is available by running `help` within fish, and also
|
||||
|
||||
fish is written in a sane subset of C++98, with a few components from C++TR1. It builds successfully with g++ 4.2 or later, and with clang. It also will build as C++11.
|
||||
|
||||
fish can be built using autotools or Xcode. autoconf 2.60 or later is required.
|
||||
fish can be built using autotools or Xcode. autoconf 2.60 or later is required to build from git versions, but is not required for releases.
|
||||
|
||||
fish depends on a curses implementation, such as ncurses. The headers and libraries are required for building.
|
||||
|
||||
fish requires PCRE2 due to the regular expression support contained in the `string` builtin. A copy is included with the source code, and will be used automatically if it does not already exist on your system.
|
||||
|
||||
fish requires gettext for translation support.
|
||||
|
||||
Building the documentation requires Doxygen 1.8.7 or newer.
|
||||
|
||||
### Autotools Build
|
||||
|
||||
autoconf
|
||||
autoconf [if building from Git]
|
||||
./configure
|
||||
make [gmake on BSD]
|
||||
sudo make install
|
||||
@@ -46,7 +48,7 @@ If fish reports that it could not find curses, try installing a curses developme
|
||||
|
||||
On Debian or Ubuntu you want:
|
||||
|
||||
sudo apt-get install build-essential ncurses-dev libncurses5-dev gettext
|
||||
sudo apt-get install build-essential ncurses-dev libncurses5-dev gettext autoconf
|
||||
|
||||
On RedHat, CentOS, or Amazon EC2:
|
||||
|
||||
@@ -56,6 +58,8 @@ On RedHat, CentOS, or Amazon EC2:
|
||||
|
||||
fish requires a curses implementation, such as ncurses, to run.
|
||||
|
||||
fish requires PCRE2 due to the regular expression support contained in the `string` builtin. A bundled version will be compiled in automatically at build time if required.
|
||||
|
||||
fish requires a number of utilities to operate, which should be present on any Unix, GNU/Linux or OS X system. These include (but are not limited to) hostname, grep, awk, sed, which, and getopt. fish also requires the bc program.
|
||||
|
||||
Translation support requires the gettext program.
|
||||
@@ -74,7 +78,11 @@ If you wish to use fish as your default shell, use the following command:
|
||||
|
||||
chsh -s /usr/local/bin/fish
|
||||
|
||||
chsh will prompt you for your password, and change your default shell.
|
||||
chsh will prompt you for your password, and change your default shell. Substitute "/usr/local/bin/fish" with whatever path to fish is in your /etc/shells file.
|
||||
|
||||
Use the following command if you didn't already add your fish path to /etc/shells.
|
||||
|
||||
echo /usr/local/bin/fish | sudo tee -a /etc/shells
|
||||
|
||||
To switch your default shell back, you can run:
|
||||
|
||||
@@ -82,8 +90,12 @@ To switch your default shell back, you can run:
|
||||
|
||||
Substitute /bin/bash with /bin/tcsh or /bin/zsh as appropriate.
|
||||
|
||||
## Contributing Changes to the Code
|
||||
|
||||
See the [Guide for Developers](CONTRIBUTING.md).
|
||||
|
||||
## Contact Us
|
||||
|
||||
Questions, comments, rants and raves can be posted to the official fish mailing list at <https://lists.sourceforge.net/lists/listinfo/fish-users> or join us on our IRC channel [#fish at irc.oftc.net](https://webchat.oftc.net/?channels=fish).
|
||||
Questions, comments, rants and raves can be posted to the official fish mailing list at <https://lists.sourceforge.net/lists/listinfo/fish-users> or join us on our [gitter.im channel](https://gitter.im/fish-shell/fish-shell) or IRC channel [#fish at irc.oftc.net](https://webchat.oftc.net/?channels=fish). Or use the [fish tag on Stackoverflow](https://stackoverflow.com/questions/tagged/fish).
|
||||
|
||||
Found a bug? Have an awesome idea? Please open an issue on this github page.
|
||||
|
||||
3
build_tools/cppcheck.sh
Executable file
3
build_tools/cppcheck.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
cppcheck --enable=all --std=posix --quiet .
|
||||
4
build_tools/iwyu.sh
Executable file
4
build_tools/iwyu.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# Reminder of how to run Include What You Use
|
||||
|
||||
make iwyu
|
||||
100
build_tools/lint.fish
Executable file
100
build_tools/lint.fish
Executable file
@@ -0,0 +1,100 @@
|
||||
#!/usr/bin/env fish
|
||||
#
|
||||
# This is meant to be run by "make lint" or "make lint-all". It is not meant to
|
||||
# be run directly from a shell prompt.
|
||||
#
|
||||
set cppchecks warning,performance,portability,information,missingInclude
|
||||
set cppcheck_args
|
||||
set c_files
|
||||
set all no
|
||||
|
||||
set -gx CXX $argv[1]
|
||||
set -e argv[1]
|
||||
|
||||
if test "$argv[1]" = "--all"
|
||||
set all yes
|
||||
set cppchecks "$cppchecks,unusedFunction"
|
||||
set -e argv[1]
|
||||
end
|
||||
|
||||
# We only want -D and -I options to be passed thru to cppcheck.
|
||||
for arg in $argv
|
||||
if string match -q -- '-D*' $arg
|
||||
set cppcheck_args $cppcheck_args $arg
|
||||
else if string match -q -- '-I*' $arg
|
||||
set cppcheck_args $cppcheck_args $arg
|
||||
end
|
||||
end
|
||||
if test (uname -m) = "x86_64"
|
||||
set cppcheck_args -D__x86_64__ -D__LP64__ $cppcheck_args
|
||||
end
|
||||
|
||||
if test $all = yes
|
||||
set c_files src/*.cpp
|
||||
else
|
||||
# We haven't been asked to lint all the source. If there are uncommitted
|
||||
# changes lint those, else lint the files in the most recent commit.
|
||||
set pending (git status --porcelain --short --untracked-files=all | sed -e 's/^ *//')
|
||||
if set -q pending[1]
|
||||
# There are pending changes so lint those files.
|
||||
for arg in $pending
|
||||
set files $files (string split -m 1 ' ' $arg)[2]
|
||||
end
|
||||
else
|
||||
# No pending changes so lint the files in the most recent commit.
|
||||
set files (git show --word-diff=porcelain --name-only --pretty=oneline head)[2..-1]
|
||||
end
|
||||
|
||||
# Extract just the C/C++ files.
|
||||
set c_files (string match -r '.*\.c(?:pp)?$' -- $files)
|
||||
end
|
||||
|
||||
# We now have a list of files to check so run the linters.
|
||||
if set -q c_files[1]
|
||||
if type -q cppcheck
|
||||
echo
|
||||
echo ========================================
|
||||
echo Running cppcheck
|
||||
echo ========================================
|
||||
# The stderr to stdout redirection is because cppcheck, incorrectly
|
||||
# IMHO, writes its diagnostic messages to stderr. Anyone running
|
||||
# this who wants to capture its output will expect those messages to be
|
||||
# written to stdout.
|
||||
cppcheck -q --verbose --std=posix --std=c11 --language=c++ --template "[{file}:{line}]: {severity} ({id}): {message}" --suppress=missingIncludeSystem --inline-suppr --enable=$cppchecks $cppcheck_args $c_files 2>& 1
|
||||
end
|
||||
|
||||
if type -q oclint
|
||||
echo
|
||||
echo ========================================
|
||||
echo Running oclint
|
||||
echo ========================================
|
||||
# The stderr to stdout redirection is because oclint, incorrectly
|
||||
# writes its final summary counts of the errors detected to stderr.
|
||||
# Anyone running this who wants to capture its output will expect those
|
||||
# messages to be written to stdout.
|
||||
if test (uname -s) = "Darwin"
|
||||
if not test -f compile_commands.json
|
||||
xcodebuild > xcodebuild.log
|
||||
oclint-xcodebuild xcodebuild.log > /dev/null
|
||||
end
|
||||
if test $all = yes
|
||||
oclint-json-compilation-database -e '/pcre2-10.21/' -- -enable-global-analysis 2>& 1
|
||||
else
|
||||
set i_files
|
||||
for f in $c_files
|
||||
set i_files $i_files -i $f
|
||||
end
|
||||
echo oclint-json-compilation-database -e '/pcre2-10.21/' $i_files
|
||||
oclint-json-compilation-database -e '/pcre2-10.21/' $i_files 2>& 1
|
||||
end
|
||||
else
|
||||
# Presumably we're on Linux or other platform not requiring special
|
||||
# handling for oclint to work.
|
||||
oclint $c_files -- $argv 2>& 1
|
||||
end
|
||||
end
|
||||
else
|
||||
echo
|
||||
echo 'WARNING: No C/C++ files to check'
|
||||
echo
|
||||
end
|
||||
@@ -37,7 +37,7 @@ git archive --format=tar --prefix="$prefix"/ HEAD > "$path"
|
||||
# Don't run autoheader since configure.ac runs it. autoconf is enough.
|
||||
autoconf
|
||||
./configure --with-doxygen
|
||||
make user_doc share/man
|
||||
make doc share/man
|
||||
echo $VERSION > version
|
||||
cd /tmp
|
||||
rm -f "$prefix"
|
||||
|
||||
90
build_tools/style.fish
Executable file
90
build_tools/style.fish
Executable file
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env fish
|
||||
#
|
||||
# This is meant to be run by "make style" or "make style-all". It is not meant to
|
||||
# be run directly from a shell prompt although it can be.
|
||||
#
|
||||
# This runs C++ files and fish scripts (*.fish) through their respective code
|
||||
# formatting programs.
|
||||
#
|
||||
set c_files
|
||||
set f_files
|
||||
set all no
|
||||
|
||||
if test "$argv[1]" = "--all"
|
||||
set all yes
|
||||
set -e argv[1]
|
||||
end
|
||||
|
||||
if set -q argv[1]
|
||||
echo "Unexpected arguments: '$argv'"
|
||||
exit 1
|
||||
end
|
||||
|
||||
if test $all = yes
|
||||
set c_files src/*.h src/*.cpp
|
||||
set f_files ***.fish
|
||||
else
|
||||
# We haven't been asked to reformat all the source. If there are uncommitted
|
||||
# changes reformat those, else reformat the files in the most recent commit.
|
||||
set pending (git status --porcelain --short --untracked-files=all | sed -e 's/^ *//')
|
||||
if count $pending > /dev/null
|
||||
# There are pending changes so lint those files.
|
||||
for arg in $pending
|
||||
set files $files (string split -m 1 ' ' $arg)[2]
|
||||
end
|
||||
else
|
||||
# No pending changes so lint the files in the most recent commit.
|
||||
set files (git show --name-only --pretty=oneline head | tail --lines=+2)
|
||||
end
|
||||
|
||||
# Extract just the C/C++ files.
|
||||
set c_files (string match -r '^.*\.(?:c|cpp|h)$' -- $files)
|
||||
# Extract just the fish files.
|
||||
set f_files (string match -r '^.*\.fish$' -- $files)
|
||||
end
|
||||
|
||||
# Run the C++ reformatter if we have any C++ files.
|
||||
if set -q c_files[1]
|
||||
if type -q clang-format
|
||||
echo
|
||||
echo ========================================
|
||||
echo Running clang-format
|
||||
echo ========================================
|
||||
for file in $c_files
|
||||
clang-format $file > $file.new
|
||||
if cmp --quiet $file $file.new
|
||||
echo $file was correctly formatted
|
||||
rm $file.new
|
||||
else
|
||||
echo $file was NOT correctly formatted
|
||||
mv $file.new $file
|
||||
end
|
||||
end
|
||||
else
|
||||
echo
|
||||
echo 'WARNING: Cannot find clang-format command'
|
||||
echo
|
||||
end
|
||||
end
|
||||
|
||||
# Run the fish reformatter if we have any fish files.
|
||||
if set -q f_files[1]
|
||||
if not type -q fish_indent
|
||||
make fish_indent
|
||||
set PATH . $PATH
|
||||
end
|
||||
echo
|
||||
echo ========================================
|
||||
echo Running fish_indent
|
||||
echo ========================================
|
||||
for file in $f_files
|
||||
fish_indent < $file > $file.new
|
||||
if cmp --quiet $file $file.new
|
||||
echo $file was correctly formatted
|
||||
rm $file.new
|
||||
else
|
||||
echo $file was NOT correctly formatted
|
||||
mv $file.new $file
|
||||
end
|
||||
end
|
||||
end
|
||||
17
build_tools/xcode_version_gen.sh
Executable file
17
build_tools/xcode_version_gen.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Expects to be called from Xcode (Run Script build phase),
|
||||
# write version number C preprocessor macro to header file.
|
||||
|
||||
tmp="$SCRIPT_OUTPUT_FILE_1"
|
||||
ver="$SCRIPT_OUTPUT_FILE_0"
|
||||
|
||||
./build_tools/git_version_gen.sh
|
||||
|
||||
cat FISH-BUILD-VERSION-FILE | awk '{printf("#define %s \"%s\"\n",$1,$3)}' > "$tmp"
|
||||
|
||||
cmp --quiet "$tmp" "$ver"
|
||||
if [ $? -ne 0 ]; then
|
||||
/bin/mv "$tmp" "$ver"
|
||||
else
|
||||
/bin/rm "$tmp"
|
||||
fi
|
||||
376
config.guess
vendored
376
config.guess
vendored
@@ -1,14 +1,12 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-02-10'
|
||||
timestamp='2015-03-04'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
|
||||
# Originally written by Per Bothner. Please send patches (context
|
||||
# diff format) to <config-patches@gnu.org> and include a ChangeLog
|
||||
# entry.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
||||
#
|
||||
# You can get the latest version of this script from:
|
||||
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
#
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
@@ -54,9 +50,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
case "${UNAME_SYSTEM}" in
|
||||
Linux|GNU|GNU/*)
|
||||
# If the system lacks a compiler, then just pick glibc.
|
||||
# We could probably try harder.
|
||||
LIBC=gnu
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat <<-EOF > $dummy.c
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
LIBC=uclibc
|
||||
#elif defined(__dietlibc__)
|
||||
LIBC=dietlibc
|
||||
#else
|
||||
LIBC=gnu
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
||||
;;
|
||||
esac
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
@@ -153,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
|
||||
/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || \
|
||||
echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
armeb) machine=armeb-unknown ;;
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
sh5el) machine=sh5le-unknown ;;
|
||||
earmv*)
|
||||
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
|
||||
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
|
||||
machine=${arch}${endian}-unknown
|
||||
;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ELF__
|
||||
@@ -182,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
os=netbsd
|
||||
;;
|
||||
esac
|
||||
# Determine ABI tags.
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
earm*)
|
||||
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
|
||||
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
@@ -198,7 +227,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
echo "${machine}-${os}${release}${abi}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:OpenBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
@@ -302,7 +335,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
arm:riscos:*:*|arm:RISCOS:*:*)
|
||||
arm*:riscos:*:*|arm*:RISCOS:*:*)
|
||||
echo arm-unknown-riscos
|
||||
exit ;;
|
||||
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
||||
@@ -560,8 +593,9 @@ EOF
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
if [ -x /usr/bin/lslpp ] ; then
|
||||
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
||||
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
||||
else
|
||||
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
||||
fi
|
||||
@@ -801,10 +835,13 @@ EOF
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
*:MINGW64*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw64
|
||||
exit ;;
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:MSYS*:*)
|
||||
*:MSYS*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msys
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
@@ -852,21 +889,21 @@ EOF
|
||||
exit ;;
|
||||
*:GNU:*:*)
|
||||
# the GNU system
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit ;;
|
||||
*:GNU/*:*:*)
|
||||
# other systems with GNU libc and userland
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
aarch64_be:Linux:*:*)
|
||||
UNAME_MACHINE=aarch64_be
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
@@ -879,59 +916,57 @@ EOF
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arc:Linux:*:* | arceb:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
else
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
|
||||
fi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-axis-linux-gnu
|
||||
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
||||
exit ;;
|
||||
e2k:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
frv:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
hexagon:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
LIBC=gnu
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||
exit ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
@@ -950,54 +985,63 @@ EOF
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
openrisc*:Linux:*:*)
|
||||
echo or1k-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
or32:Linux:*:* | or1k*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-gnu
|
||||
echo sparc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||
echo hppa64-unknown-linux-gnu
|
||||
echo hppa64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
||||
*) echo hppa-unknown-linux-gnu ;;
|
||||
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
||||
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
||||
*) echo hppa-unknown-linux-${LIBC} ;;
|
||||
esac
|
||||
exit ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
echo powerpc64-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-unknown-linux-gnu
|
||||
echo powerpc-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppc64le:Linux:*:*)
|
||||
echo powerpc64le-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
ppcle:Linux:*:*)
|
||||
echo powerpcle-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
|
||||
exit ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
tile*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
exit ;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||
@@ -1201,6 +1245,9 @@ EOF
|
||||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
echo i586-pc-haiku
|
||||
exit ;;
|
||||
x86_64:Haiku:*:*)
|
||||
echo x86_64-unknown-haiku
|
||||
exit ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@@ -1227,19 +1274,31 @@ EOF
|
||||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
i386)
|
||||
eval $set_cc_for_build
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR="x86_64"
|
||||
fi
|
||||
fi ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||
# that puts up a graphical alert prompting to install
|
||||
# developer tools. Any system running Mac OS X 10.7 or
|
||||
# later (Darwin 11 and later) is required to have a 64-bit
|
||||
# processor. This is not true of the ARM version of Darwin
|
||||
# that Apple uses in portable devices.
|
||||
UNAME_PROCESSOR=x86_64
|
||||
fi
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
@@ -1256,7 +1315,7 @@ EOF
|
||||
NEO-?:NONSTOP_KERNEL:*:*)
|
||||
echo neo-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSE-?:NONSTOP_KERNEL:*:*)
|
||||
NSE-*:NONSTOP_KERNEL:*:*)
|
||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSR-?:NONSTOP_KERNEL:*:*)
|
||||
@@ -1330,157 +1389,6 @@ EOF
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
# if !defined (ultrix)
|
||||
# include <sys/param.h>
|
||||
# if defined (BSD)
|
||||
# if BSD == 43
|
||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
||||
# else
|
||||
# if BSD == 199006
|
||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
# endif
|
||||
# else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
||||
{ echo "$SYSTEM_NAME"; exit; }
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
cat >&2 <<EOF
|
||||
$0: unable to guess system type
|
||||
|
||||
|
||||
134
config.sub
vendored
134
config.sub
vendored
@@ -1,24 +1,18 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-04-18'
|
||||
timestamp='2015-03-08'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -26,11 +20,12 @@ timestamp='2012-04-18'
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
# the same distribution terms that you use for the rest of that
|
||||
# program. This Exception is an additional permission under section 7
|
||||
# of the GNU General Public License, version 3 ("GPLv3").
|
||||
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted GNU ChangeLog entry.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1992-2015 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -123,8 +116,8 @@ esac
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
@@ -156,7 +149,7 @@ case $os in
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis | -knuth | -cray | -microblaze)
|
||||
-apple | -axis | -knuth | -cray | -microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
@@ -259,21 +252,24 @@ case $basic_machine in
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| arc | arceb \
|
||||
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
|
||||
| avr | avr32 \
|
||||
| be32 | be64 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| c4x | c8051 | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| epiphany \
|
||||
| fido | fr30 | frv \
|
||||
| e2k | epiphany \
|
||||
| fido | fr30 | frv | ft32 \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| hexagon \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| k1om \
|
||||
| le32 | le64 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@@ -287,23 +283,26 @@ case $basic_machine in
|
||||
| mips64vr5900 | mips64vr5900el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa32r6 | mipsisa32r6el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64r6 | mipsisa64r6el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipsr5900 | mipsr5900el \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| moxie \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nds32 | nds32le | nds32be \
|
||||
| nios | nios2 \
|
||||
| nios | nios2 | nios2eb | nios2el \
|
||||
| ns16k | ns32k \
|
||||
| open8 \
|
||||
| or32 \
|
||||
| open8 | or1k | or1knd | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle \
|
||||
| pyramid \
|
||||
| riscv32 | riscv64 \
|
||||
| rl78 | rx \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
@@ -314,6 +313,7 @@ case $basic_machine in
|
||||
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||
| ubicom32 \
|
||||
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
|
||||
| visium \
|
||||
| we32k \
|
||||
| x86 | xc16x | xstormy16 | xtensa \
|
||||
| z8k | z80)
|
||||
@@ -328,7 +328,10 @@ case $basic_machine in
|
||||
c6x)
|
||||
basic_machine=tic6x-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||
leon|leon[3-9])
|
||||
basic_machine=sparc-$basic_machine
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
@@ -370,26 +373,28 @@ case $basic_machine in
|
||||
| aarch64-* | aarch64_be-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* | avr32-* \
|
||||
| be32-* | be64-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| c8051-* | clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| e2k-* | elxsi-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| hexagon-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| k1om-* \
|
||||
| le32-* | le64-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| microblaze-* | microblazeel-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
@@ -403,18 +408,22 @@ case $basic_machine in
|
||||
| mips64vr5900-* | mips64vr5900el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa32r6-* | mipsisa32r6el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64r6-* | mipsisa64r6el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipsr5900-* | mipsr5900el-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nds32-* | nds32le-* | nds32be-* \
|
||||
| nios-* | nios2-* \
|
||||
| nios-* | nios2-* | nios2eb-* | nios2el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| open8-* \
|
||||
| or1k*-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
|
||||
@@ -432,6 +441,7 @@ case $basic_machine in
|
||||
| ubicom32-* \
|
||||
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
|
||||
| vax-* \
|
||||
| visium-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
@@ -508,6 +518,9 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
asmjs)
|
||||
basic_machine=asmjs-unknown
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
@@ -769,6 +782,9 @@ case $basic_machine in
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
leon-*|leon[3-9]-*)
|
||||
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
@@ -788,11 +804,15 @@ case $basic_machine in
|
||||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
microblaze)
|
||||
microblaze*)
|
||||
basic_machine=microblaze-xilinx
|
||||
;;
|
||||
mingw64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-mingw64
|
||||
;;
|
||||
mingw32)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
@@ -820,6 +840,10 @@ case $basic_machine in
|
||||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
moxiebox)
|
||||
basic_machine=moxie-unknown
|
||||
os=-moxiebox
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
@@ -828,7 +852,7 @@ case $basic_machine in
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
msys)
|
||||
basic_machine=i386-pc
|
||||
basic_machine=i686-pc
|
||||
os=-msys
|
||||
;;
|
||||
mvs)
|
||||
@@ -1019,7 +1043,11 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
rdos | rdos64)
|
||||
basic_machine=x86_64-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rdos32)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
@@ -1346,29 +1374,29 @@ case $os in
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* | -aros* \
|
||||
| -aos* | -aros* | -cloudabi* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
|
||||
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1492,9 +1520,6 @@ case $os in
|
||||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
@@ -1543,6 +1568,9 @@ case $basic_machine in
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c8051-*)
|
||||
os=-elf
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
|
||||
223
configure.ac
223
configure.ac
@@ -13,9 +13,7 @@ m4_syscmd([build_tools/git_version_gen.sh 2>/dev/null])
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT(fish,
|
||||
m4_esyscmd([cut -f 3 -d ' ' FISH-BUILD-VERSION-FILE | tr -d '\n']),
|
||||
fish-users@lists.sf.net)
|
||||
|
||||
conf_arg=$@
|
||||
fish-users@lists.sourceforge.net)
|
||||
|
||||
#
|
||||
# List of output variables produced by this configure script
|
||||
@@ -24,6 +22,8 @@ conf_arg=$@
|
||||
AC_SUBST(HAVE_GETTEXT)
|
||||
AC_SUBST(HAVE_DOXYGEN)
|
||||
AC_SUBST(LDFLAGS_FISH)
|
||||
AC_SUBST(WCHAR_T_BITS)
|
||||
AC_SUBST(EXTRA_PCRE2)
|
||||
|
||||
|
||||
#
|
||||
@@ -92,6 +92,7 @@ AC_PROG_CXX([g++ c++])
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_SED
|
||||
AC_LANG(C++)
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
echo "CXXFLAGS: $CXXFLAGS"
|
||||
|
||||
@@ -107,9 +108,15 @@ AC_CONFIG_HEADERS(config.h)
|
||||
#
|
||||
|
||||
AH_BOTTOM([#if __GNUC__ >= 3
|
||||
#ifndef __warn_unused
|
||||
#define __warn_unused __attribute__ ((warn_unused_result))
|
||||
#endif
|
||||
#ifndef __sentinel
|
||||
#define __sentinel __attribute__ ((sentinel))
|
||||
#endif
|
||||
#ifndef __packed
|
||||
#define __packed __attribute__ ((packed))
|
||||
#endif
|
||||
#else
|
||||
#define __warn_unused
|
||||
#define __sentinel
|
||||
@@ -210,20 +217,19 @@ CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare"
|
||||
# This is needed in order to get the really cool backtraces on Linux
|
||||
#
|
||||
|
||||
if test `uname` != "Darwin"; then
|
||||
LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic"
|
||||
fi
|
||||
AC_MSG_CHECKING([for -rdynamic linker flag])
|
||||
prev_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -rdynamic"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic"
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS_FISH="$LDFLAGS_FISH"
|
||||
])
|
||||
LDFLAGS="$prev_LDFLAGS"
|
||||
|
||||
#
|
||||
# On Cygwin, we need to add some flags for ncurses.
|
||||
#
|
||||
case `uname` in
|
||||
CYGWIN*)
|
||||
echo "adding flags for ncurses on Cygwin"
|
||||
CXXFLAGS="$CXXFLAGS -I/usr/include -I/usr/include/ncursesw"
|
||||
LDFLAGS_FISH="$LDFLAGS_FISH -L/usr/lib/ncursesw"
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# If we are compiling against glibc, set some flags to work around
|
||||
@@ -355,6 +361,7 @@ AC_SEARCH_LIBS( shm_open, rt, , [AC_MSG_ERROR([Cannot find the rt library, neede
|
||||
AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] )
|
||||
AC_SEARCH_LIBS( setupterm, [ncurses tinfo curses], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish. If this is Linux, try running 'sudo apt-get install libncurses5-dev' or 'sudo yum install ncurses-devel'])] )
|
||||
AC_SEARCH_LIBS( [nan], [m], [AC_DEFINE( [HAVE_NAN], [1], [Define to 1 if you have the nan function])] )
|
||||
AC_SEARCH_LIBS( [backtrace_symbols_fd], [execinfo] )
|
||||
|
||||
if test x$local_gettext != xno; then
|
||||
AC_SEARCH_LIBS( gettext, intl,,)
|
||||
@@ -370,17 +377,16 @@ if test x$local_gettext != xno; then
|
||||
AC_CHECK_HEADERS([libintl.h])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(
|
||||
[regex.h],
|
||||
[
|
||||
AC_DEFINE(
|
||||
[HAVE_REGEX_H],
|
||||
[1],
|
||||
[Define to 1 if you have the <regex.h> header file.]
|
||||
)
|
||||
],
|
||||
[AC_MSG_ERROR([Could not find the header regex.h, needed to build fish])]
|
||||
)
|
||||
|
||||
#
|
||||
# Get the size in bits of wchar_t, needed for configuring the pcre2 build
|
||||
# and for code that #includes pcre2.h
|
||||
#
|
||||
|
||||
AC_CHECK_SIZEOF(wchar_t)
|
||||
WCHAR_T_BITS=`expr 8 \* $ac_cv_sizeof_wchar_t`
|
||||
AC_DEFINE_UNQUOTED([WCHAR_T_BITS], [$WCHAR_T_BITS], [The size of wchar_t in bits.])
|
||||
|
||||
|
||||
#
|
||||
# On some platforms (Solaris 10) adding -std=c99 in turn requires that
|
||||
@@ -517,8 +523,11 @@ AC_STRUCT_DIRENT_D_TYPE
|
||||
|
||||
AC_CHECK_FUNCS( wcsdup wcsndup wcslen wcscasecmp wcsncasecmp fwprintf )
|
||||
AC_CHECK_FUNCS( futimes wcwidth wcswidth wcstok fputwc fgetwc )
|
||||
AC_CHECK_FUNCS( wcstol wcslcat wcslcpy lrand48_r killpg mkostemp )
|
||||
AC_CHECK_FUNCS( backtrace backtrace_symbols sysconf getifaddrs )
|
||||
AC_CHECK_FUNCS( wcstol wcslcat wcslcpy lrand48_r killpg )
|
||||
AC_CHECK_FUNCS( backtrace backtrace_symbols_fd sysconf getifaddrs )
|
||||
AC_CHECK_FUNCS( futimens clock_gettime )
|
||||
|
||||
AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] )
|
||||
|
||||
if test x$local_gettext != xno; then
|
||||
AC_CHECK_FUNCS( gettext dcgettext )
|
||||
@@ -744,42 +753,6 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Check if getopt_long exists and works
|
||||
AC_MSG_CHECKING([if getopt_long exists and works])
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#if HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
],
|
||||
[
|
||||
static struct option
|
||||
long_options[] =
|
||||
{
|
||||
0, 0, 0, 0
|
||||
}
|
||||
;
|
||||
int opt = getopt_long( 0,
|
||||
0,
|
||||
0,
|
||||
long_options,
|
||||
0 );
|
||||
|
||||
],
|
||||
have_working_getopt_long=yes,
|
||||
have_working_getopt_long=no
|
||||
)
|
||||
if test "$have_working_getopt_long" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(
|
||||
[HAVE_WORKING_GETOPT_LONG],
|
||||
[1],
|
||||
[Define to 1 if getopt_long exists and works.]
|
||||
)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Check for Solaris curses tputs having fixed length parameter list.
|
||||
AC_MSG_CHECKING([if we are using non varargs tparm.])
|
||||
AC_COMPILE_IFELSE(
|
||||
@@ -788,6 +761,8 @@ AC_COMPILE_IFELSE(
|
||||
[
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#elif HAVE_NCURSES_CURSES_H
|
||||
#include <ncurses/curses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
@@ -817,7 +792,123 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
# Tell the world what we know
|
||||
pcre2_min_version=10.21
|
||||
EXTRA_PCRE2=
|
||||
AC_ARG_WITH(
|
||||
included-pcre2,
|
||||
AS_HELP_STRING(
|
||||
[--without-included-pcre2],
|
||||
[build against the system PCRE2 library instead of the bundled version]
|
||||
),
|
||||
[included_pcre2=$withval],
|
||||
[included_pcre2=auto]
|
||||
)
|
||||
|
||||
if test "x$included_pcre2" != "xyes"; then
|
||||
|
||||
# test for pcre2-config
|
||||
# can use either pcre2-config or pkgconfig here but only implement the former for now
|
||||
AC_CHECK_PROG(PCRE2_CONFIG, pcre2-config, pcre2-config)
|
||||
|
||||
if test "x$PCRE2_CONFIG" != "x"; then
|
||||
dnl AC_MSG_CHECKING([for $WCHAR_T_BITS-bit PCRE2])
|
||||
XLIBS="$LIBS"
|
||||
LIBS="$LIBS "`$PCRE2_CONFIG --libs$WCHAR_T_BITS 2>/dev/null`
|
||||
XCXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS"`$PCRE2_CONFIG --cflags`
|
||||
|
||||
# cheat a bit here. the exact library is determined by $WCHAR_T_BITS,
|
||||
# and so AC_CHECK_LIB won't work (can't use a variable as library name)
|
||||
# AC_SEARCH_LIBS will use the existing $LIBS flags with no additional library first
|
||||
AC_SEARCH_LIBS([pcre2_compile_$WCHAR_T_BITS], [],
|
||||
[ # pcre2 lib found, check for minimum version
|
||||
pcre2_version=`$PCRE2_CONFIG --version`
|
||||
AS_VERSION_COMPARE([$pcre2_version], [$pcre2_min_version],
|
||||
[ # version < minimum
|
||||
AC_MSG_NOTICE([system PCRE2 library version $pcre2_version, need $pcre2_min_version or later])
|
||||
if test "x$included_pcre2" = "xno"; then
|
||||
# complain about pcre2 version
|
||||
AC_MSG_ERROR([system PCRE2 library is too old, but --without-included-pcre2 was given.])
|
||||
else
|
||||
# use the internal version; undo changes to LIBS/CXXFLAGS
|
||||
included_pcre2=yes
|
||||
LIBS="$XLIBS"
|
||||
CXXFLAGS="$XCXXFLAGS"
|
||||
fi
|
||||
],
|
||||
[ # version == minimum
|
||||
working_pcre2=yes
|
||||
],
|
||||
[ # version > minimum
|
||||
working_pcre2=yes
|
||||
]
|
||||
)
|
||||
],
|
||||
[ # fail case; undo the changes to LIBS/CXXFLAGS
|
||||
working_pcre2=no
|
||||
LIBS="$XLIBS"
|
||||
CXXFLAGS="$XCXXFLAGS"
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$working_pcre2" = "xyes"; then
|
||||
AC_MSG_NOTICE([using system PCRE2 library])
|
||||
else
|
||||
# pcre2 size wrong or pcre2-config not found
|
||||
# is it OK to use the included version?
|
||||
if test "x$included_pcre2" = "xno"; then
|
||||
# complain
|
||||
AC_MSG_ERROR([cannot find system pcre2-config, but --without-included-pcre2 was given.
|
||||
Make sure pcre2-config is installed and available in PATH.
|
||||
You may need to install the PCRE2 development library for your system.])
|
||||
else
|
||||
# use the internal version
|
||||
included_pcre2=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Re-test as value may have changed.
|
||||
if test "x$included_pcre2" = "xyes"; then
|
||||
# Build configure/Makefile for pcre2
|
||||
AC_MSG_NOTICE([using included PCRE2 library])
|
||||
# unfortunately these get added to the global configuration
|
||||
ac_configure_args="$ac_configure_args --disable-pcre2-8 --enable-pcre2-$WCHAR_T_BITS --disable-shared"
|
||||
AC_CONFIG_SUBDIRS([pcre2-10.21])
|
||||
|
||||
PCRE2_CXXFLAGS='-I$(PCRE2_DIR)/src'
|
||||
PCRE2_LIBS='-L$(PCRE2_LIBDIR) -lpcre2-$(PCRE2_WIDTH)'
|
||||
|
||||
# Make the binary depend on the PCRE2 libraries so they get built
|
||||
EXTRA_PCRE2='$(PCRE2_LIB)'
|
||||
CXXFLAGS="$CXXFLAGS $PCRE2_CXXFLAGS"
|
||||
LIBS="$LIBS $PCRE2_LIBS"
|
||||
fi
|
||||
|
||||
# Allow configurable extra directories.
|
||||
AC_SUBST(extra_completionsdir)
|
||||
AC_ARG_WITH([extra-completionsdir],
|
||||
AS_HELP_STRING([--with-extra-completionsdir=DIR],
|
||||
[path for extra completions]),
|
||||
[extra_completionsdir=$withval],
|
||||
[extra_completionsdir='${datadir}/fish/vendor_completions.d'])
|
||||
|
||||
AC_SUBST(extra_functionsdir)
|
||||
AC_ARG_WITH([extra_functionsdir],
|
||||
AS_HELP_STRING([--with-extra-functionsdir=DIR],
|
||||
[path for extra functions]),
|
||||
[extra_functionsdir=$withval],
|
||||
[extra_functionsdir='${datadir}/fish/vendor_functions.d'])
|
||||
|
||||
AC_SUBST(extra_confdir)
|
||||
AC_ARG_WITH([extra-confdir],
|
||||
AS_HELP_STRING([--with-extra-confdir=DIR],
|
||||
[path for extra conf]),
|
||||
[extra_confdir=$withval],
|
||||
[extra_confdir='${datadir}/fish/vendor_conf.d'])
|
||||
|
||||
# Tell the world what we know.
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- python -*-
|
||||
|
||||
# Program to generate fish completion function for wajig.
|
||||
# It runs 'wajig command' and analyzes the output to build a
|
||||
# completion file which it writes to stdout.
|
||||
# To use the result, direct stdout to
|
||||
# ~/.fish.d/completions/wajig.fish.
|
||||
|
||||
# Author Reuben Thomas, from Don Rozenberg's bash_completion.py and
|
||||
# fish's apt-get.fish.
|
||||
|
||||
import os
|
||||
import re
|
||||
import pprint
|
||||
pp = pprint.PrettyPrinter()
|
||||
|
||||
def escape_quotes(s):
|
||||
return re.sub('\'', '\\\'', s)
|
||||
|
||||
# Run wajig command
|
||||
f = os.popen('wajig commands', 'r')
|
||||
|
||||
lines = f.readlines()
|
||||
|
||||
option_patt = r'^-([a-z]*)\|--([a-z]*) +([^ ].*)'
|
||||
option_patt_r = re.compile(option_patt)
|
||||
|
||||
command_patt = r'^([a-z-]*) +([^ ].*)'
|
||||
command_patt_r = re.compile(command_patt)
|
||||
|
||||
os_str = []
|
||||
os_str.append('')
|
||||
ol_str = []
|
||||
ol_str.append('')
|
||||
oh_str = []
|
||||
oh_str.append('')
|
||||
o_i = 0
|
||||
|
||||
c_str = []
|
||||
c_str.append('')
|
||||
ch_str = []
|
||||
ch_str.append('')
|
||||
c_i = 0
|
||||
|
||||
for l in lines:
|
||||
l = l.strip()
|
||||
if l == '' or l.find(':') > -1 or l.find('Run') == 0:
|
||||
continue
|
||||
if l.find('-') == 0:
|
||||
mo = option_patt_r.search(l)
|
||||
if mo == None:
|
||||
continue
|
||||
os_str[o_i] = mo.group(1)
|
||||
os_str.append('')
|
||||
ol_str[o_i] = mo.group(2)
|
||||
ol_str.append('')
|
||||
oh_str[o_i] = escape_quotes(mo.group(3))
|
||||
oh_str.append('')
|
||||
o_i += 1
|
||||
else:
|
||||
mo = command_patt_r.search(l)
|
||||
if mo == None:
|
||||
continue
|
||||
c_str[c_i] = mo.group(1)
|
||||
c_str.append('')
|
||||
ch_str[c_i] = escape_quotes(mo.group(2))
|
||||
ch_str.append('')
|
||||
c_i += 1
|
||||
|
||||
# For debugging, print the commands and options.
|
||||
#print
|
||||
#pp.pprint(c_str)
|
||||
|
||||
#print
|
||||
#pp.pprint(os_str)
|
||||
#print
|
||||
#pp.pprint(ol_str)
|
||||
|
||||
part1 = '''function __fish_wajig_no_subcommand -d (N_ 'Test if wajig has yet to be given the subcommand')
|
||||
for i in (commandline -opc)
|
||||
if contains -- $i'''
|
||||
|
||||
part2 = '''
|
||||
return 1
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
function __fish_wajig_use_package -d (N_ 'Test if wajig command should have packages as potential completion')
|
||||
for i in (commandline -opc)
|
||||
if contains -- $i contains bug build build-depend changelog dependents describe detail hold install installr installrs installs list list-files news package purge purge-depend readme recursive recommended reconfigure reinstall remove remove-depend repackage show showinstall showremove showupgrade size sizes source suggested unhold upgrade versions whatis
|
||||
return 0
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
complete -c wajig -n '__fish_wajig_use_package' -a '(__fish_print_packages)' -d (N_ 'Package')'''
|
||||
|
||||
wajig = part1
|
||||
|
||||
#add the commands.
|
||||
for i in range(0, len(c_str) - 1):
|
||||
wajig = "%s %s" % (wajig, c_str[i])
|
||||
|
||||
#add part2
|
||||
wajig = "%s%s" % (wajig, part2)
|
||||
|
||||
#add the options.
|
||||
wajig = "%s%s" % (wajig, os_str[0].lstrip())
|
||||
for i in range(1, len(os_str) - 1):
|
||||
wajig = "%s\ncomplete -c apt-get -s %s -l %s -d (N_ '%s')" % (wajig, os_str[i], ol_str[i], oh_str[i])
|
||||
|
||||
#add the commands.
|
||||
for i in range(0, len(c_str) - 1):
|
||||
wajig = "%s\ncomplete -f -n '__fish_wajig_no_subcommand' -c wajig -a '%s' -d(N_ '%s')" % (wajig, c_str[i], ch_str[i])
|
||||
|
||||
#print it all
|
||||
print wajig
|
||||
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
||||
8
|
||||
31
debian/control
vendored
Normal file
31
debian/control
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
Source: fish
|
||||
Section: shells
|
||||
Priority: extra
|
||||
Maintainer: ridiculous_fish <corydoras@ridiculousfish.com>
|
||||
Uploaders: David Adam <zanchey@ucc.gu.uwa.edu.au>, Siteshwar Vashisht <siteshwar@gmail.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), libncurses5-dev, autoconf, autotools-dev, dh-autoreconf, gettext
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: http://fishshell.com/
|
||||
Vcs-Git: git://github.com/fish-shell/fish-shell.git
|
||||
Vcs-Browser: https://github.com/fish-shell/fish-shell
|
||||
|
||||
Package: fish
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, passwd (>= 4.0.3-10), bc, gettext-base, man-db
|
||||
Recommends: python (>=2.6), xsel (>=1.2.0), xdg-utils
|
||||
Description: friendly interactive shell
|
||||
Fish is a command-line shell for modern systems, focusing on user-friendliness,
|
||||
sensibility and discoverability in interactive use. The syntax is simple, but
|
||||
not POSIX compliant.
|
||||
|
||||
Package: fish-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: fish (= ${binary:Version}), ${misc:Depends}
|
||||
Description: debugging symbols for friendly interactive shell
|
||||
Fish is a command-line shell for modern systems, focusing on user-friendliness,
|
||||
sensibility and discoverability in interactive use. The syntax is simple, but
|
||||
not POSIX compliant.
|
||||
.
|
||||
This package contains the debugging symbols for fish.
|
||||
83
debian/copyright
vendored
Normal file
83
debian/copyright
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
This work was packaged for Debian by David Adam <zanchey@ucc.gu.uwa.edu.au>
|
||||
on Thu, 14 Jun 2012 20:33:34 +0800, based on work by James Vega
|
||||
<jamessan@jamessan.com>.
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
https://github.com/fish-shell/fish-shell
|
||||
|
||||
Upstream Authors:
|
||||
|
||||
Axel Liljencrantz
|
||||
ridiculous_fish
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 2005-2008 Axel Liljencrantz
|
||||
Copyright (C) 2011-2012 ridiculous_fish
|
||||
|
||||
License:
|
||||
|
||||
Copyright (C) 2005-2008 Axel Liljencrantz
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA.
|
||||
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||
|
||||
Fish contains code under the BSD license, namely versions of the
|
||||
two functions strlcat and strlcpy, modified for use with wide
|
||||
character strings.
|
||||
|
||||
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
The XSel command, written and copyrighted by Conrad Parker, is
|
||||
distributed together with, and used by fish. It is released under the MIT
|
||||
license.
|
||||
|
||||
It is Copyright (C) 2001 Conrad Parker <conrad@vergenet.net>
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation. No representations are made about the
|
||||
suitability of this software for any purpose. It is provided "as is"
|
||||
without express or implied warranty.
|
||||
|
||||
Fish contains code from the glibc library, namely the wcstok function
|
||||
in fallback.c. This code is licensed under the LGPL.
|
||||
|
||||
On Debian systems, the complete text of the GNU Lesser General
|
||||
Public License can be found in `/usr/share/common-licenses/LGPL'.
|
||||
|
||||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2005 James Vega <jamessan@jamessan.com>
|
||||
Copyright (C) 2012 David Adam <zanchey@ucc.gu.uwa.edu.au>
|
||||
|
||||
and is licensed under the GPL version 2, see above.
|
||||
12
debian/fish.doc-base
vendored
Normal file
12
debian/fish.doc-base
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Document: fish
|
||||
Title: Debian fish Manual
|
||||
Author: Axel Liljencrantz <axel@liljencrantz.se>
|
||||
Abstract: This guide documents fish, a shell
|
||||
geared towards interactive use.
|
||||
Section: Shells
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/fish/index.html
|
||||
Files: /usr/share/doc/fish/*.html
|
||||
|
||||
|
||||
2
debian/menu
vendored
Normal file
2
debian/menu
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
?package(fish):needs="text" section="Applications/Shells"\
|
||||
title="fish" command="/usr/bin/fish"
|
||||
47
debian/postinst
vendored
Normal file
47
debian/postinst
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
# postinst script for fish
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
add_shell() {
|
||||
if ! type add-shell > /dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
|
||||
add-shell /usr/bin/fish
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
add_shell
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
37
debian/postrm
vendored
Normal file
37
debian/postrm
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
# postrm script for fish
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||
# <overwriter-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
46
debian/prerm
vendored
Normal file
46
debian/prerm
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
# prerm script for fish
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
remove_shell() {
|
||||
if ! type remove-shell > /dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
|
||||
remove-shell /usr/bin/fish
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
remove|deconfigure)
|
||||
remove_shell
|
||||
;;
|
||||
|
||||
upgrade|failed-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
25
debian/rules
vendored
Executable file
25
debian/rules
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
# dpkg-dev 1.16.1 doesn't export buildflags
|
||||
# can be removed once on dh compat level 9
|
||||
DPKG_EXPORT_BUILDFLAGS = 1
|
||||
-include /usr/share/dpkg/buildflags.mk
|
||||
|
||||
%:
|
||||
dh $@ --with autotools-dev,autoreconf
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install --destdir=debian/fish
|
||||
|
||||
override_dh_installdocs:
|
||||
dh_installdocs --link-doc=fish
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=fish-dbg
|
||||
|
||||
# Don't run tests; they don't work until fish is installed
|
||||
override_dh_auto_test:
|
||||
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
@@ -56,7 +56,7 @@ is transformed into:
|
||||
|
||||
`@cmnd{echo} @args{hello} @args{world}`
|
||||
|
||||
which is then transformed by Doxygen into an HTML version (`make user_doc`):
|
||||
which is then transformed by Doxygen into an HTML version (`make doc`):
|
||||
|
||||
`<span class="command">echo</span> <span class="argument">hello</span> <span class="argument">world</span>`
|
||||
|
||||
@@ -160,6 +160,8 @@ The following can be used in \\fish blocks to render some fish scenarios. These
|
||||
- `<error>`: \<error\>This would be shown as an error.\</error\>
|
||||
- `<asis>`: \<asis\>This test will not be parsed for fish markup.\</asis\>
|
||||
- `<outp>`: \<outp\>This would be rendered as command/script output.\</outp\>
|
||||
- `<bs>`: Render the contents with a preceding backslash. Useful when presenting output.
|
||||
- `{{` and `}}`: Required when wanting curly braces in regular expression example.
|
||||
|
||||
### Prompts and cursors
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
\subsection abbr-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
abbr -a word="phrase"
|
||||
abbr -a word phrase...
|
||||
abbr -s
|
||||
abbr -l
|
||||
abbr -e word
|
||||
@@ -14,7 +14,7 @@ abbr -e word
|
||||
|
||||
Abbreviations are user-defined character sequences or words that are replaced with longer phrases after they are entered. For example, a frequently-run command such as `git checkout` can be abbreviated to `gco`. After entering `gco` and pressing @key{Space} or @key{Enter}, the full text `git checkout` will appear in the command line.
|
||||
|
||||
Abbreviations are stored, by default, in a universal variable.
|
||||
Abbreviations are stored using universal variables. You can create abbreviations directly on the command line, and they will be saved automatically. Calling `abbr -a` in config.fish will lead to slightly worse startup performance.
|
||||
|
||||
The following parameters are available:
|
||||
|
||||
@@ -26,6 +26,8 @@ The following parameters are available:
|
||||
|
||||
- `-e WORD` or `--erase WORD` Erase the abbreviation WORD.
|
||||
|
||||
Note: fish version 2.1 supported `-a WORD=PHRASE`. This syntax is now deprecated but will still be converted.
|
||||
|
||||
\subsection abbr-example Examples
|
||||
|
||||
\fish
|
||||
|
||||
@@ -18,6 +18,8 @@ alias NAME=DEFINITION
|
||||
|
||||
You cannot create an alias to a function with the same name.
|
||||
|
||||
Note that spaces need to be escaped in the call to alias just like in the commandline _even inside the quotes_.
|
||||
|
||||
|
||||
\subsection alias-example Example
|
||||
|
||||
@@ -31,4 +33,8 @@ alias rmi "rm -i"
|
||||
function rmi
|
||||
rm -i $argv
|
||||
end
|
||||
|
||||
# This needs to have the spaces escaped or "Chrome.app..." will be seen as an argument to "/Applications/Google":
|
||||
|
||||
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome banana'
|
||||
\endfish
|
||||
|
||||
@@ -7,11 +7,12 @@ COMMAND1; and COMMAND2
|
||||
|
||||
\subsection and-description Description
|
||||
|
||||
`and` is used to execute a command if the current exit status (as set by the last previous command) is 0.
|
||||
`and` is used to execute a command if the current exit status (as set by the previous command) is 0.
|
||||
|
||||
`and` does not change the current exit status.
|
||||
`and` statements may be used as part of the condition in an <a href="#if">`and`</a> or <a href="#while">`while`</a> block. See the documentation
|
||||
for <a href="#if">`if`</a> and <a href="#while">`while`</a> for examples.
|
||||
|
||||
The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
`and` does not change the current exit status. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
|
||||
|
||||
\subsection and-example Example
|
||||
|
||||
@@ -31,7 +31,7 @@ When multiple `COMMAND`s are provided, they are all run in the specified order w
|
||||
|
||||
If no `SEQUENCE` is provided, all bindings (or just the bindings in the specified `MODE`) are printed. If `SEQUENCE` is provided without `COMMAND`, just the binding matching that sequence is printed.
|
||||
|
||||
Key bindings are not saved between sessions by default. To save custom keybindings, edit the `fish_user_key_bindings` function and insert the appropriate `bind` statements.
|
||||
Key bindings are not saved between sessions by default. **Bare `bind` statements in <a href="index.html#initialization">config.fish</a> won't have any effect because it is sourced before the default keybindings are setup.** To save custom keybindings, put the `bind` statements into a function called `fish_user_key_bindings`, which will be <a href="tutorial.html#tut_autoload">autoloaded</a>.
|
||||
|
||||
Key bindings may use "modes", which mimics Vi's modal input behavior. The default mode is "default", and every bind applies to a single mode. The mode can be viewed/changed with the `$fish_bind_mode` variable.
|
||||
|
||||
@@ -53,12 +53,20 @@ The following parameters are available:
|
||||
|
||||
The following special input functions are available:
|
||||
|
||||
- `accept-autosuggestion`, accept the current autosuggestion completely
|
||||
|
||||
- `backward-char`, moves one character to the left
|
||||
|
||||
- `backward-bigword`, move one whitespace-delimited word to the left
|
||||
|
||||
- `backward-delete-char`, deletes one character of input to the left of the cursor
|
||||
|
||||
- `backward-kill-bigword`, move the whitespace-delimited word to the left of the cursor to the killring
|
||||
|
||||
- `backward-kill-line`, move everything from the beginning of the line to the cursor to the killring
|
||||
|
||||
- `backward-kill-path-component`, move one path component to the left of the cursor (everything from the last "/" or whitespace exclusive) to the killring
|
||||
|
||||
- `backward-kill-word`, move the word to the left of the cursor to the killring
|
||||
|
||||
- `backward-word`, move one word to the left
|
||||
@@ -67,23 +75,25 @@ The following special input functions are available:
|
||||
|
||||
- `beginning-of-line`, move to the beginning of the line
|
||||
|
||||
- `begin-selection`, start selecting text
|
||||
|
||||
- `capitalize-word`, make the current word begin with a capital letter
|
||||
|
||||
- `complete`, guess the remainder of the current token
|
||||
|
||||
- `complete-and-search`, invoke the searchable pager on completion options
|
||||
|
||||
- `delete-char`, delete one character to the right of the cursor
|
||||
|
||||
- `delete-line`, delete the entire line
|
||||
|
||||
- `downcase-word`, make the current word lowercase
|
||||
|
||||
- `dump-functions`, print a list of all key-bindings
|
||||
|
||||
- `end-of-history`, move to the end of the history
|
||||
|
||||
- `end-of-line`, move to the end of the line
|
||||
|
||||
- `explain`, print a description of possible problems with the current command
|
||||
- `end-selection`, end selecting text
|
||||
|
||||
- `forward-bigword`, move one whitespace-delimited word to the right
|
||||
|
||||
- `forward-char`, move one character to the right
|
||||
|
||||
@@ -93,12 +103,24 @@ The following special input functions are available:
|
||||
|
||||
- `history-search-forward`, search the history for the next match
|
||||
|
||||
- `kill-bigword`, move the next whitespace-delimited word to the killring
|
||||
|
||||
- `kill-line`, move everything from the cursor to the end of the line to the killring
|
||||
|
||||
- `kill-selection`, move the selected text to the killring
|
||||
|
||||
- `kill-whole-line`, move the line to the killring
|
||||
|
||||
- `kill-word`, move the next word to the killring
|
||||
|
||||
- `suppress-autosuggestion`, remove the current autosuggestion
|
||||
|
||||
- `swap-selection-start-stop`, go to the other end of the highlighted text without changing the selection
|
||||
|
||||
- `transpose-chars`, transpose two characters to the left of the cursor
|
||||
|
||||
- `transpose-words`, transpose two words to the left of the cursor
|
||||
|
||||
- `upcase-word`, make the current word uppercase
|
||||
|
||||
- `yank`, insert the latest entry of the killring into the buffer
|
||||
@@ -123,3 +145,12 @@ set -g fish_key_bindings fish_vi_key_bindings
|
||||
bind -M insert \cc kill-whole-line force-repaint
|
||||
\endfish
|
||||
Turns on Vi key bindings and rebinds @key{Control,C} to clear the input line.
|
||||
|
||||
|
||||
\subsection special-case-escape Special Case: The escape Character
|
||||
|
||||
The escape key can be used standalone, for example, to switch from insertion mode to normal mode when using Vi keybindings. Escape may also be used as a "meta" key, to indicate the start of an escape sequence, such as function or arrow keys. Custom bindings can also be defined that begin with an escape character.
|
||||
|
||||
fish waits for a period after receiving the escape character, to determine whether it is standalone or part of an escape sequence. While waiting, additional key presses make the escape key behave as a meta key. If no other key presses come in, it is handled as a standalone escape. The waiting period is set to 300 milliseconds (0.3 seconds) in the default key bindings and 10 milliseconds in the vi key bindings. It can be configured by setting the `fish_escape_delay_ms` variable to a value between 10 and 5000 ms. It is recommended that this be a universal variable that you set once from an interactive session.
|
||||
|
||||
Note: fish 2.2.0 and earlier used a default of 10 milliseconds, and provided no way to configure it. That effectively made it impossible to use escape as a meta key.
|
||||
|
||||
9
doc_src/branding/README
Normal file
9
doc_src/branding/README
Normal file
@@ -0,0 +1,9 @@
|
||||
This directory is for images relevant to the fish brand.
|
||||
|
||||
The logo.psd and logo.svg files were created by Steve Stagg
|
||||
(http://github.com/stestagg). They were uploaded to SickerMule by Andrei
|
||||
Zvonimir Crnković (https://github.com/andreicek). See
|
||||
|
||||
https://www.stickermule.com/marketplace/tags/shell
|
||||
https://www.stickermule.com/marketplace/3507-fish-shell-sticker-die-cut
|
||||
https://www.stickermule.com/marketplace/3508-fish-shell-sticker-square-cut
|
||||
BIN
doc_src/branding/logo.psd
Normal file
BIN
doc_src/branding/logo.psd
Normal file
Binary file not shown.
33
doc_src/branding/logo.svg
Normal file
33
doc_src/branding/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 109 KiB |
@@ -14,6 +14,7 @@ If `DIRECTORY` is a relative path, the paths found in the `CDPATH` environment v
|
||||
|
||||
Note that the shell will attempt to change directory without requiring `cd` if the name of a directory is provided (starting with `.`, `/` or `~`, or ending with `/`).
|
||||
|
||||
Fish also ships a wrapper function around the builtin `cd` that understands `cd -` as changing to the previous directory. See also <a href="commands.html#prevd">`prevd`</a>. This wrapper function maintains a history of the 25 most recently visited directories in the `$dirprev` and `$dirnext` global variables.
|
||||
|
||||
\subsection cd-example Examples
|
||||
|
||||
|
||||
@@ -57,3 +57,24 @@ The following options output metadata about the commandline state:
|
||||
\subsection commandline-example Example
|
||||
|
||||
`commandline -j $history[3]` replaces the job under the cursor with the third item from the command line history.
|
||||
|
||||
If the commandline contains
|
||||
\fish
|
||||
>_ echo $fl___ounder >&2 | less; and echo $catfish
|
||||
\endfish
|
||||
|
||||
(with the cursor on the "o" of "flounder")
|
||||
|
||||
Then the following invocations behave like this:
|
||||
\fish
|
||||
>_ commandline -t
|
||||
$flounder
|
||||
>_ commandline -ct
|
||||
$fl
|
||||
>_ commandline -b # or just commandline
|
||||
echo $flounder >&2 | less; and echo $catfish
|
||||
>_ commandline -p
|
||||
echo $flounder >&2
|
||||
>_ commandline -j
|
||||
echo $flounder >&2 | less
|
||||
\endfish
|
||||
|
||||
@@ -3,11 +3,18 @@
|
||||
\subsection complete-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
complete ( -c | --command | -p | --path ) COMMAND
|
||||
[( -s | --short-option ) SHORT_OPTION]
|
||||
[( -l | --long-option | -o | --old-option ) LONG_OPTION]
|
||||
[( -c | --command | -p | --path ) COMMAND]...
|
||||
[( -e | --erase )]
|
||||
[( -s | --short-option ) SHORT_OPTION]...
|
||||
[( -l | --long-option | -o | --old-option ) LONG_OPTION]...
|
||||
[( -a | --arguments ) OPTION_ARGUMENTS]
|
||||
[( -w | --wraps ) WRAPPED_COMMAND]
|
||||
[( -f | --no-files )]
|
||||
[( -r | --require-parameter )]
|
||||
[( -x | --exclusive )]
|
||||
[( -w | --wraps ) WRAPPED_COMMAND]...
|
||||
[( -n | --condition ) CONDITION]
|
||||
[( -d | --description ) DESCRIPTION]
|
||||
complete ( -C[STRING] | --do-complete[=STRING] )
|
||||
\endfish
|
||||
|
||||
\subsection complete-description Description
|
||||
@@ -22,31 +29,37 @@ the fish manual.
|
||||
|
||||
- `LONG_OPTION` is a multi character option for the command.
|
||||
|
||||
- `OPTION_ARGUMENTS` is parameter containing a space-separated list of possible option-arguments, which may contain subshells.
|
||||
- `OPTION_ARGUMENTS` is parameter containing a space-separated list of possible option-arguments, which may contain command substitutions.
|
||||
|
||||
- `DESCRIPTION` is a description of what the option and/or option arguments do.
|
||||
|
||||
- `-C STRING` or `--do-complete=STRING` makes complete try to find all possible completions for the specified string.
|
||||
- `-c COMMAND` or `--command COMMAND` specifies that `COMMAND` is the name of the command.
|
||||
|
||||
- `-w WRAPPED_COMMAND` or `--wraps=WRAPPED_COMMAND` causes the specified command to inherit completions from the wrapped command.
|
||||
- `-p COMMAND` or `--path COMMAND` specifies that `COMMAND` is the absolute path of the program (optionally containing wildcards).
|
||||
|
||||
- `-e` or `--erase` implies that the specified completion should be deleted.
|
||||
- `-e` or `--erase` deletes the specified completion.
|
||||
|
||||
- `-f` or `--no-files` specifies that the option specified by this completion may not be followed by a filename.
|
||||
- `-s SHORT_OPTION` or `--short-option=SHORT_OPTION` adds a short option to the completions list.
|
||||
|
||||
- `-l LONG_OPTION` or `--long-option=LONG_OPTION` adds a GNU style long option to the completions list.
|
||||
|
||||
- `-o LONG_OPTION` or `--old-option=LONG_OPTION` adds an old style long option to the completions list (See below for details).
|
||||
|
||||
- `-a OPTION_ARGUMENTS` or `--arguments=OPTION_ARGUMENTS` adds the specified option arguments to the completions list.
|
||||
|
||||
- `-f` or `--no-files` specifies that the options specified by this completion may not be followed by a filename.
|
||||
|
||||
- `-r` or `--require-parameter` specifies that the options specified by this completion always must have an option argument, i.e. may not be followed by another option.
|
||||
|
||||
- `-x` or `--exclusive` implies both `-r` and `-f`.
|
||||
|
||||
- `-w WRAPPED_COMMAND` or `--wraps=WRAPPED_COMMAND` causes the specified command to inherit completions from the wrapped command (See blow for details).
|
||||
|
||||
- `-n` or `--condition` specifies a shell command that must return 0 if the completion is to be used. This makes it possible to specify completions that should only be used in some cases.
|
||||
|
||||
- `-o` or `--old-option` implies that the command uses old long style options with only one dash.
|
||||
- `-CSTRING` or `--do-complete=STRING` makes complete try to find all possible completions for the specified string.
|
||||
|
||||
- `-p` or `--path` implies that the string `COMMAND` is the full path of the command.
|
||||
|
||||
- `-r` or `--require-parameter` specifies that the option specified by this completion always must have an option argument, i.e. may not be followed by another option.
|
||||
|
||||
- `-u` or `--unauthoritative` implies that there may be more options than the ones specified, and that fish should not assume that options not listed are spelling errors.
|
||||
|
||||
- `-A` or `--authoritative` implies that there may be no more options than the ones specified, and that fish should assume that options not listed are spelling errors.
|
||||
|
||||
- `-x` or `--exclusive` implies both `-r` and `-f`.
|
||||
- `-C` or `--do-complete` with no argument makes complete try to find all possible completions for the current command line buffer. If the shell is not in interactive mode, an error is returned.
|
||||
|
||||
Command specific tab-completions in `fish` are based on the notion of options and arguments. An option is a parameter which begins with a hyphen, such as '`-h`', '`-help`' or '`--help`'. Arguments are parameters that do not begin with a hyphen. Fish recognizes three styles of options, the same styles as the GNU version of the getopt library. These styles are:
|
||||
|
||||
@@ -54,13 +67,21 @@ Command specific tab-completions in `fish` are based on the notion of options an
|
||||
|
||||
- Old style long options, like '`-Wall`'. Old style long options can be more than one character long, are preceded by a single hyphen and may not be grouped together. Option arguments are specified in the following parameter ('`-ao null`').
|
||||
|
||||
- GNU style long options, like '`--colors`'. GNU style long options can be more than one character long, are preceded by two hyphens, and may not be grouped together. Option arguments may be specified in the following parameter ('`--quoting-style`') or by appending the option with a '`=`' and the value ('`--quoting-style=shell`'). GNU style long options may be abbreviated so long as the abbreviation is unique ('`--h`') is equivalent to '`--help`' if help is the only long option beginning with an 'h').
|
||||
- GNU style long options, like '`--colors`'. GNU style long options can be more than one character long, are preceded by two hyphens, and may not be grouped together. Option arguments may be specified in the following parameter ('`--quoting-style shell`') or by appending the option with a '`=`' and the value ('`--quoting-style=shell`'). GNU style long options may be abbreviated so long as the abbreviation is unique ('`--h`') is equivalent to '`--help`' if help is the only long option beginning with an 'h').
|
||||
|
||||
The options for specifying command name, command path, or command switches may all be used multiple times to specify multiple commands which have the same completion or multiple switches accepted by a command.
|
||||
The options for specifying command name and command path may be used multiple times to define the same completions for multiple commands.
|
||||
|
||||
The `-w` or `--wraps` options causes the specified command to inherit completions from another command. The inheriting command is said to "wrap" the inherited command. The wrapping command may have its own completions in addition to inherited ones. A command may wrap multiple commands, and wrapping is transitive: if A wraps B, and B wraps C, then A automatically inherits all of C's completions. Wrapping can be removed using the `-e` or `--erase` options.
|
||||
The options for specifying command switches and wrapped commands may be used multiple times to define multiple completions for the command(s) in a single call.
|
||||
|
||||
When erasing completions, it is possible to either erase all completions for a specific command by specifying `complete -e -c COMMAND`, or by specifying a specific completion option to delete by specifying either a long, short or old style option.
|
||||
Invoking `complete` multiple times for the same command adds the new definitions on top of any existing completions defined for the command.
|
||||
|
||||
When `-a` or `--arguments` is specified in conjunction with long, short, or old style options, the specified arguments are only used as completions when attempting to complete an argument for any of the specified options. If `-a` or `--arguments` is specified without any long, short, or old style options, the specified arguments are used when completing any argument to the command (except when completing an option argument that was specified with `-r` or `--require-parameter`).
|
||||
|
||||
Command substitutions found in `OPTION_ARGUMENTS` are not expected to return a space-separated list of arguments. Instead they must return a newline-separated list of arguments, and each argument may optionally have a tab character followed by the argument description. Any description provided in this way overrides a description given with `-d` or `--description`.
|
||||
|
||||
The `-w` or `--wraps` options causes the specified command to inherit completions from another command. The inheriting command is said to "wrap" the inherited command. The wrapping command may have its own completions in addition to inherited ones. A command may wrap multiple commands, and wrapping is transitive: if A wraps B, and B wraps C, then A automatically inherits all of C's completions. Wrapping can be removed using the `-e` or `--erase` options. Note that wrapping only works for completions specified with `-c` or `--command` and are ignored when specifying completions with `-p` or `--path`.
|
||||
|
||||
When erasing completions, it is possible to either erase all completions for a specific command by specifying `complete -c COMMAND -e`, or by specifying a specific completion option to delete by specifying either a long, short or old style option.
|
||||
|
||||
|
||||
\subsection complete-example Example
|
||||
@@ -91,7 +112,7 @@ This can be written as:
|
||||
complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d "Don't check dependencies"
|
||||
\endfish
|
||||
|
||||
where `__fish_contains_opt` is a function that checks the commandline buffer for the presence of a specified set of options.
|
||||
where `__fish_contains_opt` is a function that checks the command line buffer for the presence of a specified set of options.
|
||||
|
||||
To implement an alias, use the `-w` or `--wraps` option:
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ A program should be designed to make its features as easy as possible to discove
|
||||
Rationale:
|
||||
A program whose features are discoverable turns a new user into an expert in a shorter span of time, since the user will become an expert on the program simply by using it.
|
||||
|
||||
The main benefit of a graphical program over a command-line-based program is discoverability. In a graphical program, one can discover all the common features by simply looking at the user interface and guessing what the different buttons, menus and other widgets do. The traditional way to discover features in command-line programs is through manual pages. This requires both that the user starts to use a different program, and then she/he remembers the new information until the next time she/he uses the same program.
|
||||
The main benefit of a graphical program over a command-line-based program is discoverability. In a graphical program, one can discover all the common features by simply looking at the user interface and guessing what the different buttons, menus and other widgets do. The traditional way to discover features in command-line programs is through manual pages. This requires both that the user starts to use a different program, and then they remember the new information until the next time they use the same program.
|
||||
|
||||
Examples:
|
||||
- Everything should be tab-completable, and every tab completion should have a description.
|
||||
@@ -99,7 +99,7 @@ Examples:
|
||||
|
||||
- The help manual should be easy to read, easily available from the shell, complete and contain many examples
|
||||
|
||||
- The language should be uniform, so that once the user understands the command/argument syntax, she/he will know the whole language, and be able to use tab-completion to discover new features.
|
||||
- The language should be uniform, so that once the user understands the command/argument syntax, they will know the whole language, and be able to use tab-completion to discover new features.
|
||||
|
||||
|
||||
\htmlonly[block]
|
||||
|
||||
@@ -10,3 +10,5 @@ dirh
|
||||
`dirh` prints the current directory history. The current position in the history is highlighted using the color defined in the `fish_color_history_current` environment variable.
|
||||
|
||||
`dirh` does not accept any parameters.
|
||||
|
||||
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables.
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
\subsection dirs-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
dirs
|
||||
dirs -c
|
||||
\endfish
|
||||
|
||||
\subsection dirs-description Description
|
||||
|
||||
`dirs` prints the current directory stack, as created by the <a href="#pushd">`pushd`</a> command.
|
||||
|
||||
With "-c", it clears the directory stack instead.
|
||||
|
||||
`dirs` does not accept any parameters.
|
||||
|
||||
@@ -117,7 +117,7 @@ Use the <a href="commands.html#fish_update_completions">`fish_update_completions
|
||||
|
||||
<i>For example if `~/images` is a symlink to `~/Documents/Images`, if I write '`cd images`', my prompt will say `~/Documents/Images`, not `~/images`.</i>
|
||||
|
||||
Because it is impossible to consistently keep symlinked directories unresolved. It is indeed possible to do this partially, and many other shells do so. But it was felt there are enough serious corner cases that this is a bad idea. Most such issues have to do with how '..' is handled, and are varitations of the following example:
|
||||
Because it is impossible to consistently keep symlinked directories unresolved. It is indeed possible to do this partially, and many other shells do so. But it was felt there are enough serious corner cases that this is a bad idea. Most such issues have to do with how '..' is handled, and are variations of the following example:
|
||||
|
||||
Writing `cd images; ls ..` given the above directory structure would list the contents of `~/Documents`, not of `~`, even though using `cd ..` changes the current directory to `~`, and the prompt, the `pwd` builtin and many other directory information sources suggest that the current directory is `~/images` and its parent is `~`. This issue is not possible to fix without either making every single command into a builtin, breaking Unix semantics or implementing kludges in every single command. This issue can also be seen when doing IO redirection.
|
||||
|
||||
@@ -136,10 +136,10 @@ The `open` command uses the MIME type database and the `.desktop` files used by
|
||||
<hr>
|
||||
\section faq-default How do I make fish my default shell?
|
||||
|
||||
If you installed fish manually (e.g. by compiling it, not by using a package manager), you first need to add fish to the list of shells by executing the following command (assuming you installed fish in /usr/local) as root:
|
||||
If you installed fish manually (e.g. by compiling it, not by using a package manager), you first need to add fish to the list of shells by executing the following command (assuming you installed fish in /usr/local):
|
||||
|
||||
\fish{cli-dark}
|
||||
echo /usr/local/bin/fish >>/etc/shells
|
||||
echo /usr/local/bin/fish | sudo tee -a /etc/shells
|
||||
\endfish
|
||||
|
||||
If you installed a prepackaged version of fish, the package manager should have already done this for you.
|
||||
@@ -212,9 +212,14 @@ Next, do the following (assuming fish was installed to /usr/local):
|
||||
rm -Rf /usr/local/etc/fish /usr/local/share/fish ~/.config/fish
|
||||
rm /usr/local/share/man/man1/fish*.1
|
||||
cd /usr/local/bin
|
||||
rm -f fish mimedb fishd fish_indent
|
||||
rm -f fish fish_indent
|
||||
\endfish
|
||||
|
||||
<hr>
|
||||
\section faq-reserved-chars Unicode private-use characters reserved by fish
|
||||
|
||||
Fish reserves the <a href="http://www.unicode.org/faq/private_use.html">Unicode private-use character range</a> from U+F600 thru U+F73F for internal use. Any attempt to feed characters in that range to fish will result in them being replaced by the Unicode "replacement character" U+FFFD. This includes both interactive input as well as any file read by fish (but not programs run by fish).
|
||||
|
||||
\htmlonly[block]
|
||||
</div>
|
||||
\endhtmlonly
|
||||
|
||||
@@ -11,6 +11,8 @@ fish_indent [OPTIONS]
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-d` or `--dump` dumps information about the parsed fish commands to stderr
|
||||
|
||||
- `-i` or `--no-indent` do not indent commands; only reformat to one job per line
|
||||
|
||||
- `-v` or `--version` displays the current fish version and then exits
|
||||
|
||||
13
doc_src/fish_realpath.txt
Normal file
13
doc_src/fish_realpath.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
\section fish_realpath fish_realpath - Convert a path to an absolute path without symlinks
|
||||
|
||||
\subsection fish_realpath-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
fish_realpath path
|
||||
\endfish
|
||||
|
||||
\subsection fish_realpath-description Description
|
||||
|
||||
This is an implementation of the external realpath command that doesn't support any options. It's meant to be used only by scripts which need to be portable. In general scripts shouldn't invoke this directly. They should just use `realpath` which will fallback to this builtin if an external command cannot be found.
|
||||
|
||||
If the path is invalid no translated path will be written to stdout and an error will be reported.
|
||||
This implementation behaves like the GNU command being invoked with `--canonicalize-existing`.
|
||||
@@ -20,7 +20,7 @@ A simple right prompt:
|
||||
|
||||
\fish
|
||||
function fish_right_prompt -d "Write out the right prompt"
|
||||
date "+%m/%d/%y"
|
||||
date '+%m/%d/%y'
|
||||
end
|
||||
\endfish
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
408-600-6421\section fish_vi_mode fish_vi_mode - Enable vi mode
|
||||
\section fish_vi_mode fish_vi_mode - Enable vi mode
|
||||
|
||||
\subsection fish_vi_mode-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
|
||||
@@ -9,7 +9,7 @@ funced [OPTIONS] NAME
|
||||
|
||||
`funced` provides an interface to edit the definition of the function `NAME`.
|
||||
|
||||
If the `$EDITOR` environment variable is set, it will be used as the program to edit the function. Otherwise, a built-in editor will be used.
|
||||
If the `$VISUAL` environment variable is set, it will be used as the program to edit the function. If `$VISUAL` is unset but `$EDITOR` is set, that will be used. Otherwise, a built-in editor will be used.
|
||||
|
||||
If there is no function called `NAME` a new function will be created with the specified name
|
||||
|
||||
|
||||
@@ -8,3 +8,5 @@ funcsave FUNCTION_NAME
|
||||
\subsection funcsave-description Description
|
||||
|
||||
`funcsave` saves the current definition of a function to a file in the fish configuration directory. This function will be automatically loaded by current and future fish sessions. This can be useful if you have interactively created a new function and wish to save it for later use.
|
||||
|
||||
Note that because fish loads functions on-demand, saved functions will not function as <a href="index.html#event">event handlers</a> until they are run or sourced otherwise. To activate an event handler for every new shell, add the function to your <a href="index.html#initialization">shell initialization file</a> instead of using `funcsave`.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
\subsection function-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
function [OPTIONS] NAME; BODY; end
|
||||
function NAME [OPTIONS]; BODY; end
|
||||
\endfish
|
||||
|
||||
\subsection function-description Description
|
||||
|
||||
@@ -12,7 +12,7 @@ end
|
||||
|
||||
`if` will execute the command `CONDITION`. If the condition's exit status is 0, the commands `COMMANDS_TRUE` will execute. If the exit status is not 0 and `else` is given, `COMMANDS_FALSE` will be executed.
|
||||
|
||||
In order to use the exit status of multiple commands as the condition of an if block, use <a href="#begin">`begin; ...; end`</a> and the short circuit commands <a href="commands.html#and">`and`</a> and <a href="commands.html#or">`or`</a>.
|
||||
You can use <a href="#and">`and`</a> or <a href="#and">`or`</a> in the condition. See the second example below.
|
||||
|
||||
The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
|
||||
@@ -30,3 +30,11 @@ else
|
||||
echo foo.txt and bar.txt do not exist
|
||||
end
|
||||
\endfish
|
||||
|
||||
The following code will print "foo.txt exists and is readable" if foo.txt is a regular file and readable
|
||||
\fish
|
||||
if test -f foo.txt
|
||||
and test -r foo.txt
|
||||
echo "foo.txt exists and is readable"
|
||||
end
|
||||
\endfish
|
||||
|
||||
@@ -59,7 +59,7 @@ Switches differ between commands and are documented in the manual page for each
|
||||
|
||||
\subsection quotes Quotes
|
||||
|
||||
Sometimes features such as <a href="#expand">parameter expansion</a> and <a href="#escapes">character escapes</a> get in the way. When that happens, the user can write a parameter within quotes, either `'` (single quote) or `"` (double quote). There is one important difference between single quoted and double quoted strings: When using double quoted string, <a href="#expand-variable">variable expansion</a> still takes place. Other than that, a quoted parameter will not be parameter expanded, may contain spaces, and escape sequences are ignored. The only backslash escape accepted within single quotes is `\'`, which escapes a single quote and `\\`, which escapes the backslash symbol. The only backslash escapes accepted within double quotes are `\"`, which escapes a double quote, `\$`, which escapes a dollar character, `\` followed by a newline, which deletes the backslash and the newline, and lastly `\\`, which escapes the backslash symbol. Single quotes have no special meaning within double quotes and vice versa.
|
||||
Sometimes features such as <a href="#expand">parameter expansion</a> and <a href="#escapes">character escapes</a> get in the way. When that happens, the user can write a parameter within quotes, either `'` (single quote) or `"` (double quote). There is one important difference between single quoted and double quoted strings: When using double quoted string, <a href="#expand-variable">variable expansion</a> still takes place. Other than that, no other kind of expansion (including <a href="#expand-brace">brace expansion</a> and parameter expansion) will take place, the parameter may contain spaces, and escape sequences are ignored. The only backslash escape accepted within single quotes is `\'`, which escapes a single quote and `\\`, which escapes the backslash symbol. The only backslash escapes accepted within double quotes are `\"`, which escapes a double quote, `\$`, which escapes a dollar character, `\` followed by a newline, which deletes the backslash and the newline, and lastly `\\`, which escapes the backslash symbol. Single quotes have no special meaning within double quotes and vice versa.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -80,14 +80,14 @@ would remove the two files 'cumbersome' and 'filename.txt'.
|
||||
|
||||
Some characters can not be written directly on the command line. For these characters, so called escape sequences are provided. These are:
|
||||
|
||||
- '<code>\\a</code>' escapes the alert character
|
||||
- '<code>\\b</code>' escapes the backspace character
|
||||
- '<code>\\e</code>' escapes the escape character
|
||||
- '<code>\\f</code>' escapes the form feed character
|
||||
- '<code>\\n</code>' escapes a newline character
|
||||
- '<code>\\r</code>' escapes the carriage return character
|
||||
- '<code>\\t</code>' escapes the tab character
|
||||
- '<code>\\v</code>' escapes the vertical tab character
|
||||
- '<code>\\a</code>' represents the alert character
|
||||
- '<code>\\b</code>' represents the backspace character
|
||||
- '<code>\\e</code>' represents the escape character
|
||||
- '<code>\\f</code>' represents the form feed character
|
||||
- '<code>\\n</code>' represents a newline character
|
||||
- '<code>\\r</code>' represents the carriage return character
|
||||
- '<code>\\t</code>' represents the tab character
|
||||
- '<code>\\v</code>' represents the vertical tab character
|
||||
- '<code>\\ </code>' escapes the space character
|
||||
- '<code>\\$</code>' escapes the dollar character
|
||||
- '<code>\\\\</code>' escapes the backslash character
|
||||
@@ -110,18 +110,18 @@ Some characters can not be written directly on the command line. For these chara
|
||||
- '<code>\\"</code>' escapes the quote character
|
||||
- '<code>\\'</code>' escapes the apostrophe character
|
||||
|
||||
- '<code>\\x<i>xx</i></code>', where <code><i>xx</i></code> is a hexadecimal number, escapes the ascii character with the specified value. For example, `\x9` is the tab character.
|
||||
- '<code>\\x<i>xx</i></code>', where <code><i>xx</i></code> is a hexadecimal number, represents the ascii character with the specified value. For example, `\x9` is the tab character.
|
||||
|
||||
- '<code>\\X<i>xx</i></code>', where <code><i>xx</i></code> is a hexadecimal number, escapes a byte of data with the specified value. If you are using a mutibyte encoding, this can be used to enter
|
||||
- '<code>\\X<i>xx</i></code>', where <code><i>xx</i></code> is a hexadecimal number, represents a byte of data with the specified value. If you are using a multibyte encoding, this can be used to enter
|
||||
invalid strings. Only use this if you know what you are doing.
|
||||
|
||||
- '<code>\\<i>ooo</i></code>', where <code><i>ooo</i></code> is an octal number, escapes the ascii character with the specified value. For example, `\011` is the tab character.
|
||||
- '<code>\\<i>ooo</i></code>', where <code><i>ooo</i></code> is an octal number, represents the ascii character with the specified value. For example, `\011` is the tab character.
|
||||
|
||||
- '<code>\\u<i>xxxx</i></code>', where <code><i>xxxx</i></code> is a hexadecimal number, escapes the 16-bit Unicode character with the specified value. For example, `\u9` is the tab character.
|
||||
- '<code>\\u<i>xxxx</i></code>', where <code><i>xxxx</i></code> is a hexadecimal number, represents the 16-bit Unicode character with the specified value. For example, `\u9` is the tab character.
|
||||
|
||||
- '<code>\\U<i>xxxxxxxx</i></code>', where <code><i>xxxxxxxx</i></code> is a hexadecimal number, escapes the 32-bit Unicode character with the specified value. For example, `\U9` is the tab character.
|
||||
- '<code>\\U<i>xxxxxxxx</i></code>', where <code><i>xxxxxxxx</i></code> is a hexadecimal number, represents the 32-bit Unicode character with the specified value. For example, `\U9` is the tab character.
|
||||
|
||||
- '<code>\\c<i>x</i></code>', where <code><i>x</i></code> is a letter of the alphabet, escapes the control sequence generated by pressing the control key and the specified letter. For example, `\ci` is the tab character
|
||||
- '<code>\\c<i>x</i></code>', where <code><i>x</i></code> is a letter of the alphabet, represents the control sequence generated by pressing the control key and the specified letter. For example, `\ci` is the tab character
|
||||
|
||||
|
||||
\subsection redirects Input/Output (IO) redirection
|
||||
@@ -179,7 +179,7 @@ will call the `cat` program with the parameter 'foo.txt', which will print the c
|
||||
Pipes usually connect file descriptor 1 (standard output) of the first process to file descriptor 0 (standard input) of the second process. It is possible use a different output file descriptor by prepending the desired FD number and then output redirect symbol to the pipe. For example:
|
||||
|
||||
\fish
|
||||
make fish 2> | less
|
||||
make fish 2>| less
|
||||
\endfish
|
||||
|
||||
will attempt to build the fish program, and any errors will be shown using the less pager.
|
||||
@@ -236,7 +236,7 @@ There are a few important things that need to be noted about aliases:
|
||||
|
||||
- Always take care to add the `$argv` variable to the list of parameters to the wrapped command. This makes sure that if the user specifies any additional parameters to the function, they are passed on to the underlying command.
|
||||
|
||||
- If the alias has the same name as the aliased command, it is necessary to refix the call to the program with `command` in order to tell fish that the unction should not call itself, but rather a command with the same name. ailing to do so will cause infinite recursion bugs.
|
||||
- If the alias has the same name as the aliased command, it is necessary to prefix the call to the program with `command` in order to tell fish that the function should not call itself, but rather a command with the same name. Failing to do so will cause infinite recursion bugs.
|
||||
|
||||
To easily create a function of this form, you can use the <a href="commands.html#alias">alias</a> command.
|
||||
|
||||
@@ -247,10 +247,22 @@ Functions can be defined on the commandline or in a configuration file, but they
|
||||
|
||||
Fish automatically searches through any directories in the array variable `$fish_function_path`, and any functions defined are automatically loaded when needed. A function definition file must have a filename consisting of the name of the function plus the suffix '`.fish`'.
|
||||
|
||||
The default value for `$fish_function_path` is `~/.config/fish/functions` `/etc/fish/functions` `/usr/share/fish/functions`. The exact path to the last two of these may be slightly different depending on what install path prefix was chosen at configuration time. The rationale behind having three different directories is that the first one is for user specific functions, the second one is for system-wide additional functions and the last one is for default fish functions. The path list is searched in order, meaning that by default, the system administrator can override default fish functions, and the user can override functions defined by the system administrator.
|
||||
By default, Fish searches the following for functions, using the first available file that it finds:
|
||||
- A directory for end-users to keep their own functions, usually `~/.config/fish/functions` (controlled by the `XDG_CONFIG_HOME` environment variable).
|
||||
- A directory for systems administrators to install functions for all users on the system, usually `/etc/fish/functions`.
|
||||
- A directory for third-party software vendors to ship their own functions for their software, usually `/usr/share/fish/vendor_functions.d`.
|
||||
- The functions shipped with fish, usually installed in `/usr/share/fish/functions`.
|
||||
|
||||
These paths are controlled by parameters set at build, install, or run time, and may vary from the defaults listed above.
|
||||
|
||||
This wide search may be confusing. If you are unsure, your functions probably belong in `~/.config/fish/functions`.
|
||||
|
||||
It is very important that function definition files only contain the definition for the specified function and nothing else. Otherwise, it is possible that autoloading a function files requires that the function already be loaded, which creates a circular dependency.
|
||||
|
||||
Autoloading also won't work for <a href=#event>event handlers</a>, since fish cannot know that a function is supposed to be executed when an event occurs when it hasn't yet loaded the function. See the <a href=#event>event handlers</a> section for more information.
|
||||
|
||||
If you are developing another program, you may wish to install functions which are available for all users of the fish shell on a system. They can be installed to the "vendor" functions directory. As this path may vary from system to system, the `pkgconfig` framework should be used to discover this path with the output of `pkg-config --variable functionsdir fish`.
|
||||
|
||||
|
||||
\subsubsection syntax-conditional Conditional execution of code and flow control
|
||||
|
||||
@@ -271,13 +283,13 @@ This is a short explanation of some of the commonly used words in fish.
|
||||
|
||||
- <b>command</b> a program that the shell can run.
|
||||
|
||||
- <b>function</b> a block of commands that can be called as if they where a single command. By using functions, it is possible to string together multiple smaller commands into one more advanced command.
|
||||
- <b>function</b> a block of commands that can be called as if they were a single command. By using functions, it is possible to string together multiple smaller commands into one more advanced command.
|
||||
|
||||
- <b>job</b> a running pipeline or command
|
||||
|
||||
- <b>pipeline</b> a set of commands stringed together so that the output of one command is the input of the next command
|
||||
|
||||
- <b>redirection</b> a operation that changes one of the input/output streams associated with a job
|
||||
- <b>redirection</b> an operation that changes one of the input/output streams associated with a job
|
||||
|
||||
- <b>switch</b> a special flag sent as an argument to a command that will alter the behavior of the command. A switch almost always begins with one or two hyphens.
|
||||
|
||||
@@ -293,7 +305,7 @@ Help on a specific builtin can also be obtained with the `-h` parameter. For ins
|
||||
|
||||
\section autosuggestions Autosuggestions
|
||||
|
||||
fish suggests commands as you type, based on command history, completions, and valid file paths. As you type commands, you will see a completion offered after the cursor, in a muted gray color (which can be changed with the `fish_color_autosuggestion` variable).
|
||||
fish suggests commands as you type, based on command history, completions, and valid file paths. As you type commands, you will see a suggestion offered after the cursor, in a muted gray color (which can be changed with the `fish_color_autosuggestion` variable).
|
||||
|
||||
To accept the autosuggestion (replacing the command line contents), press right arrow or @key{Control,F}. To accept the first suggested word, press @key{Alt,→,Right} or @key{Alt,F}. If the autosuggestion is not what you want, just ignore it: it won't execute unless you accept it.
|
||||
|
||||
@@ -302,7 +314,7 @@ Autosuggestions are a powerful way to quickly summon frequently entered commands
|
||||
|
||||
\section completion Tab completion
|
||||
|
||||
Tab completion is one of the most time saving features of any modern shell. By tapping the tab key, the user asks `fish` to guess the rest of the command or parameter that the user is currently typing. If `fish` can only find one possible completion, `fish` will write it out. If there is more than one completion, `fish` will write out the longest prefix that all completions have in common. If the completions differ on the first character, a list of all possible completions is printed. The list features descriptions of the completions and if the list doesn't fit the screen, it is scrollable by using the arrow keys, the page up/page down keys, the tab key or the space bar. Pressing any other key will exit the list and insert the pressed key into the command line.
|
||||
Tab completion is one of the most time saving features of any modern shell. By tapping the tab key, the user asks `fish` to guess the rest of the command or parameter that the user is currently typing. If `fish` can only find one possible completion, `fish` will write it out. If there is more than one completion, `fish` will write out the longest prefix that all completions have in common. If the completions differ on the first character, a list of all possible completions is printed. The list features descriptions of the completions and if the list doesn't fit the screen, it is scrollable by using the arrow keys, the page up/page down keys, the tab key or the space bar. Once the list has been entered, pressing any other key will start a search. If the list has not been entered, pressing any other key will exit the list and insert the pressed key into the command line.
|
||||
|
||||
These are the general purpose tab completions that `fish` provides:
|
||||
|
||||
@@ -343,7 +355,7 @@ To provide a list of possible completions for myprog, use the `-a` switch. If `m
|
||||
complete -c myprog -s o -l output -a "yes no"
|
||||
\endfish
|
||||
|
||||
There are also special switches for specifying that a switch requires an argument, to disable filename completion, to create completions that are only available in some combinations, etc.. For a complete description of the various switches accepted by the `complete` command, see the documentationfor the <a href="commands.html#complete">complete</a> builtin, or write `complete --help` inside the `fish` shell.
|
||||
There are also special switches for specifying that a switch requires an argument, to disable filename completion, to create completions that are only available in some combinations, etc.. For a complete description of the various switches accepted by the `complete` command, see the documentation for the <a href="commands.html#complete">complete</a> builtin, or write `complete --help` inside the `fish` shell.
|
||||
|
||||
For examples of how to write your own complex completions, study the completions in `/usr/share/fish/completions`. (The exact path depends on your chosen installation prefix and may be slightly different)
|
||||
|
||||
@@ -362,7 +374,7 @@ Functions beginning with the string `__fish_print_` print a newline separated li
|
||||
|
||||
- `__fish_complete_pids` prints a list of all processes IDs with the command name as description.
|
||||
|
||||
- `__fish_complete_suffix SUFFIX` performs file completion allowing only files ending in SUFFIX. The mimetype database is used to find a suitable description.
|
||||
- `__fish_complete_suffix SUFFIX` performs file completion allowing only files ending in SUFFIX, with an optional description.
|
||||
|
||||
- `__fish_complete_users` prints a list of all users with their full name as description.
|
||||
|
||||
@@ -379,9 +391,20 @@ Functions beginning with the string `__fish_print_` print a newline separated li
|
||||
|
||||
Completions can be defined on the commandline or in a configuration file, but they can also be automatically loaded. Fish automatically searches through any directories in the array variable `$fish_complete_path`, and any completions defined are automatically loaded when needed. A completion file must have a filename consisting of the name of the command to complete and the suffix '`.fish`'.
|
||||
|
||||
The default value for `$fish_complete_path` is `~/.config/fish/completions` `/etc/fish/completions` `/usr/share/fish/vendor_completions.d` `/usr/share/fish/completions` `~/.local/share/generated_completions`. (Some paths may be slightly different depending on where fish is installed). If a suitable file is found in one of these directories, it will be automatically loaded and the search will be stopped. The large number of directories searched may be confusing. It is to allow, respectively, user-specific completions, system-wide completions, completions installed by other packages, default completions that ship with fish, and finally, completions generated from manual pages. If you are unsure, put your completions in `~/.config/fish/completions`.
|
||||
By default, Fish searches the following for completions, using the first available file that it finds:
|
||||
- A directory for end-users to keep their own completions, usually `~/.config/fish/completions` (controlled by the `XDG_CONFIG_HOME` environment variable);
|
||||
- A directory for systems administrators to install completions for all users on the system, usually `/etc/fish/completions`;
|
||||
- A directory for third-party software vendors to ship their own completions for their software, usually `/usr/share/fish/vendor_completions.d`;
|
||||
- The completions shipped with fish, usually installed in `/usr/share/fish/completions`; and
|
||||
- Completions automatically generated from the operating system's manual, usually stored in `~/.local/share/fish/generated_completions`.
|
||||
|
||||
If you have written new completions for a common Unix command, please consider sharing your work by submitting it via the instructions in <a href="#more-help">Further help and development</a>. If you are developing another program and would like to ship completions with your program, install them to `/usr/share/fish/vendor_completions.d` or similar directory. Systems using the `pkgconfig` framework can discover this path from the output of `pkg-config --variable completionsdir fish`.
|
||||
These paths are controlled by parameters set at build, install, or run time, and may vary from the defaults listed above.
|
||||
|
||||
This wide search may be confusing. If you are unsure, your completions probably belong in `~/.config/fish/completions`.
|
||||
|
||||
If you have written new completions for a common Unix command, please consider sharing your work by submitting it via the instructions in <a href="#more-help">Further help and development</a>.
|
||||
|
||||
If you are developing another program and would like to ship completions with your program, install them to the "vendor" completions directory. As this path may vary from system to system, the `pkgconfig` framework should be used to discover this path with the output of `pkg-config --variable completionsdir fish`.
|
||||
|
||||
|
||||
\section expand Parameter expansion (Globbing)
|
||||
@@ -397,7 +420,19 @@ If a star (`*`) or a question mark (`?`) is present in the parameter, `fish` att
|
||||
|
||||
- `*` can match any string of characters not containing '/'. This includes matching an empty string.
|
||||
|
||||
- `**` matches any string of characters. This includes matching an empty string. The string may include the `/` character but does not need to.
|
||||
- `**` matches any string of characters. This includes matching an empty string. The matched string may include the `/` character; that is, it recurses into subdirectories. Note that augmenting this wildcard with other strings will not match files in the current working directory (`$PWD`) if you separate the strings with a slash ("/"). This is unlike other shells such as zsh. For example, `**\/*.fish` in zsh will match `.fish` files in the PWD but in fish will only match such files in a subdirectory. In fish you should type `***.fish` to match files in the PWD as well as subdirectories.
|
||||
|
||||
Other shells, such as zsh, provide a rich glob syntax for restricting the files matched by globs. For example, `**(.)`, to only match regular files. Fish prefers to defer such features to programs, such as `find`, rather than reinventing the wheel. Thus, if you want to limit the wildcard expansion to just regular files the fish approach is to define and use a function. For example,
|
||||
|
||||
\fish{cli-dark}
|
||||
function ff --description 'Like ** but only returns plain files.'
|
||||
# This also ignores .git directories.
|
||||
find . \( -name .git -type d -prune \) -o -type f | \
|
||||
sed -n -e '/^\.\/\.git$/n' -e 's/^\.\///p'
|
||||
end
|
||||
\endfish
|
||||
|
||||
You would then use it in place of `**` like this, `my_prog (ff)`, to pass only regular files in or below $PWD to `my_prog`.
|
||||
|
||||
Wildcard matches are sorted case insensitively. When sorting matches containing numbers, consecutive digits are considered to be one element, so that the strings '1' '5' and '12' would be sorted in the order given.
|
||||
|
||||
@@ -411,8 +446,19 @@ Examples:
|
||||
|
||||
- `**` matches any files and directories in the current directory and all of its subdirectories.
|
||||
|
||||
Note that if no matches are found for a specific wildcard, it will expand into zero arguments, i.e. to nothing. If none of the wildcarded arguments sent to a command result in any matches, the command will not be executed. If this happens when using the shell interactively, a warning will also be printed.
|
||||
Note that for most commands, if any wildcard fails to expand, the command is not executed, <a href='#variables-status'>`$status`</a> is set to nonzero, and a warning is printed. This behavior is consistent with setting `shopt -s failglob` in bash. There are exactly 3 exceptions, namely <a href="commands.html#set">`set`</a>, <a href="commands.html#count">`count`</a> and <a href="commands.html#for">`for`</a>. Their globs are permitted to expand to zero arguments, as with `shopt -s nullglob` in bash.
|
||||
|
||||
Examples:
|
||||
\fish
|
||||
ls *.foo
|
||||
# Lists the .foo files, or warns if there aren't any.
|
||||
|
||||
set foos *.foo
|
||||
if count $foos >/dev/null
|
||||
ls $foos
|
||||
end
|
||||
# Lists the .foo files, if any.
|
||||
\endfish
|
||||
|
||||
\subsection expand-command-substitution Command substitution
|
||||
|
||||
@@ -458,7 +504,7 @@ A dollar sign followed by a string of characters is expanded into the value of t
|
||||
|
||||
Undefined and empty variables expand to nothing.
|
||||
|
||||
To separate a variable name from text it should immediately be followed by, encase the variable within braces.
|
||||
To separate a variable name from text it should immediately be followed by, encase the variable within quotes.
|
||||
|
||||
Examples:
|
||||
\fish
|
||||
@@ -468,15 +514,17 @@ echo $HOME
|
||||
echo $nonexistentvariable
|
||||
# Prints no output.
|
||||
|
||||
echo The plural of $WORD is {$WORD}s
|
||||
echo The plural of $WORD is "$WORD"s
|
||||
# Prints "The plural of cat is cats" when $WORD is set to cat.
|
||||
echo The plural of $WORD is {$WORD}s
|
||||
# ditto
|
||||
\endfish
|
||||
|
||||
Note that without the braces, fish will try to expand a variable called `$WORDs`, which may not exist.
|
||||
Note that without the quotes or braces, fish will try to expand a variable called `$WORDs`, which may not exist.
|
||||
|
||||
The latter syntax works by exploiting <a href="#expand-brace">brace expansion</a>; care should be taken with array variables and undefined variables, as these behave very differently to POSIX shells.
|
||||
The latter syntax `{$WORD}` works by exploiting <a href="#expand-brace">brace expansion</a>; care should be taken with array variables and undefined variables, as these expand as a <a href="#cartesian-product">cartesian product</a>, so undefined variables eliminate the string.
|
||||
|
||||
Variable expansion is the only type of expansion performed on double quoted strings. There is, however, an important difference in how variables are expanded when quoted and when unquoted. An unquoted variable expansion will result in a variable number of arguments. For example, if the variable `$foo` has zero elements or is undefined, the argument `$foo` will expand to zero elements. If the variable $foo is an array of five elements, the argument `$foo` will expand to five elements. When quoted, like `"$foo"`, a variable expansion will always result in exactly one argument. Undefined variables will expand to the empty string, and array variables will be concatenated using the space character. The dangers noted in the third example above can therefore be avoided by wrapping the variable in double quotes (`echo {"$WORD"}s`).
|
||||
Variable expansion is the only type of expansion performed on double quoted strings. There is, however, an important difference in how variables are expanded when quoted and when unquoted. An unquoted variable expansion will result in a variable number of arguments. For example, if the variable `$foo` has zero elements or is undefined, the argument `$foo` will expand to zero elements. If the variable $foo is an array of five elements, the argument `$foo` will expand to five elements. When quoted, like `"$foo"`, a variable expansion will always result in exactly one argument. Undefined variables will expand to the empty string, and array variables will be concatenated using the space character.
|
||||
|
||||
There is one further notable feature of fish variable expansion. Consider the following code snippet:
|
||||
|
||||
@@ -496,6 +544,34 @@ end
|
||||
The above code demonstrates how to use multiple '`$`' symbols to expand the value of a variable as a variable name. One can think of the `$` symbol as a variable dereference operator. When using this feature together with array brackets, the brackets will always match the innermost `$` dereference. Thus, `$$foo[5]` will always mean the fifth element of the `foo` variable should be dereferenced, not the fifth element of the doubly dereferenced variable `foo`. The latter can instead be expressed as `$$foo[1][5]`.
|
||||
|
||||
|
||||
\subsection cartesian-product Cartesian Products
|
||||
|
||||
Lists adjacent to other lists or strings are expanded as cartesian products:
|
||||
|
||||
Examples:
|
||||
\fish{cli-dark}
|
||||
>_ echo {good,bad}" apples"
|
||||
<outp>good apples bad apples</outp>
|
||||
|
||||
>_ set -l a x y z
|
||||
>_ set -l b 1 2 3
|
||||
|
||||
>_ echo $a$b
|
||||
<outp>x1 y1 z1 x2 y2 z2 x3 y3 z3</outp>
|
||||
|
||||
>_ echo $a"-"$b
|
||||
<outp>x-1 y-1 z-1 x-2 y-2 z-2 x-3 y-3 z-3</outp>
|
||||
|
||||
>_ echo {x,y,z}$b
|
||||
<outp>x1 y1 z1 x2 y2 z2 x3 y3 z3</outp>
|
||||
|
||||
>_ echo {$b}word
|
||||
<outp>1word 2word 3word</outp>
|
||||
\endfish
|
||||
|
||||
Be careful when you try to use braces to separate variable names from text. The dangers noted in the last example above can be avoided by wrapping the variable in double quotes instead of braces (`echo "$b"word`).
|
||||
|
||||
|
||||
\subsection expand-index-range Index range expansion
|
||||
|
||||
Both command substitution and shell variable expansion support accessing only specific items by providing a set of indices in square brackets. It's often needed to access a sequence of elements. To do this, use the range operator '`..`' for this. A range '`a..b`', where range limits 'a' and 'b' are integer numbers, is expanded into a sequence of indices '`a a+1 a+2 ... b`' or '`a a-1 a-2 ... b`' depending on which of 'a' or 'b' is higher. The negative range limits are calculated from the end of the array or command substitution.
|
||||
@@ -547,6 +623,8 @@ The `%` (percent) character at the beginning of a parameter followed by a string
|
||||
|
||||
- If the string is the entire word `self`, the shell's PID is the result.
|
||||
|
||||
- Otherwise, if the string is the entire word `last`, the last job's PID is the result.
|
||||
|
||||
- Otherwise, if the string is the ID of a job, the result is the process group ID of the job.
|
||||
|
||||
- Otherwise, if any child processes match the specified string, their PIDs are the result of the expansion.
|
||||
@@ -631,12 +709,14 @@ echo $pirate
|
||||
|
||||
\subsection variables-universal More on universal variables
|
||||
|
||||
Universal variables are variables that are shared between all the users fish sessions on the computer. Fish stores many of its configuration options as universal variables. This means that in order to change fish settings, all you have to do is change the variable value once, and it will be automatically updated for all sessions, and preserved across computer reboots and login/logout.
|
||||
Universal variables are variables that are shared between all the users' fish sessions on the computer. Fish stores many of its configuration options as universal variables. This means that in order to change fish settings, all you have to do is change the variable value once, and it will be automatically updated for all sessions, and preserved across computer reboots and login/logout.
|
||||
|
||||
To see universal variables in action, start two fish sessions side by side, and issue the following command in one of them `set fish_color_cwd blue`. Since `fish_color_cwd` is a universal variable, the color of the current working directory listing in the prompt will instantly change to blue on both terminals.
|
||||
|
||||
<a href="#variables-universal">Universal variables</a> are stored in the file `.config/fish/fishd.MACHINE_ID`, where MACHINE_ID is typically your MAC address. Do not edit this file directly, as your edits may be overwritten. Edit them through fish scripts or by using fish interactively instead.
|
||||
|
||||
Do not append to universal variables in <a href="index.html#initialization">config.fish</a>, because these variables will then get longer with each new shell instance. Instead, simply set them once at the command line.
|
||||
|
||||
|
||||
\subsection variables-functions Variable scope for functions
|
||||
|
||||
@@ -721,17 +801,18 @@ All arrays are one-dimensional and cannot contain other arrays, although it is p
|
||||
|
||||
\subsection variables-special Special variables
|
||||
|
||||
The user can change the settings of `fish` by changing the values of
|
||||
certain environment variables.
|
||||
|
||||
- `BROWSER`, the user's preferred web browser. If this variable is set, fish will use the specified browser instead of the system default browser to display the fish documentation.
|
||||
|
||||
- `CDPATH`, an array of directories in which to search for the new directory for the `cd` builtin. By default, the fish configuration defines `CDPATH` to be a universal variable with the values `.` and `~`.
|
||||
The user can change the settings of `fish` by changing the values of certain variables.
|
||||
|
||||
- A large number of variable starting with the prefixes `fish_color` and `fish_pager_color.` See <a href='#variables-color'>Variables for changing highlighting colors</a> for more information.
|
||||
|
||||
- `fish_greeting`, the greeting message printed on startup.
|
||||
|
||||
- `fish_escape_delay_ms` overrides the default timeout of 300ms (default key bindings) or 10ms (vi key bindings) after seeing an escape character before giving up on matching a key binding. See the documentation for the <a href='bind.html#special-case-escape'>bind</a> builtin command. This delay facilitates using escape as a meta key.
|
||||
|
||||
- `BROWSER`, the user's preferred web browser. If this variable is set, fish will use the specified browser instead of the system default browser to display the fish documentation.
|
||||
|
||||
- `CDPATH`, an array of directories in which to search for the new directory for the `cd` builtin. By default, the fish configuration defines `CDPATH` to be a universal variable with the values `.` and `~`.
|
||||
|
||||
- `LANG`, `LC_ALL`, `LC_COLLATE`, `LC_CTYPE`, `LC_MESSAGES`, `LC_MONETARY`, `LC_NUMERIC` and `LC_TIME` set the language option for the shell and subprograms. See the section <a href='#variables-locale'>Locale variables</a> for more information.
|
||||
|
||||
- `fish_user_paths`, an array of directories that are prepended to `PATH`. This can be a universal variable.
|
||||
@@ -817,6 +898,12 @@ The following variables are available to change the highlighting colors in fish:
|
||||
|
||||
- `fish_color_cwd`, the color used for the current working directory in the default prompt
|
||||
|
||||
- `fish_color_autosuggestion`, the color used for autosuggestions
|
||||
|
||||
- `fish_color_user`, the color used to print the current username in some of fish default prompts
|
||||
|
||||
- `fish_color_host`, the color used to print the current host system in some of fish default prompts
|
||||
|
||||
Additionally, the following variables are available to change the highlighting in the completion pager:
|
||||
|
||||
- `fish_pager_color_prefix`, the color of the prefix string, i.e. the string that is to be completed
|
||||
@@ -861,7 +948,7 @@ Similar to bash, fish has Emacs and Vi editing modes. The default editing mode i
|
||||
|
||||
\subsection emacs-mode Emacs mode commands
|
||||
|
||||
- @key{Tab} <a href="#completion">completes</a> the current token.
|
||||
- @key{Tab} <a href="#completion">completes</a> the current token. @key{Shift, Tab} completes the current token and starts the pager's search mode.
|
||||
|
||||
- @key{Home} or @key{Control,A} moves the cursor to the beginning of the line.
|
||||
|
||||
@@ -887,7 +974,7 @@ Similar to bash, fish has Emacs and Vi editing modes. The default editing mode i
|
||||
|
||||
- @key{Control,L} clears and repaints the screen.
|
||||
|
||||
- @key{Control,W} moves the previous word to the <a href="#killring">killring</a>.
|
||||
- @key{Control,W} moves the previous path component (everything up to the previous "/") to the <a href="#killring">killring</a>.
|
||||
|
||||
- @key{Alt,D} moves the next word to the <a href="#killring">killring</a>.
|
||||
|
||||
@@ -903,12 +990,17 @@ Similar to bash, fish has Emacs and Vi editing modes. The default editing mode i
|
||||
|
||||
- @key{Alt,H} (or @key{F1}) shows the manual page for the current command, if one exists.
|
||||
|
||||
- @key{Control, t} transposes the last two characters
|
||||
|
||||
- @key{Alt,t} transposes the last two words
|
||||
|
||||
|
||||
You can change these key bindings using the <a href="commands.html#bind">bind</a> builtin command.
|
||||
|
||||
|
||||
\subsection vi-mode Vi mode commands
|
||||
|
||||
Vi mode allows for the use of Vi-like commands at the prompt. Initially, <a href="#vi-mode-insert">insert mode</a> is active. @key{Escape} enters <a href="#vi-mode-command">command mode</a>. The commands available in command, insert and visual mode are described below.
|
||||
Vi mode allows for the use of Vi-like commands at the prompt. Initially, <a href="#vi-mode-insert">insert mode</a> is active. @key{Escape} enters <a href="#vi-mode-command">command mode</a>. The commands available in command, insert and visual mode are described below. Vi mode builds on top of <a href="#emacs-mode">Emacs mode</a>, so all keybindings mentioned there that do not contradict the ones mentioned here also work.
|
||||
|
||||
\subsubsection vi-mode-command Command mode
|
||||
|
||||
@@ -952,7 +1044,7 @@ Command mode is also known as normal mode.
|
||||
|
||||
- @key{Control,U} moves contents from the beginning of line to the cursor to the <a href="#killring">killring</a>.
|
||||
|
||||
- @key{Control,B} and @key{Control,F} move the cursor one word left or right. If the cursor is already at the end of the line, and an autosuggestion is available, @key{Control,F} accepts the first word in the suggestion.
|
||||
- @key{Control,x} moves the cursor to the end of the line. If an autosuggestion is available, it will be accepted completely.
|
||||
|
||||
\subsubsection vi-mode-visual Visual mode
|
||||
|
||||
@@ -1007,7 +1099,7 @@ The fish commandline editor works exactly the same in single line mode and in mu
|
||||
|
||||
Normally when `fish` starts a program, this program will be put in the foreground, meaning it will take control of the terminal and `fish` will be stopped until the program finishes. Sometimes this is not desirable. For example, you may wish to start an application with a graphical user interface from the terminal, and then be able to continue using the shell. In such cases, there are several ways in which the user can change fish's behavior.
|
||||
|
||||
-# By ending a command with the `&` (ampersand) symbol, the user tells `fish` to put the specified command into the background. A background process will be run simultaneous with `fish`. `fish` will retain control of the terminal, so the program will not be able to read from the keyboard.
|
||||
-# By ending a command with the `&` (ampersand) symbol, the user tells `fish` to put the specified command into the background. A background process will be run simultaneous with `fish`. `fish` will retain control of the terminal, so the program will not be able to read from the keyboard.
|
||||
|
||||
-# By pressing @key{Control,Z}, the user stops a currently running foreground program and returns control to `fish`. Some programs do not support this feature, or remap it to another key. GNU Emacs uses @key{Control,X} @key{z} to stop running.
|
||||
|
||||
@@ -1018,9 +1110,27 @@ Note that functions cannot be started in the background. Functions that are stop
|
||||
|
||||
\section initialization Initialization files
|
||||
|
||||
On startup, `fish` evaluates the files `/usr/share/fish/config.fish` (Or `/usr/local/fish...` if you installed fish in `/usr/local`), `/etc/fish/config.fish` (Or `~/etc/fish/...` if you installed fish in your home directory) and `~/.config/fish/config.fish` (Or any other directory specified by the `$XDG_CONFIG_HOME` variable), in that order.
|
||||
On startup, Fish evaluates a number of configuration files, which can be used to control the behavior of the shell.
|
||||
|
||||
The first file should not be directly edited, the second one is meant for systemwide configuration and the last one is meant for user configuration. If you want to run a command only on starting an interactive shell, use the exit status of the command `status --is-interactive` to determine if the shell is interactive. If you want to run a command only when using a login shell, use `status --is-login` instead.
|
||||
Configuration files are evaluated in the following order:
|
||||
- Configuration shipped with fish, which should not be edited, usually `/usr/share/fish/config.fish`.
|
||||
- System-wide configuration files, where administrators can include initialization that should be run for all users on the system - similar to `/etc/profile` for POSIX-style shells - usually `/etc/fish/config.fish`;
|
||||
- Configuration snippets in files ending in `.fish`, in the directories:
|
||||
- `~/.config/fish/conf.d/`
|
||||
- `/etc/fish/conf.d`
|
||||
- `/usr/share/fish/vendor_conf.d`
|
||||
|
||||
If there are multiple files with the same name in these directories, only the first will be executed.
|
||||
|
||||
- User initialization, usually in `~/.config/fish/config.fish` (controlled by the `XDG_CONFIG_HOME` environment variable).
|
||||
|
||||
These paths are controlled by parameters set at build, install, or run time, and may vary from the defaults listed above.
|
||||
|
||||
This wide search may be confusing. If you are unsure, use `~/.config/fish/config.fish`.
|
||||
|
||||
These files are all executed on the startup of every shell. If you want to run a command only on starting an interactive shell, use the exit status of the command `status --is-interactive` to determine if the shell is interactive. If you want to run a command only when using a login shell, use `status --is-login` instead. This will speed up the starting of non-interactive or non-login shells.
|
||||
|
||||
If you are developing another program, you may wish to install configuration which is run for all users of the fish shell on a system. This is discouraged; if not carefully written, they may have side-effects or slow the startup of the shell. Additionally, users of other shells will not benefit from the Fish-specific configuration. However, if they are absolutely required, you may install them to the "vendor" configuration directory. As this path may vary from system to system, the `pkgconfig` framework should be used to discover this path with the output of `pkg-config --variable confdir fish`.
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -1058,13 +1168,7 @@ Detected errors include:
|
||||
|
||||
When the cursor is over a parenthesis or a quote, `fish` also highlights its matching quote or parenthesis.
|
||||
|
||||
To customize the syntax highlighting, you can set the environment variables `fish_color_normal`, `fish_color_command`, `fish_color_substitution`, `fish_color_redirection`, `fish_color_end`, `fish_color_error`, `fish_color_param`, `fish_color_comment`, `fish_color_match`, `fish_color_search_match`, `fish_color_cwd`, `fish_pager_color_prefix`, `fish_pager_color_completion`, `fish_pager_color_description`, `fish_pager_color_progress` and `fish_pager_color_secondary`. Usually, the value of these variables will be one of `black`, `red`, `green`, `brown`, `yellow`, `blue`, `magenta`, `purple`, `cyan`, `white` or `normal`, but they can be an array containing any color options for the `set_color` command.
|
||||
|
||||
\fish
|
||||
set fish_color_error black --background=red --bold
|
||||
# Make all commandline errors be written in a black,
|
||||
# bold font, with a red background.
|
||||
\endfish
|
||||
To customize the syntax highlighting, you can set the environment variables listed in the <a href='index.html#variables-color'>Variables for changing highlighting colors</a> section.
|
||||
|
||||
\subsection title Programmable title
|
||||
|
||||
@@ -1113,6 +1217,8 @@ function --on-signal WINCH my_signal_handler
|
||||
end
|
||||
\endfish
|
||||
|
||||
Please note that event handlers only become active when a function is loaded, which means you might need to otherwise <a href='commands.html#source'>source</a> or execute a function instead of relying on <a href=#syntax-function-autoloading>autoloading</a>. One approach is to put it into your <a href="index.html#initialization">initialization file</a>.
|
||||
|
||||
For more information on how to define new event handlers, see the documentation for the <a href='commands.html#function'>function</a> command.
|
||||
|
||||
|
||||
@@ -1132,7 +1238,7 @@ If you install fish in your home directory, fish will not work correctly for any
|
||||
|
||||
If you have a question not answered by this documentation, there are several avenues for help:
|
||||
|
||||
-# The official mailing list at <a href='https://lists.sf.net/lists/listinfo/fish-users'>fish-users@lists.sf.net</a>
|
||||
-# The official mailing list at <a href='https://lists.sourceforge.net/lists/listinfo/fish-users'>fish-users@lists.sourceforge.net</a>
|
||||
|
||||
-# The Internet Relay Chat channel, \#fish on `irc.oftc.net`
|
||||
|
||||
|
||||
@@ -115,6 +115,25 @@ The precise terms and conditions for copying, distribution and modification foll
|
||||
----
|
||||
|
||||
|
||||
## License for PCRE2
|
||||
|
||||
`fish` contains code from the [PCRE2](http://www.pcre.org) library to support regular expressions. This code, created by Philip Hazel, is distributed under the terms of the BSD license. Copyright © 1997-2015 University of Cambridge.
|
||||
|
||||
The BSD license follows.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
-# Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
-# Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
-# Neither the name of the University of Cambridge nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
----
|
||||
|
||||
|
||||
## License for wcslcat and wcslcpy, and code derived from tmux
|
||||
|
||||
`fish` also contains small amounts of code under the OpenBSD license, namely versions of the two functions strlcat and strlcpy, modified for use with wide character strings. This code is copyrighted by Todd C. Miller (1998). It also contains code from [tmux](http://tmux.sourceforge.net), copyrighted by Nicholas Marriott <nicm@users.sourceforge.net> (2007), and made available under an identical license.
|
||||
@@ -129,9 +148,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
|
||||
----
|
||||
|
||||
|
||||
## License for xdgmime and glibc
|
||||
|
||||
The xdgmime library, written and copyrighted by Red Hat, Inc, is used by the mimedb command, which is a part of fish. It is released under the LGPL, version 2 or later, or under the Academic Free License, version 2. Version 2 of the LGPL license agreement is included below.
|
||||
## License for glibc
|
||||
|
||||
Fish contains code from the glibc library, namely the wcstok function. This code is licensed under the LGPL, version 2 or later. Version 2 of the LPGL license agreement is included below.
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
\section mimedb mimedb - lookup file information via the mime database
|
||||
|
||||
\subsection mimedb-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
mimedb [OPTIONS] FILES...
|
||||
\endfish
|
||||
|
||||
\subsection mimedb-description Description
|
||||
|
||||
`mimedb` queries the MIME type database and the `.desktop` files installed on the system in order to find information on the files listed in `FILES`. The information that `mimedb` can retrieve includes the MIME type for a file, a description of the type, and the default action that can be performed on the file. `mimedb` can also be used to launch the default action for this file.
|
||||
|
||||
The following options are available:
|
||||
|
||||
- `-t`, `--input-file-data` determines the files' type both by their filename and by their contents (default behaviour).
|
||||
|
||||
- `-f`, `--input-filename` determines the files' type by their filename.
|
||||
|
||||
- `-i`, `--input-mime` specifies that the arguments are not files, but MIME types.
|
||||
|
||||
- `-m`, `--output-mime` outputs the MIME type of each file (default behaviour).
|
||||
|
||||
- `-f`, `--output-description` outputs the description of each MIME type.
|
||||
|
||||
- `-a`, `--output-action` outputs the default action of each MIME type.
|
||||
|
||||
- `-l`, `--launch` launches the default action for the specified files.
|
||||
|
||||
- `-v`, `--version` displays the version number and exits.
|
||||
@@ -11,6 +11,7 @@ nextd [ -l | --list ] [POS]
|
||||
|
||||
If the `-l` or `--list` flag is specified, the current directory history is also displayed.
|
||||
|
||||
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables which this command manipulates.
|
||||
|
||||
\subsection nextd-example Example
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ open FILES...
|
||||
|
||||
\subsection open-description Description
|
||||
|
||||
`open` opens a file in its default application, using the `xdg-open` command if it exists, or else the <a href="commands.html#mimedb">mimedb</a> command.
|
||||
`open` opens a file in its default application, using the appropriate tool for the operating system. On GNU/Linux, this requires the common but optional `xdg-open` utility, from the `xdg-utils` package.
|
||||
|
||||
|
||||
\subsection open-example Example
|
||||
|
||||
@@ -7,12 +7,12 @@ COMMAND1; or COMMAND2
|
||||
|
||||
\subsection or-description Description
|
||||
|
||||
`or` is used to execute a command if the current exit status (as set by the last previous command) is not 0.
|
||||
`or` is used to execute a command if the current exit status (as set by the previous command) is not 0.
|
||||
|
||||
`or` does not change the current exit status.
|
||||
|
||||
The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
`or` statements may be used as part of the condition in an <a href="#if">`and`</a> or <a href="#while">`while`</a> block. See the documentation
|
||||
for <a href="#if">`if`</a> and <a href="#while">`while`</a> for examples.
|
||||
|
||||
`or` does not change the current exit status. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
|
||||
|
||||
\subsection or-example Example
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ prevd [ -l | --list ] [POS]
|
||||
|
||||
If the `-l` or `--list` flag is specified, the current history is also displayed.
|
||||
|
||||
Note that the `cd` command limits directory history to the 25 most recently visited directories. The history is stored in the `$dirprev` and `$dirnext` variables which this command manipulates.
|
||||
|
||||
\subsection prevd-example Example
|
||||
|
||||
|
||||
70
doc_src/printf.txt
Normal file
70
doc_src/printf.txt
Normal file
@@ -0,0 +1,70 @@
|
||||
\section printf printf - display text according to a format string
|
||||
|
||||
\subsection printf-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
printf format [argument...]
|
||||
\endfish
|
||||
|
||||
\subsection printf-description Description
|
||||
printf formats the string FORMAT with ARGUMENT, and displays the result.
|
||||
|
||||
The string FORMAT should contain format specifiers, each of which are replaced with successive arguments according to the specifier. Specifiers are detailed below, and are taken from the C library function `printf(3)`.
|
||||
|
||||
Unlike `echo`, `printf` does not append a new line unless it is specified as part of the string.
|
||||
|
||||
Valid format specifiers are:
|
||||
|
||||
- `%%d`: Argument will be used as decimal integer (signed or unsigned)
|
||||
|
||||
- `%%i`: Argument will be used as a signed integer
|
||||
|
||||
- `%%o`: An octal unsigned integer
|
||||
|
||||
- `%%u`: An unsigned decimal integer
|
||||
|
||||
- `%%x` or `%%X`: An unsigned hexadecimal integer
|
||||
|
||||
- `%%f`, `%%g` or `%%G`: A floating-point number
|
||||
|
||||
- `%%e` or `%%E`: A floating-point number in scientific (XXXeYY) notation
|
||||
|
||||
- `%%s`: A string
|
||||
|
||||
- `%%b`: As a string, interpreting backslash escapes, except that octal escapes are of the form \0 or \0ooo.
|
||||
|
||||
`%%` signifies a literal "%".
|
||||
|
||||
Note that conversion may fail, e.g. "102.234" will not losslessly convert to an integer, causing printf to print an error.
|
||||
|
||||
printf also knows a number of backslash escapes:
|
||||
- `\"` double quote
|
||||
- `\\` backslash
|
||||
- `\a` alert (bell)
|
||||
- `\b` backspace
|
||||
- `\c` produce no further output
|
||||
- `\e` escape
|
||||
- `\f` form feed
|
||||
- `\n` new line
|
||||
- `\r` carriage return
|
||||
- `\t` horizontal tab
|
||||
- `\v` vertical tab
|
||||
- `\ooo` octal number (ooo is 1 to 3 digits)
|
||||
- `\xhh` hexadecimal number (hhh is 1 to 2 digits)
|
||||
- `\uhhhh` 16-bit Unicode character (hhhh is 4 digits)
|
||||
- `\Uhhhhhhhh` 32-bit Unicode character (hhhhhhhh is 8 digits)
|
||||
|
||||
The `format' argument is re-used as many times as necessary to convert all of the given arguments. If a format specifier is not appropriate for the given argument, an error is printed. For example, `printf '%d' "102.234"` produces an error, as "102.234" cannot be formatted as an integer.
|
||||
|
||||
This file has been imported from the printf in GNU Coreutils version 6.9. If you would like to use a newer version of printf, for example the one shipped with your OS, try `command printf`.
|
||||
|
||||
\subsection printf-example Example
|
||||
|
||||
\fish
|
||||
printf '%s\\t%s\\n' flounder fish
|
||||
\endfish
|
||||
Will print "flounder fish" (separated with a tab character), followed by a newline character. This is useful for writing completions, as fish expects completion scripts to output the option followed by the description, separated with a tab character.
|
||||
|
||||
\fish
|
||||
printf '%s:%d' "Number of bananas in my pocket" 42
|
||||
\endfish
|
||||
Will print "Number of bananas in my pocket: 42", _without_ a newline.
|
||||
31
doc_src/prompt_pwd.txt
Normal file
31
doc_src/prompt_pwd.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
\section prompt_pwd prompt_pwd - Print pwd suitable for prompt
|
||||
|
||||
\subsection prompt_pwd-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
prompt_pwd
|
||||
\endfish
|
||||
|
||||
\subsection prompt_pwd-description Description
|
||||
|
||||
prompt_pwd is a function to print the current working directory in a way suitable for prompts. It will replace the home directory with "~" and shorten every path component but the last to a default of one character.
|
||||
|
||||
To change the number of characters per path component, set $fish_prompt_pwd_dir_length to the number of characters. Setting it to 0 or an invalid value will disable shortening entirely.
|
||||
|
||||
\subsection prompt_pwd-example Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ cd ~/
|
||||
>_ echo $PWD
|
||||
<outp>/home/alfa</outp>
|
||||
|
||||
>_ prompt_pwd
|
||||
<outp>~</outp>
|
||||
|
||||
>_ cd /tmp/banana/sausage/with/mustard
|
||||
>_ prompt_pwd
|
||||
<outp>/t/b/s/w/mustard</outp>
|
||||
|
||||
>_ set -g fish_prompt_pwd_dir_length 3
|
||||
>_ prompt_pwd
|
||||
<outp>/tmp/ban/sau/wit/mustard</outp>
|
||||
\endfish
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
\subsection psub-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
COMMAND1 ( COMMAND2 | psub [-f] )
|
||||
COMMAND1 ( COMMAND2 | psub [-f] [-s SUFFIX])
|
||||
\endfish
|
||||
|
||||
\subsection psub-description Description
|
||||
@@ -11,10 +11,15 @@ Posix shells feature a syntax that is a mix between command substitution and pip
|
||||
|
||||
If the `-f` or `--file` switch is given to `psub`, `psub` will use a regular file instead of a named pipe to communicate with the calling process. This will cause `psub` to be significantly slower when large amounts of data are involved, but has the advantage that the reading process can seek in the stream.
|
||||
|
||||
If the `-s` or `---suffix` switch is given, `psub` will append SUFFIX to the filename.
|
||||
|
||||
|
||||
\subsection psub-example Example
|
||||
|
||||
\fish
|
||||
diff (sort a.txt | psub) (sort b.txt | psub)
|
||||
# shows the difference between the sorted versions of files `a.txt` and `b.txt`.
|
||||
\endfish
|
||||
|
||||
source-highlight -f esc (cpp main.c | psub -s .c)
|
||||
# highlights `main.c` after preprocessing as a C source.
|
||||
\endfish
|
||||
|
||||
@@ -9,6 +9,13 @@ pushd [DIRECTORY]
|
||||
|
||||
The `pushd` function adds `DIRECTORY` to the top of the directory stack and makes it the current working directory. <a href="#popd">`popd`</a> will pop it off and return to the original directory.
|
||||
|
||||
Without arguments, it exchanges the top two directories in the stack.
|
||||
|
||||
`pushd +NUMBER` rotates the stack counter-clockwise i.e. from bottom to top
|
||||
|
||||
`pushd -NUMBER` rotates clockwise i.e. top to bottom.
|
||||
|
||||
See also `dirs` and `dirs -c`.
|
||||
|
||||
\subsection pushd-example Example
|
||||
|
||||
@@ -21,7 +28,15 @@ pushd /usr/src/fish-shell
|
||||
# Working directory is now /usr/src/fish-shell
|
||||
# Directory stack contains /usr/src /usr/src/fish-shell
|
||||
|
||||
popd
|
||||
pushd /tmp/
|
||||
# Working directory is now /tmp
|
||||
# Directory stack contains /tmp /usr/src /usr/src/fish-shell
|
||||
|
||||
pushd +1
|
||||
# Working directory is now /usr/src
|
||||
# Directory stack contains /usr/src
|
||||
# Directory stack contains /usr/src /usr/src/fish-shell /tmp
|
||||
|
||||
popd
|
||||
# Working directory is now /usr/src/fish-shell
|
||||
# Directory stack contains /usr/src/fish-shell /tmp
|
||||
\endfish
|
||||
|
||||
@@ -7,9 +7,17 @@ random [SEED]
|
||||
|
||||
\subsection random-description Description
|
||||
|
||||
`random` outputs a random number from 0 to 32766, inclusive.
|
||||
`random` outputs a psuedo-random number from 0 to 32767, inclusive.
|
||||
Even ignoring the very narrow range of values you should not assume
|
||||
this produces truly random values within that range. Do not use the
|
||||
value for any cryptographic purposes, and take care to handle collisions:
|
||||
the same random number appearing more than once in a given fish instance.
|
||||
|
||||
If a `SEED` value is provided, it is used to seed the random number generator, and no output will be produced. This can be useful for debugging purposes, where it can be desirable to get the same random number sequence multiple times. If the random number generator is called without first seeding it, the current time will be used as the seed.
|
||||
If a `SEED` value is provided, it is used to seed the random number
|
||||
generator, and no output will be produced. This can be useful for debugging
|
||||
purposes, where it can be desirable to get the same random number sequence
|
||||
multiple times. If the random number generator is called without first
|
||||
seeding it, the current time will be used as the seed.
|
||||
|
||||
|
||||
\subsection random-example Example
|
||||
|
||||
@@ -7,9 +7,9 @@ set_color [OPTIONS] [COLOR]
|
||||
|
||||
\subsection set_color-description Description
|
||||
|
||||
`set_color` changes the foreground and/or background color of the terminal. `COLOR` is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal.
|
||||
`set_color` changes the foreground and/or background color of the terminal. `COLOR` is one of `black`, `red`, `green`, `brown`, `yellow`, `blue`, `magenta`, `purple`, `cyan`, `brred`, `brgreen`, `brbrown`, `bryellow`, `brblue`, `brmagenta`, `brpurple`, `brcyan`, `white`. The `br`, bright, forms are most useful as background colors. The special color `normal` resets the background and foreground to whatever is normal for your terminal.
|
||||
|
||||
If your terminal supports term256 (modern xterms and OS X Lion), you can specify an RGB value with three or six hex digits, such as A0FF33 or f2f. `fish` will choose the closest supported color.
|
||||
You can also specify an RGB value with three or six hex digits, such as A0FF33 or f2f. `fish` will choose the closest supported color. A three digit value is equivalent to specifying each digit twice; e.g., `#2BC` is the same as `#22BBCC`. Hex RGB values can be in lower or uppercase, optionally prefixed with the pound-sign character. Depending on the capabilities of your terminal the actual color may be approximated by the closest known matching color in the [ANSI X3.64](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) color palette.
|
||||
|
||||
The following options are available:
|
||||
|
||||
@@ -21,15 +21,15 @@ The following options are available:
|
||||
|
||||
- `-u`, `--underline` sets underlined mode.
|
||||
|
||||
Calling `set_color normal` will set the terminal background and foreground colors to the defaults for the terminal.
|
||||
|
||||
Calling `set_color normal` will set the terminal color to the default color of the terminal.
|
||||
|
||||
Some terminals use the `--bold` escape sequence to switch to a brighter color set. On such terminals, `set_color white` will result in a grey font color, while `set_color --bold white` will result in a white font color.
|
||||
Some terminals use the `--bold` escape sequence to switch to a brighter color set rather than bolding the characters. This only applies to the foreground color. You should probably use the `br` color name variants listed above for both the foreground and background "bright" colors rather than use this option. The only use for this option is on a black&white terminal (e.g., a DEC VT220) to select foreground black text that is bolder than the normal text.
|
||||
|
||||
Not all terminal emulators support all these features.
|
||||
|
||||
`set_color` uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it.
|
||||
Note 1: Setting either color to "normal" will reset both background and foreground colors to whatever is the default for the terminal.
|
||||
|
||||
Note 2: Setting the background color only affects subsequently written characters. Fish provides no way to set the background color for the entire terminal window. Configuring the window background color (and other attributes such as its opacity) has to be done using whatever mechanisms the terminal provides.
|
||||
|
||||
\subsection set_color-example Examples
|
||||
|
||||
@@ -37,5 +37,13 @@ Not all terminal emulators support all these features.
|
||||
set_color red; echo "Roses are red"
|
||||
set_color blue; echo "Violets are blue"
|
||||
set_color 62A; echo "Eggplants are dark purple"
|
||||
set_color normal; echo "Normal is nice too"
|
||||
set_color normal; echo "Normal is nice" # This will reset background, too
|
||||
\endfish
|
||||
|
||||
\subsection set_color-detection Terminal Capability Detection
|
||||
|
||||
Fish uses a heuristic to decide if your terminal supports the 256 color palette (as opposed to the more limited 16 color palette of older terminals). If you've done the equivalent of `set fish_term256 1` that will be true. If the $TERM value contains "256color" (e.g., "xterm-256color") that will be true. If your $TERM value is "xterm" and $TERM_PROGRAM is not set to "Apple_Terminal" that will be true. If your terminal supports the full 256 color palette (which is pretty much every color terminal emulator written in the past decade) you should ensure one of the aforementioned conditions is true.
|
||||
|
||||
Many terminals support 24-bit (i.e., true-color) color escape sequences. This includes modern xterms, Gnome Terminal, KDE Konsole, and iTerm2. Fish currently does some limited attempts to detect whether a given `$TERM` supports 24-bit colors. You can explicitly enable that support via `set fish_term24bit 1`. If you do so fish will not map your RGB color values to the closest known matching color in the ANSI X3.64 color palette.
|
||||
|
||||
The `set_color` command uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Fish will use the [ANSI X3.64](https://en.wikipedia.org/wiki/ANSI_escape_code) escape sequences if the terminfo definition says less than 256 colors are supported; otherwise it will use the terminfo definition.
|
||||
|
||||
@@ -7,7 +7,7 @@ source FILENAME [ARGUMENTS...]
|
||||
|
||||
\subsection source-description Description
|
||||
|
||||
`source` evaluates the commands of the specified file in the current shell. This is different from starting a new process to perform the commands (i.e. `fish < FILENAME`) since the commands will be evaluated by the current shell, which means that changes in shell variables will affect the current shell. If additional arguments are specified after the file name, they will be inserted into the $argv variable.
|
||||
`source` evaluates the commands of the specified file in the current shell. This is different from starting a new process to perform the commands (i.e. `fish < FILENAME`) since the commands will be evaluated by the current shell, which means that changes in shell variables will affect the current shell. If additional arguments are specified after the file name, they will be inserted into the `$argv` variable. The `$argv` variable will not include the name of the sourced file.
|
||||
|
||||
If no file is specified, or if the file name '`-`' is used, stdin will be read.
|
||||
|
||||
@@ -22,3 +22,7 @@ The return status of `source` is the return status of the last job to execute. I
|
||||
source ~/.config/fish/config.fish
|
||||
# Causes fish to re-read its initialization file.
|
||||
\endfish
|
||||
|
||||
\subsection Caveats
|
||||
|
||||
In fish versions prior to 2.3.0 the `$argv` variable would have a single element (the name of the sourced file) if no arguments are present. Otherwise it would contain arguments without the name of the sourced file. That behavior was very confusing and unlike other shells such as bash and zsh.
|
||||
|
||||
187
doc_src/string.txt
Normal file
187
doc_src/string.txt
Normal file
@@ -0,0 +1,187 @@
|
||||
\section string string - manipulate strings
|
||||
|
||||
\subsection string-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
string length [(-q | --quiet)] [STRING...]
|
||||
string sub [(-s | --start) START] [(-l | --length) LENGTH] [(-q | --quiet)]
|
||||
[STRING...]
|
||||
string split [(-m | --max) MAX] [(-r | --right)] [(-q | --quiet)] SEP
|
||||
[STRING...]
|
||||
string join [(-q | --quiet)] SEP [STRING...]
|
||||
string trim [(-l | --left)] [(-r | --right)] [(-c | --chars CHARS)]
|
||||
[(-q | --quiet)] [STRING...]
|
||||
string escape [(-n | --no-quoted)] [STRING...]
|
||||
string match [(-a | --all)] [(-i | --ignore-case)] [(-r | --regex)]
|
||||
[(-n | --index)] [(-q | --quiet)] [(-v | --invert)] PATTERN [STRING...]
|
||||
string replace [(-a | --all)] [(-i | --ignore-case)] [(-r | --regex)]
|
||||
[(-q | --quiet)] PATTERN REPLACEMENT [STRING...]
|
||||
\endfish
|
||||
|
||||
|
||||
\subsection string-description Description
|
||||
|
||||
`string` performs operations on strings.
|
||||
|
||||
STRING arguments are taken from the command line unless standard input is connected to a pipe or a file, in which case they are read from standard input, one STRING per line. It is an error to supply STRING arguments on the command line and on standard input.
|
||||
|
||||
Arguments beginning with `-` are normally interpreted as switches; `--` causes the following arguments not to be treated as switches even if they begin with `-`. Switches and required arguments are recognized only on the command line.
|
||||
|
||||
Most subcommands accept a `-q` or `--quiet` switch, which suppresses the usual output but exits with the documented status.
|
||||
|
||||
In addition to the exit codes documented below, all the string subcommands exit with a value of 2 to indicate that an error occurred.
|
||||
|
||||
The following subcommands are available:
|
||||
|
||||
- `length` reports the length of each string argument in characters. Exit status: 0 if at least one non-empty STRING was given, or 1 otherwise.
|
||||
|
||||
- `sub` prints a substring of each string argument. The start of the substring can be specified with `-s` or `--start` followed by a 1-based index value. Positive index values are relative to the start of the string and negative index values are relative to the end of the string. The default start value is 1. The length of the substring can be specified with `-l` or `--length`. If the length is not specified, the substring continues to the end of each STRING. Exit status: 0 if at least one substring operation was performed, 1 otherwise.
|
||||
|
||||
- `split` splits each STRING on the separator SEP, which can be an empty string. If `-m` or `--max` is specified, at most MAX splits are done on each STRING. If `-r` or `--right` is given, splitting is performed right-to-left. This is useful in combination with `-m` or `--max`. Exit status: 0 if at least one split was performed, or 1 otherwise.
|
||||
|
||||
- `join` joins its STRING arguments into a single string separated by SEP, which can be an empty string. Exit status: 0 if at least one join was performed, or 1 otherwise.
|
||||
|
||||
- `trim` removes leading and trailing whitespace from each STRING. If `-l` or `--left` is given, only leading whitespace is removed. If `-r` or `--right` is given, only trailing whitespace is trimmed. The `-c` or `--chars` switch causes the characters in CHARS to be removed instead of whitespace. Exit status: 0 if at least one character was trimmed, or 1 otherwise.
|
||||
|
||||
- `escape` escapes each STRING such that it can be passed back to `eval` to produce the original argument again. By default, all special characters are escaped, and quotes are used to simplify the output when possible. If `-n` or `--no-quote` is given, the simplifying quoted format is not used. Exit status: 0 if at least one string was escaped, or 1 otherwise.
|
||||
|
||||
- `match` tests each STRING against PATTERN and prints matching substrings. Only the first match for each STRING is reported unless `-a` or `--all` is given, in which case all matches are reported. Matching can be made case-insensitive with `-i` or `--ignore-case`. If `-n` or `--index` is given, each match is reported as a 1-based start position and a length. By default, PATTERN is interpreted as a glob pattern matched against each entire STRING argument. If `-r` or `--regex` is given, PATTERN is interpreted as a Perl-compatible regular expression. For a regular expression containing capturing groups, multiple items will be reported for each match, one for the entire match and one for each capturing group. If --invert or -v is used the selected lines will be only those which do not match the given glob pattern or regular expression. Exit status: 0 if at least one match was found, or 1 otherwise.
|
||||
|
||||
- `replace` is similar to `match` but replaces non-overlapping matching substrings with a replacement string and prints the result. By default, PATTERN is treated as a literal substring to be matched. If `-r` or `--regex` is given, PATTERN is interpreted as a Perl-compatible regular expression, and REPLACEMENT can contain C-style escape sequences like `\t` as well as references to capturing groups by number or name as `$n` or `${n}`. Exit status: 0 if at least one replacement was performed, or 1 otherwise.
|
||||
|
||||
|
||||
\subsection string-example Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string length 'hello, world'
|
||||
<outp>12</outp>
|
||||
|
||||
>_ set str foo
|
||||
>_ string length -q $str; echo $status
|
||||
0
|
||||
# Equivalent to test -n $str
|
||||
\endfish
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string sub --length 2 abcde
|
||||
<outp>ab</outp>
|
||||
|
||||
>_ string sub -s 2 -l 2 abcde
|
||||
<outp>bc</outp>
|
||||
|
||||
>_ string sub --start=-2 abcde
|
||||
<outp>de</outp>
|
||||
\endfish
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string split . example.com
|
||||
<outp>example</outp>
|
||||
<outp>com</outp>
|
||||
|
||||
>_ string split -r -m1 / /usr/local/bin/fish
|
||||
<outp>/usr/local/bin</outp>
|
||||
<outp>fish</outp>
|
||||
|
||||
>_ string split '' abc
|
||||
<outp>a</outp>
|
||||
<outp>b</outp>
|
||||
<outp>c</outp>
|
||||
\endfish
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ seq 3 | string join ...
|
||||
<outp>1...2...3</outp>
|
||||
\endfish
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string trim ' abc '
|
||||
<outp>abc</outp>
|
||||
|
||||
>_ string trim --right --chars=yz xyzzy zany
|
||||
<outp>x</outp>
|
||||
<outp>zan</outp>
|
||||
\endfish
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ echo \\x07 | string escape
|
||||
<bs>cg</bs>
|
||||
\endfish
|
||||
|
||||
\subsection string-example-match-glob Match Glob Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string match '?' a
|
||||
<outp>a</outp>
|
||||
|
||||
>_ string match 'a*b' axxb
|
||||
<outp>axxb</outp>
|
||||
|
||||
>_ string match -i 'a??B' Axxb
|
||||
<outp>Axxb</outp>
|
||||
|
||||
>_ echo 'ok?' | string match '*\\?'
|
||||
>_ <outp>ok?</outp>
|
||||
|
||||
>_ string match -r -v "c.*[12]" {cat,dog}(seq 1 4)
|
||||
<outp>dog1</outp>
|
||||
<outp>dog2</outp>
|
||||
<outp>cat3</outp>
|
||||
<outp>dog3</outp>
|
||||
<outp>cat4</outp>
|
||||
<outp>dog4</outp>
|
||||
\endfish
|
||||
|
||||
\subsection string-example-match-regex Match Regex Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string match -r 'cat|dog|fish' 'nice dog'
|
||||
<outp>dog</outp>
|
||||
|
||||
>_ string match -r '(\\d\\d?):(\\d\\d):(\\d\\d)' <asis>2:34:56</asis>
|
||||
<outp>2:34:56</outp>
|
||||
<outp>2</outp>
|
||||
<outp>34</outp>
|
||||
<outp>56</outp>
|
||||
|
||||
>_ string match -r '^(\\w{{2,4}})\\g1$' papa mud murmur
|
||||
<outp>papa</outp>
|
||||
<outp>pa</outp>
|
||||
<outp>murmur</outp>
|
||||
<outp>mur</outp>
|
||||
|
||||
>_ string match -r -a -n at ratatat
|
||||
<outp>2 2</outp>
|
||||
<outp>4 2</outp>
|
||||
<outp>6 2</outp>
|
||||
|
||||
>_ string match -r -i '0x[0-9a-f]{{1,8}}' 'int magic = 0xBadC0de;'
|
||||
<outp>0xBadC0de</outp>
|
||||
\endfish
|
||||
|
||||
\subsection string-example-replace-literal Replace Literal Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string replace is was 'blue is my favorite'
|
||||
<outp>blue was my favorite</outp>
|
||||
|
||||
>_ string replace 3rd last 1st 2nd 3rd
|
||||
<outp>1st</outp>
|
||||
<outp>2nd</outp>
|
||||
<outp>last</outp>
|
||||
|
||||
>_ string replace -a ' ' _ 'spaces to underscores'
|
||||
<outp>spaces_to_underscores</outp>
|
||||
\endfish
|
||||
|
||||
\subsection string-example-replace-Regex Replace Regex Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string replace -r -a '[^\\d.]+' ' ' '0 one two 3.14 four 5x'
|
||||
<outp>0 3.14 5</outp>
|
||||
|
||||
>_ string replace -r '(\\w+)\\s+(\\w+)' '$2 $1 $$' 'left right'
|
||||
<outp>right left $</outp>
|
||||
|
||||
>_ string replace -r '\\s*newline\\s*' '\\n' 'put a newline here'
|
||||
<outp>put a</outp>
|
||||
<outp>here</outp>
|
||||
\endfish
|
||||
17
doc_src/suspend.txt
Normal file
17
doc_src/suspend.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
\section suspend suspend - suspend the current shell
|
||||
|
||||
\subsection suspend-synopsis Synopsis
|
||||
\fish{synopsis}
|
||||
suspend [--force]
|
||||
\endfish
|
||||
|
||||
\subsection suspend-description Description
|
||||
|
||||
`suspend` suspends execution of the current shell by sending it a
|
||||
SIGTSTP signal, returning to the controlling process. It can be
|
||||
resumed later by sending it a SIGCONT. In order to prevent suspending
|
||||
a shell that doesn't have a controlling process, it will not suspend a
|
||||
the shell if it is a login shell or if `$SHLVL` is less
|
||||
`$suspend_minimum_SHLVL`, which defaults to three. This test is
|
||||
skipped if the `--force` option is given or the shell is not
|
||||
interactive.
|
||||
@@ -12,7 +12,9 @@ Tests the expression given and sets the exit status to 0 if true, and 1 if false
|
||||
|
||||
The first form (`test`) is preferred. For compatibility with other shells, the second form is available: a matching pair of square brackets (`[ [EXPRESSION ] ]`).
|
||||
|
||||
The following operators are available to examine files and directories:
|
||||
This test is mostly POSIX-compatible.
|
||||
|
||||
\subsection test-files Operators for files and directories
|
||||
|
||||
- `-b FILE` returns true if `FILE` is a block device.
|
||||
|
||||
@@ -48,7 +50,7 @@ The following operators are available to examine files and directories:
|
||||
|
||||
- `-x FILE` returns true if `FILE` is marked as executable.
|
||||
|
||||
The following operators are available to compare and examine text strings:
|
||||
\subsection test-strings Operators for text strings
|
||||
|
||||
- `STRING1 = STRING2` returns true if the strings `STRING1` and `STRING2` are identical.
|
||||
|
||||
@@ -58,7 +60,7 @@ The following operators are available to compare and examine text strings:
|
||||
|
||||
- `-z STRING` returns true if the length of `STRING` is zero.
|
||||
|
||||
The following operators are available to compare and examine numbers:
|
||||
\subsection test-numbers Operators to compare and examine numbers
|
||||
|
||||
- `NUM1 -eq NUM2` returns true if `NUM1` and `NUM2` are numerically equal.
|
||||
|
||||
@@ -74,7 +76,7 @@ The following operators are available to compare and examine numbers:
|
||||
|
||||
Note that only integers are supported. For more complex mathematical operations, including fractions, the `env` program may be useful. Consult the documentation for your operating system.
|
||||
|
||||
Expressions can be combined using the following operators:
|
||||
\subsection test-combinators Operators to combine expressions
|
||||
|
||||
- `COND1 -a COND2` returns true if both `COND1` and `COND2` are true.
|
||||
|
||||
@@ -117,6 +119,21 @@ if test \( -f /foo -o -f /bar \) -a \( -f /baz -o -f /bat \)
|
||||
end.
|
||||
\endfish
|
||||
|
||||
Numerical comparisons will simply fail if one of the operands is not a number:
|
||||
|
||||
\fish
|
||||
if test 42 -eq "The answer to life, the universe and everything"
|
||||
echo So long and thanks for all the fish # will not be executed
|
||||
end
|
||||
\endfish
|
||||
|
||||
A common comparison is with $status:
|
||||
|
||||
\fish
|
||||
if test $status -eq 0
|
||||
echo "Previous command succeeded"
|
||||
end
|
||||
\endfish
|
||||
|
||||
\subsection test-standards Standards
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
- <a href="#tut_path">$PATH</a>
|
||||
- <a href="#tut_startup">Startup</a>
|
||||
- <a href="#tut_autoload">Autoloading Functions</a>
|
||||
- <a href="#tut_universal">Universal Variables</a>
|
||||
- <a href="#tut_more">Ready for more?</a>
|
||||
|
||||
\htmlonly[block]
|
||||
@@ -251,7 +252,7 @@ Unlike other shells, variables are not further split after substitution:
|
||||
<outp>Mister Noodle</outp>
|
||||
\endfish
|
||||
|
||||
In bash, this would have created two directories "Mister" and "Noodle". In `fish`, it created only one: the variable had the value "Mister Noodle", so that is the argument that was passed to `mkdir`, spaces and all.
|
||||
In bash, this would have created two directories "Mister" and "Noodle". In `fish`, it created only one: the variable had the value "Mister Noodle", so that is the argument that was passed to `mkdir`, spaces and all. Other shells use the term "arrays", rather than lists.
|
||||
|
||||
|
||||
\section tut_exit_status Exit Status
|
||||
@@ -348,6 +349,20 @@ You can iterate over a list (or a slice) with a for loop:
|
||||
<outp>entry: /usr/local/bin</outp>
|
||||
\endfish
|
||||
|
||||
Lists adjacent to other lists or strings are expanded as <a href="index.html#cartesian-product">cartesian products</a> unless quoted (see <a href="index.html#expand-variable">Variable expansion</a>):
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ set -l a 1 2 3
|
||||
>_ set -l 1 a b c
|
||||
>_ echo $a$1
|
||||
<outp>1a 2a 3a 1b 2b 3b 1c 2c 3c</outp>
|
||||
>_ echo $a" banana"
|
||||
<outp>1 banana 2 banana 3 banana</outp>
|
||||
>_ echo "$a banana"
|
||||
<outp>1 2 3 banana</outp>
|
||||
\endfish
|
||||
|
||||
This is similar to <a href="index.html#expand-brace">Brace expansion</a>.
|
||||
|
||||
\section tut_command_substitutions Command Substitutions
|
||||
|
||||
@@ -437,7 +452,7 @@ You can list the names of all functions with the `functions` keyword (note the p
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ functions
|
||||
<outp>alias, cd, delete-or-exit, dirh, dirs, down-or-search, eval, export, fish_command_not_found_setup, fish_config, fish_default_key_bindings, fish_prompt, fish_right_prompt, fish_sigtrap_handler, fish_update_completions, funced, funcsave, grep, help, history, isatty, ls, man, math, nextd, nextd-or-forward-word, open, popd, prevd, prevd-or-backward-word, prompt_pwd, psub, pushd, seq, setenv, sgrep, trap, type, umask, up-or-search, vared</outp>
|
||||
<outp>alias, cd, delete-or-exit, dirh, dirs, down-or-search, eval, export, fish_command_not_found_setup, fish_config, fish_default_key_bindings, fish_prompt, fish_right_prompt, fish_sigtrap_handler, fish_update_completions, funced, funcsave, grep, help, history, isatty, ls, man, math, nextd, nextd-or-forward-word, open, popd, prevd, prevd-or-backward-word, prompt_pwd, psub, pushd, seq, setenv, trap, type, umask, up-or-search, vared</outp>
|
||||
\endfish
|
||||
|
||||
You can see the source for any function by passing its name to `functions`:
|
||||
@@ -514,13 +529,13 @@ You can choose among some sample prompts by running `fish_config prompt`. `fish`
|
||||
|
||||
`$PATH` is an environment variable containing the directories in which `fish` searches for commands. Unlike other shells, $PATH is a [list](#tut_lists), not a colon-delimited string.
|
||||
|
||||
To prepend to `$PATH`, you can write:
|
||||
To prepend /usr/local/bin and /usr/sbin to `$PATH`, you can write:
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ set PATH /new/path $PATH
|
||||
>_ set PATH /usr/local/bin /usr/sbin $PATH
|
||||
\endfish
|
||||
|
||||
You can do so directly in `fish.config`, like you might do in other shells with `.profile`. See [this example](#path_example).
|
||||
You can do so directly in `config.fish`, like you might do in other shells with `.profile`. See [this example](#path_example).
|
||||
|
||||
A faster way is to modify the `$fish_user_paths` [universal variable](#tut_universal), which is automatically prepended to `$PATH`. For example, to permanently add `/usr/local/bin` to your `$PATH`, you could write:
|
||||
|
||||
@@ -528,7 +543,7 @@ A faster way is to modify the `$fish_user_paths` [universal variable](#tut_unive
|
||||
>_ set -U fish_user_paths /usr/local/bin $fish_user_paths
|
||||
\endfish
|
||||
|
||||
The advantage is that you don't have to go mucking around in files: just run this once at the command line, and it will affect the current session and all future instances too. (Note: you should NOT add this line to `fish.config`. If you do, the variable will get longer each time you run fish!)
|
||||
The advantage is that you don't have to go mucking around in files: just run this once at the command line, and it will affect the current session and all future instances too. (Note: you should NOT add this line to `config.fish`. If you do, the variable will get longer each time you run fish!)
|
||||
|
||||
\section tut_startup Startup (Where's .bashrc?)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ The following options are available:
|
||||
|
||||
\subsection type-example Example
|
||||
|
||||
\fish
|
||||
type fg
|
||||
# Outputs the string 'fg is a shell builtin'.
|
||||
\fish{cli-dark}
|
||||
>_ type fg
|
||||
<outp>fg is a builtin</outp>
|
||||
\endfish
|
||||
|
||||
@@ -174,8 +174,8 @@ tt, code, pre, .fish {
|
||||
.comment, .suggest { color: #555; }
|
||||
.command, .function, .binary { color: #223aa4; }
|
||||
.argument, .path, .file { color: #5961cf; }
|
||||
.string { color: #6c6d08; }
|
||||
.operator, .variable, .match, .history { color: #1c8885; }
|
||||
.string, .string .operator { color: #858904; }
|
||||
|
||||
/* Synopsis variant */
|
||||
.synopsis {
|
||||
|
||||
@@ -11,12 +11,11 @@ while CONDITION; COMMANDS...; end
|
||||
|
||||
If the exit status of `CONDITION` is non-zero on the first iteration, `COMMANDS` will not be executed at all.
|
||||
|
||||
Use <a href="#begin">`begin; ...; end`</a> for complex conditions; more complex control can be achieved with `while true` containing a <a href="#break">break</a>.
|
||||
|
||||
You can use <a href="#and">`and`</a> or <a href="#and">`or`</a> for complex conditions. Even more complex control can be achieved with `while true` containing a <a href="#break">break</a>.
|
||||
|
||||
\subsection while-example Example
|
||||
|
||||
\fish
|
||||
while test -f foo.txt; echo file exists; sleep 10; end
|
||||
# outputs 'file exists' at 10 second intervals as long as the file foo.txt exists.
|
||||
\endfish
|
||||
while test -f foo.txt; or test -f bar.txt ; echo file exists; sleep 10; end
|
||||
# outputs 'file exists' at 10 second intervals as long as the file foo.txt or bar.txt exists.
|
||||
\endfish
|
||||
|
||||
@@ -1,39 +1,14 @@
|
||||
#
|
||||
# Init file for fish
|
||||
#
|
||||
|
||||
#
|
||||
# Some things should only be done for login terminals
|
||||
#
|
||||
|
||||
if status --is-login
|
||||
|
||||
#
|
||||
# Set some value for LANG if nothing was set before, and this is a
|
||||
# login shell.
|
||||
#
|
||||
|
||||
if not set -q LANG >/dev/null
|
||||
set -gx LANG en_US.UTF-8
|
||||
end
|
||||
|
||||
# Check for i18n information in
|
||||
# /etc/sysconfig/i18n
|
||||
|
||||
if test -f /etc/sysconfig/i18n
|
||||
eval (cat /etc/sysconfig/i18n |sed -ne 's/^\([a-zA-Z]*\)=\(.*\)$/set -gx \1 \2;/p')
|
||||
end
|
||||
|
||||
#
|
||||
# Put linux consoles in unicode mode.
|
||||
#
|
||||
|
||||
if test "$TERM" = linux
|
||||
if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null
|
||||
if which unicode_start >/dev/null
|
||||
unicode_start
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
# Put system-wide fish configuration entries here
|
||||
# or in .fish files in conf.d/
|
||||
# Files in conf.d can be overridden by the user
|
||||
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d
|
||||
|
||||
# This file is run by all fish instances.
|
||||
# To include configuration only for login shells, use
|
||||
# if status --is-login
|
||||
# ...
|
||||
# end
|
||||
# To include configuration only for interactive shells, use
|
||||
# if status --is-interactiv
|
||||
# ...
|
||||
# end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
prefix=@prefix@
|
||||
datadir=@datadir@
|
||||
completionsdir=${datadir}/fish/vendor_completions.d
|
||||
completionsdir=@extra_completionsdir@
|
||||
functionsdir=@extra_functionsdir@
|
||||
confdir=@extra_confdir@
|
||||
|
||||
Name: fish
|
||||
Description: fish, the friendly interactive shell
|
||||
|
||||
83
fish.spec.in
Normal file
83
fish.spec.in
Normal file
@@ -0,0 +1,83 @@
|
||||
Summary: Friendly interactive shell
|
||||
Name: fish
|
||||
|
||||
Version: @RPMVERSION@
|
||||
Release: 0.%{?dist}
|
||||
|
||||
License: GPL-2.0
|
||||
Group: System/Shells
|
||||
URL: http://fishshell.com/
|
||||
|
||||
Source0: %{name}_@VERSION@.orig.tar.gz
|
||||
BuildRequires: ncurses-devel gettext gcc-c++ autoconf
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Requires: bc
|
||||
Requires: python
|
||||
Requires: which
|
||||
Requires: man
|
||||
|
||||
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora} || 0%{?is_opensuse}
|
||||
Requires: hostname
|
||||
%else
|
||||
Requires: net-tools
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
||||
fish is a shell geared towards interactive use. Its features are
|
||||
focused on user friendliness and discoverability. The language syntax
|
||||
is simple but incompatible with other shell languages.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-@VERSION@
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR="$RPM_BUILD_ROOT"
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
# Add fish to the list of allowed shells in /etc/shells
|
||||
if ! grep %{_bindir}/fish %{_sysconfdir}/shells >/dev/null; then
|
||||
echo %{_bindir}/fish >>%{_sysconfdir}/shells
|
||||
fi
|
||||
|
||||
%postun
|
||||
# Remove fish from the list of allowed shells in /etc/shells
|
||||
if [ "$1" = 0 ]; then
|
||||
grep -v %{_bindir}/fish %{_sysconfdir}/shells >%{_sysconfdir}/fish.tmp
|
||||
mv %{_sysconfdir}/fish.tmp %{_sysconfdir}/shells
|
||||
fi
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
# The documentation directory
|
||||
%docdir %{_datadir}/doc/fish/
|
||||
%{_datadir}/doc/fish/
|
||||
|
||||
# man files
|
||||
%{_mandir}/man1/*
|
||||
%docdir %{_datadir}/fish/man/man1/
|
||||
%{_datadir}/fish/man/man1/
|
||||
|
||||
# The program binaries
|
||||
%attr(0755,root,root) %{_bindir}/*
|
||||
|
||||
# Configuration files
|
||||
%dir %{_sysconfdir}/fish/
|
||||
%config(noreplace) %{_sysconfdir}/fish/config.fish
|
||||
|
||||
# Support files
|
||||
%{_datadir}/fish/
|
||||
|
||||
# pkgconfig
|
||||
%{_datadir}/pkgconfig/fish.pc
|
||||
@@ -7,13 +7,23 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
D008D0C41BC58F8800841177 /* generate-version-header */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = D008D0C81BC58F8800841177 /* Build configuration list for PBXAggregateTarget "generate-version-header" */;
|
||||
buildPhases = (
|
||||
D008D0C91BC58F9500841177 /* ShellScript */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "generate-version-header";
|
||||
productName = "generate-version-header";
|
||||
};
|
||||
D07D265615E33B86009E43F6 /* install_tree */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = D07D266F15E33B86009E43F6 /* Build configuration list for PBXAggregateTarget "install_tree" */;
|
||||
buildPhases = (
|
||||
D07D266915E33B86009E43F6 /* CopyFiles */,
|
||||
D07D266B15E33B86009E43F6 /* Copy Files */,
|
||||
D01A25E11AF58D8C002F9E92 /* ShellScript */,
|
||||
D01A2CA716965ADD00767098 /* CopyFiles */,
|
||||
);
|
||||
dependencies = (
|
||||
@@ -44,7 +54,6 @@
|
||||
D0F019FC15A977B40034B3B1 /* CopyFiles */,
|
||||
D033780F15DC6D2A00A634BA /* CopyFiles */,
|
||||
D01A2C9B16964C8200767098 /* Copy Files */,
|
||||
D01A25E01AF58CD0002F9E92 /* ShellScript */,
|
||||
);
|
||||
dependencies = (
|
||||
D0F01A1315AA36280034B3B1 /* PBXTargetDependency */,
|
||||
@@ -57,6 +66,7 @@
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
63A2C0E91CC60F3B00973404 /* pcre2_find_bracket.c in Sources */ = {isa = PBXBuildFile; fileRef = 63A2C0E81CC5F9FB00973404 /* pcre2_find_bracket.c */; };
|
||||
D00769121990137800CA4627 /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
|
||||
D00769131990137800CA4627 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
|
||||
D00769141990137800CA4627 /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
|
||||
@@ -100,8 +110,8 @@
|
||||
D007693B1990137800CA4627 /* parse_productions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FE8EE7179FB75F008C9F21 /* parse_productions.cpp */; };
|
||||
D007693D1990137800CA4627 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D02A8C15983CFA008E62BD /* libncurses.dylib */; };
|
||||
D0076943199013B900CA4627 /* fish_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854113B3ACEE0099B651 /* fish_tests.cpp */; };
|
||||
D00F63F119137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; };
|
||||
D00F63F219137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; };
|
||||
D00F63F119137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; settings = {COMPILER_FLAGS = "-I$(DERIVED_FILE_DIR)"; }; };
|
||||
D00F63F219137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; settings = {COMPILER_FLAGS = "-I$(DERIVED_FILE_DIR)"; }; };
|
||||
D01A2D24169B736200767098 /* man1 in Copy Files */ = {isa = PBXBuildFile; fileRef = D01A2D23169B730A00767098 /* man1 */; };
|
||||
D01A2D25169B737700767098 /* man1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = D01A2D23169B730A00767098 /* man1 */; };
|
||||
D030FBEF1A4A382000F7ADA0 /* input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854A13B3ACEE0099B651 /* input.cpp */; };
|
||||
@@ -146,6 +156,35 @@
|
||||
D033781115DC6D4C00A634BA /* completions in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02715D1FEA100B9DB63 /* completions */; };
|
||||
D033781215DC6D5200A634BA /* functions in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02815D1FEA100B9DB63 /* functions */; };
|
||||
D033781315DC6D5400A634BA /* tools in CopyFiles */ = {isa = PBXBuildFile; fileRef = D025C02915D1FEA100B9DB63 /* tools */; };
|
||||
D04F7F7C1BA4BF4000B0F227 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
|
||||
D04F7F7D1BA4BF4000B0F227 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
|
||||
D04F7FD51BA4E3AC00B0F227 /* pcre2_compile.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F8D1BA4DCD900B0F227 /* pcre2_compile.c */; };
|
||||
D04F7FD61BA4E3AC00B0F227 /* pcre2_config.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F901BA4DCE900B0F227 /* pcre2_config.c */; };
|
||||
D04F7FD71BA4E3AC00B0F227 /* pcre2_context.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F931BA4DCFA00B0F227 /* pcre2_context.c */; };
|
||||
D04F7FD81BA4E3AC00B0F227 /* pcre2_dfa_match.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F961BA4DD1100B0F227 /* pcre2_dfa_match.c */; };
|
||||
D04F7FD91BA4E3AC00B0F227 /* pcre2_error.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F991BA4DD2000B0F227 /* pcre2_error.c */; };
|
||||
D04F7FDA1BA4E3AC00B0F227 /* pcre2_jit_compile.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FC91BA4DE3500B0F227 /* pcre2_jit_compile.c */; };
|
||||
D04F7FDB1BA4E3AC00B0F227 /* pcre2_maketables.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F9C1BA4DD4A00B0F227 /* pcre2_maketables.c */; };
|
||||
D04F7FDC1BA4E3AC00B0F227 /* pcre2_match.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F9F1BA4DD5900B0F227 /* pcre2_match.c */; };
|
||||
D04F7FDD1BA4E3AC00B0F227 /* pcre2_match_data.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FA21BA4DD6900B0F227 /* pcre2_match_data.c */; };
|
||||
D04F7FDE1BA4E3AC00B0F227 /* pcre2_newline.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FA51BA4DD7300B0F227 /* pcre2_newline.c */; };
|
||||
D04F7FDF1BA4E3AC00B0F227 /* pcre2_ord2utf.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FA81BA4DD8400B0F227 /* pcre2_ord2utf.c */; };
|
||||
D04F7FE01BA4E3AC00B0F227 /* pcre2_pattern_info.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FAB1BA4DDA500B0F227 /* pcre2_pattern_info.c */; };
|
||||
D04F7FE11BA4E3AC00B0F227 /* pcre2_serialize.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FAE1BA4DDB500B0F227 /* pcre2_serialize.c */; };
|
||||
D04F7FE21BA4E3AC00B0F227 /* pcre2_string_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FB11BA4DDBF00B0F227 /* pcre2_string_utils.c */; };
|
||||
D04F7FE31BA4E3AC00B0F227 /* pcre2_study.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FB41BA4DDC900B0F227 /* pcre2_study.c */; };
|
||||
D04F7FE41BA4E3AC00B0F227 /* pcre2_substitute.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FB71BA4DDEB00B0F227 /* pcre2_substitute.c */; };
|
||||
D04F7FE51BA4E3AC00B0F227 /* pcre2_substring.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FB81BA4DDEB00B0F227 /* pcre2_substring.c */; };
|
||||
D04F7FE61BA4E3AC00B0F227 /* pcre2_tables.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FB91BA4DDEB00B0F227 /* pcre2_tables.c */; };
|
||||
D04F7FE71BA4E3AC00B0F227 /* pcre2_ucd.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FBA1BA4DDEB00B0F227 /* pcre2_ucd.c */; };
|
||||
D04F7FE81BA4E3AC00B0F227 /* pcre2_valid_utf.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FBB1BA4DDEB00B0F227 /* pcre2_valid_utf.c */; };
|
||||
D04F7FE91BA4E3AC00B0F227 /* pcre2_xclass.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FBC1BA4DDEB00B0F227 /* pcre2_xclass.c */; };
|
||||
D04F7FF01BA4E5B900B0F227 /* builtin_string.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */; };
|
||||
D04F7FF11BA4E68200B0F227 /* libpcre2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04F7FD01BA4E29300B0F227 /* libpcre2.a */; };
|
||||
D04F7FF21BA4E68A00B0F227 /* libpcre2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04F7FD01BA4E29300B0F227 /* libpcre2.a */; };
|
||||
D04F7FF41BA4E6F300B0F227 /* pcre2_auto_possess.c in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FF31BA4E6F300B0F227 /* pcre2_auto_possess.c */; };
|
||||
D04F7FF91BA4E87B00B0F227 /* pcre2_chartables.c.dist in Sources */ = {isa = PBXBuildFile; fileRef = D04F7FF71BA4E82C00B0F227 /* pcre2_chartables.c.dist */; };
|
||||
D04F7FFA1BA4E9A400B0F227 /* libpcre2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D04F7FD01BA4E29300B0F227 /* libpcre2.a */; };
|
||||
D052D80B1868F7FC003ABCBD /* parse_execution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D052D8091868F7FC003ABCBD /* parse_execution.cpp */; };
|
||||
D07B247315BCC15700D4ADB4 /* add-shell in Resources */ = {isa = PBXBuildFile; fileRef = D07B247215BCC15700D4ADB4 /* add-shell */; };
|
||||
D07B247615BCC4BE00D4ADB4 /* install.sh in Resources */ = {isa = PBXBuildFile; fileRef = D07B247515BCC4BE00D4ADB4 /* install.sh */; };
|
||||
@@ -215,7 +254,41 @@
|
||||
D0FE8EE8179FB760008C9F21 /* parse_productions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FE8EE7179FB75F008C9F21 /* parse_productions.cpp */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
D04F7FF81BA4E84B00B0F227 /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = com.apple.compilers.gcc;
|
||||
filePatterns = "*.dist";
|
||||
fileType = pattern.proxy;
|
||||
isEditable = 1;
|
||||
outputFiles = (
|
||||
);
|
||||
script = "# <com.apple.compilers.gcc>\n";
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
D008D0CA1BC58FDD00841177 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D008D0C41BC58F8800841177;
|
||||
remoteInfo = "generate-version-header";
|
||||
};
|
||||
D008D0CC1BC58FE100841177 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D008D0C41BC58F8800841177;
|
||||
remoteInfo = "generate-version-header";
|
||||
};
|
||||
D008D0CE1BC58FE500841177 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D008D0C41BC58F8800841177;
|
||||
remoteInfo = "generate-version-header";
|
||||
};
|
||||
D031890715E36CC000D9CC39 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
@@ -223,6 +296,20 @@
|
||||
remoteGlobalIDString = D0F019EC15A976F30034B3B1;
|
||||
remoteInfo = base;
|
||||
};
|
||||
D04F7FEA1BA4E3DB00B0F227 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D04F7FCF1BA4E29300B0F227;
|
||||
remoteInfo = libpcre2.a;
|
||||
};
|
||||
D04F7FEC1BA4E3DF00B0F227 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D04F7FCF1BA4E29300B0F227;
|
||||
remoteInfo = libpcre2.a;
|
||||
};
|
||||
D07D265815E33B86009E43F6 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D0A084F213B3AC130099B651 /* Project object */;
|
||||
@@ -361,6 +448,8 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4E142D731B56B5D7008783C8 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../osx/config.h; sourceTree = "<group>"; };
|
||||
63A2C0E81CC5F9FB00973404 /* pcre2_find_bracket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_find_bracket.c; sourceTree = "<group>"; };
|
||||
D00769421990137800CA4627 /* fish_tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_tests; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D00F63F019137E9D00FCCDEC /* fish_version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_version.cpp; sourceTree = "<group>"; };
|
||||
D01A2D23169B730A00767098 /* man1 */ = {isa = PBXFileReference; lastKnownFileType = text; name = man1; path = pages_for_manpath/man1; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -371,6 +460,31 @@
|
||||
D03238891849D1980032CF2C /* pager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pager.cpp; sourceTree = "<group>"; };
|
||||
D032388A1849D1980032CF2C /* pager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pager.h; sourceTree = "<group>"; };
|
||||
D03EE83814DF88B200FC7150 /* lru.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = lru.h; sourceTree = "<group>"; };
|
||||
D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_string.cpp; sourceTree = "<group>"; };
|
||||
D04F7F8D1BA4DCD900B0F227 /* pcre2_compile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_compile.c; sourceTree = "<group>"; };
|
||||
D04F7F901BA4DCE900B0F227 /* pcre2_config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_config.c; sourceTree = "<group>"; };
|
||||
D04F7F931BA4DCFA00B0F227 /* pcre2_context.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_context.c; sourceTree = "<group>"; };
|
||||
D04F7F961BA4DD1100B0F227 /* pcre2_dfa_match.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_dfa_match.c; sourceTree = "<group>"; };
|
||||
D04F7F991BA4DD2000B0F227 /* pcre2_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_error.c; sourceTree = "<group>"; };
|
||||
D04F7F9C1BA4DD4A00B0F227 /* pcre2_maketables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_maketables.c; sourceTree = "<group>"; };
|
||||
D04F7F9F1BA4DD5900B0F227 /* pcre2_match.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_match.c; sourceTree = "<group>"; };
|
||||
D04F7FA21BA4DD6900B0F227 /* pcre2_match_data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_match_data.c; sourceTree = "<group>"; };
|
||||
D04F7FA51BA4DD7300B0F227 /* pcre2_newline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_newline.c; sourceTree = "<group>"; };
|
||||
D04F7FA81BA4DD8400B0F227 /* pcre2_ord2utf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_ord2utf.c; sourceTree = "<group>"; };
|
||||
D04F7FAB1BA4DDA500B0F227 /* pcre2_pattern_info.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_pattern_info.c; sourceTree = "<group>"; };
|
||||
D04F7FAE1BA4DDB500B0F227 /* pcre2_serialize.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_serialize.c; sourceTree = "<group>"; };
|
||||
D04F7FB11BA4DDBF00B0F227 /* pcre2_string_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_string_utils.c; sourceTree = "<group>"; };
|
||||
D04F7FB41BA4DDC900B0F227 /* pcre2_study.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_study.c; sourceTree = "<group>"; };
|
||||
D04F7FB71BA4DDEB00B0F227 /* pcre2_substitute.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_substitute.c; sourceTree = "<group>"; };
|
||||
D04F7FB81BA4DDEB00B0F227 /* pcre2_substring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_substring.c; sourceTree = "<group>"; };
|
||||
D04F7FB91BA4DDEB00B0F227 /* pcre2_tables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_tables.c; sourceTree = "<group>"; };
|
||||
D04F7FBA1BA4DDEB00B0F227 /* pcre2_ucd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_ucd.c; sourceTree = "<group>"; };
|
||||
D04F7FBB1BA4DDEB00B0F227 /* pcre2_valid_utf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_valid_utf.c; sourceTree = "<group>"; };
|
||||
D04F7FBC1BA4DDEB00B0F227 /* pcre2_xclass.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_xclass.c; sourceTree = "<group>"; };
|
||||
D04F7FC91BA4DE3500B0F227 /* pcre2_jit_compile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_jit_compile.c; sourceTree = "<group>"; };
|
||||
D04F7FD01BA4E29300B0F227 /* libpcre2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libpcre2.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D04F7FF31BA4E6F300B0F227 /* pcre2_auto_possess.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pcre2_auto_possess.c; sourceTree = "<group>"; };
|
||||
D04F7FF71BA4E82C00B0F227 /* pcre2_chartables.c.dist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pcre2_chartables.c.dist; sourceTree = "<group>"; };
|
||||
D052D8091868F7FC003ABCBD /* parse_execution.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse_execution.cpp; sourceTree = "<group>"; };
|
||||
D052D80A1868F7FC003ABCBD /* parse_execution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse_execution.h; sourceTree = "<group>"; };
|
||||
D07B247215BCC15700D4ADB4 /* add-shell */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "add-shell"; path = "build_tools/osx_package_scripts/add-shell"; sourceTree = "<group>"; };
|
||||
@@ -381,7 +495,6 @@
|
||||
D0A0850313B3ACEE0099B651 /* builtin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin.h; sourceTree = "<group>"; };
|
||||
D0A0850413B3ACEE0099B651 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
|
||||
D0A0850513B3ACEE0099B651 /* complete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = complete.h; sourceTree = "<group>"; };
|
||||
D0A0850613B3ACEE0099B651 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
|
||||
D0A0850713B3ACEE0099B651 /* env_universal_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = env_universal_common.h; sourceTree = "<group>"; };
|
||||
D0A0850913B3ACEE0099B651 /* env.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = env.h; sourceTree = "<group>"; };
|
||||
D0A0850A13B3ACEE0099B651 /* event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = event.h; sourceTree = "<group>"; };
|
||||
@@ -397,7 +510,6 @@
|
||||
D0A0851613B3ACEE0099B651 /* io.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = "<group>"; };
|
||||
D0A0851713B3ACEE0099B651 /* iothread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iothread.h; sourceTree = "<group>"; };
|
||||
D0A0851813B3ACEE0099B651 /* kill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = kill.h; sourceTree = "<group>"; };
|
||||
D0A0851913B3ACEE0099B651 /* mimedb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mimedb.h; sourceTree = "<group>"; };
|
||||
D0A0851A13B3ACEE0099B651 /* output.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = output.h; sourceTree = "<group>"; };
|
||||
D0A0851B13B3ACEE0099B651 /* parse_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse_util.h; sourceTree = "<group>"; };
|
||||
D0A0851C13B3ACEE0099B651 /* parser_keywords.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parser_keywords.h; sourceTree = "<group>"; };
|
||||
@@ -414,12 +526,6 @@
|
||||
D0A0852713B3ACEE0099B651 /* wgetopt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wgetopt.h; sourceTree = "<group>"; };
|
||||
D0A0852813B3ACEE0099B651 /* wildcard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wildcard.h; sourceTree = "<group>"; };
|
||||
D0A0852913B3ACEE0099B651 /* wutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wutil.h; sourceTree = "<group>"; };
|
||||
D0A0852A13B3ACEE0099B651 /* xdgmime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xdgmime.h; sourceTree = "<group>"; };
|
||||
D0A0852B13B3ACEE0099B651 /* xdgmimealias.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xdgmimealias.h; sourceTree = "<group>"; };
|
||||
D0A0852C13B3ACEE0099B651 /* xdgmimeglob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xdgmimeglob.h; sourceTree = "<group>"; };
|
||||
D0A0852D13B3ACEE0099B651 /* xdgmimeint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xdgmimeint.h; sourceTree = "<group>"; };
|
||||
D0A0852E13B3ACEE0099B651 /* xdgmimemagic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xdgmimemagic.h; sourceTree = "<group>"; };
|
||||
D0A0852F13B3ACEE0099B651 /* xdgmimeparent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xdgmimeparent.h; sourceTree = "<group>"; };
|
||||
D0A0853013B3ACEE0099B651 /* builtin_commandline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_commandline.cpp; sourceTree = "<group>"; };
|
||||
D0A0853113B3ACEE0099B651 /* builtin_complete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_complete.cpp; sourceTree = "<group>"; };
|
||||
D0A0853213B3ACEE0099B651 /* builtin_jobs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_jobs.cpp; sourceTree = "<group>"; };
|
||||
@@ -447,7 +553,6 @@
|
||||
D0A0854D13B3ACEE0099B651 /* iothread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iothread.cpp; sourceTree = "<group>"; };
|
||||
D0A0854E13B3ACEE0099B651 /* key_reader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = key_reader.cpp; sourceTree = "<group>"; };
|
||||
D0A0854F13B3ACEE0099B651 /* kill.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = kill.cpp; sourceTree = "<group>"; };
|
||||
D0A0855013B3ACEE0099B651 /* mimedb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mimedb.cpp; sourceTree = "<group>"; };
|
||||
D0A0855113B3ACEE0099B651 /* output.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = output.cpp; sourceTree = "<group>"; };
|
||||
D0A0855213B3ACEE0099B651 /* parse_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse_util.cpp; sourceTree = "<group>"; };
|
||||
D0A0855313B3ACEE0099B651 /* parser_keywords.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parser_keywords.cpp; sourceTree = "<group>"; };
|
||||
@@ -464,12 +569,6 @@
|
||||
D0A0855F13B3ACEE0099B651 /* wgetopt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wgetopt.cpp; sourceTree = "<group>"; };
|
||||
D0A0856013B3ACEE0099B651 /* wildcard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wildcard.cpp; sourceTree = "<group>"; };
|
||||
D0A0856113B3ACEE0099B651 /* wutil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wutil.cpp; sourceTree = "<group>"; };
|
||||
D0A0856213B3ACEE0099B651 /* xdgmime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xdgmime.cpp; sourceTree = "<group>"; };
|
||||
D0A0856313B3ACEE0099B651 /* xdgmimealias.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xdgmimealias.cpp; sourceTree = "<group>"; };
|
||||
D0A0856413B3ACEE0099B651 /* xdgmimeglob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xdgmimeglob.cpp; sourceTree = "<group>"; };
|
||||
D0A0856513B3ACEE0099B651 /* xdgmimeint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xdgmimeint.cpp; sourceTree = "<group>"; };
|
||||
D0A0856613B3ACEE0099B651 /* xdgmimemagic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xdgmimemagic.cpp; sourceTree = "<group>"; };
|
||||
D0A0856713B3ACEE0099B651 /* xdgmimeparent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xdgmimeparent.cpp; sourceTree = "<group>"; };
|
||||
D0A564D2168CF34A00AF6161 /* doc_src */ = {isa = PBXFileReference; lastKnownFileType = folder; path = doc_src; sourceTree = "<group>"; };
|
||||
D0A564F1168D0BAB00AF6161 /* man */ = {isa = PBXFileReference; lastKnownFileType = text; path = man; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D0A564F2168D1F2000AF6161 /* build_documentation.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = build_documentation.sh; path = build_tools/build_documentation.sh; sourceTree = "<group>"; };
|
||||
@@ -497,7 +596,6 @@
|
||||
D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = builtin_test.cpp; sourceTree = "<group>"; };
|
||||
D0F5B46319CFCDE80090665E /* wcstringutil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wcstringutil.cpp; sourceTree = "<group>"; };
|
||||
D0F5B46419CFCDE80090665E /* wcstringutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wcstringutil.h; sourceTree = "<group>"; };
|
||||
D0F5E28415A7A32D00315DFF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
|
||||
D0FE8EE6179CA8A5008C9F21 /* parse_productions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse_productions.h; sourceTree = "<group>"; };
|
||||
D0FE8EE7179FB75F008C9F21 /* parse_productions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse_productions.cpp; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -508,6 +606,14 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D007693D1990137800CA4627 /* libncurses.dylib in Frameworks */,
|
||||
D04F7FFA1BA4E9A400B0F227 /* libpcre2.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D04F7FCD1BA4E29300B0F227 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -516,6 +622,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D02ADC159864D5008E62BD /* libncurses.dylib in Frameworks */,
|
||||
D04F7FF21BA4E68A00B0F227 /* libpcre2.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -524,6 +631,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0D02A8D15983CFA008E62BD /* libncurses.dylib in Frameworks */,
|
||||
D04F7FF11BA4E68200B0F227 /* libpcre2.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -554,6 +662,38 @@
|
||||
name = "Other Build Products";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D04F7F8B1BA4DC7600B0F227 /* pcre */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
63A2C0E81CC5F9FB00973404 /* pcre2_find_bracket.c */,
|
||||
D04F7FF31BA4E6F300B0F227 /* pcre2_auto_possess.c */,
|
||||
D04F7F8D1BA4DCD900B0F227 /* pcre2_compile.c */,
|
||||
D04F7F901BA4DCE900B0F227 /* pcre2_config.c */,
|
||||
D04F7F931BA4DCFA00B0F227 /* pcre2_context.c */,
|
||||
D04F7F961BA4DD1100B0F227 /* pcre2_dfa_match.c */,
|
||||
D04F7F991BA4DD2000B0F227 /* pcre2_error.c */,
|
||||
D04F7FC91BA4DE3500B0F227 /* pcre2_jit_compile.c */,
|
||||
D04F7F9C1BA4DD4A00B0F227 /* pcre2_maketables.c */,
|
||||
D04F7F9F1BA4DD5900B0F227 /* pcre2_match.c */,
|
||||
D04F7FA21BA4DD6900B0F227 /* pcre2_match_data.c */,
|
||||
D04F7FA51BA4DD7300B0F227 /* pcre2_newline.c */,
|
||||
D04F7FA81BA4DD8400B0F227 /* pcre2_ord2utf.c */,
|
||||
D04F7FAB1BA4DDA500B0F227 /* pcre2_pattern_info.c */,
|
||||
D04F7FAE1BA4DDB500B0F227 /* pcre2_serialize.c */,
|
||||
D04F7FB11BA4DDBF00B0F227 /* pcre2_string_utils.c */,
|
||||
D04F7FB41BA4DDC900B0F227 /* pcre2_study.c */,
|
||||
D04F7FB71BA4DDEB00B0F227 /* pcre2_substitute.c */,
|
||||
D04F7FB81BA4DDEB00B0F227 /* pcre2_substring.c */,
|
||||
D04F7FB91BA4DDEB00B0F227 /* pcre2_tables.c */,
|
||||
D04F7FBA1BA4DDEB00B0F227 /* pcre2_ucd.c */,
|
||||
D04F7FBB1BA4DDEB00B0F227 /* pcre2_valid_utf.c */,
|
||||
D04F7FBC1BA4DDEB00B0F227 /* pcre2_xclass.c */,
|
||||
D04F7FF71BA4E82C00B0F227 /* pcre2_chartables.c.dist */,
|
||||
);
|
||||
name = pcre;
|
||||
path = "pcre2-10.21/src";
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
D08A328E17B4455100F3A533 /* fish_tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -565,7 +705,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0D02A91159845EF008E62BD /* Sources */,
|
||||
D0F5E28115A7A32D00315DFF /* DerivedSources */,
|
||||
D0D02AFC159871BF008E62BD /* Launcher */,
|
||||
D0D02A8E15983D5F008E62BD /* Libraries */,
|
||||
D0D02AAB15985C14008E62BD /* Resources */,
|
||||
@@ -587,6 +726,7 @@
|
||||
D0D02A91159845EF008E62BD /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4E142D731B56B5D7008783C8 /* config.h */,
|
||||
D0C6FCCB14CFA4B7004CE8AD /* autoload.h */,
|
||||
D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */,
|
||||
D0A0850313B3ACEE0099B651 /* builtin.h */,
|
||||
@@ -598,6 +738,7 @@
|
||||
D0A0853413B3ACEE0099B651 /* builtin_ulimit.cpp */,
|
||||
D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */,
|
||||
D0CA63F316FC275F00093BD4 /* builtin_printf.cpp */,
|
||||
D04F7F7B1BA4BF4000B0F227 /* builtin_string.cpp */,
|
||||
D0A0853513B3ACEE0099B651 /* builtin.cpp */,
|
||||
D0B6B0FF14E88BA400AD6C10 /* color.h */,
|
||||
D0B6B0FE14E88BA400AD6C10 /* color.cpp */,
|
||||
@@ -605,7 +746,6 @@
|
||||
D0A0853613B3ACEE0099B651 /* common.cpp */,
|
||||
D0A0850513B3ACEE0099B651 /* complete.h */,
|
||||
D0A0853713B3ACEE0099B651 /* complete.cpp */,
|
||||
D0A0850613B3ACEE0099B651 /* config.h */,
|
||||
D0A0850713B3ACEE0099B651 /* env_universal_common.h */,
|
||||
D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */,
|
||||
D0A0850913B3ACEE0099B651 /* env.h */,
|
||||
@@ -649,8 +789,6 @@
|
||||
D0A0854F13B3ACEE0099B651 /* kill.cpp */,
|
||||
D0A0854E13B3ACEE0099B651 /* key_reader.cpp */,
|
||||
D03EE83814DF88B200FC7150 /* lru.h */,
|
||||
D0A0851913B3ACEE0099B651 /* mimedb.h */,
|
||||
D0A0855013B3ACEE0099B651 /* mimedb.cpp */,
|
||||
D0A0851A13B3ACEE0099B651 /* output.h */,
|
||||
D0A0855113B3ACEE0099B651 /* output.cpp */,
|
||||
D032388A1849D1980032CF2C /* pager.h */,
|
||||
@@ -691,20 +829,10 @@
|
||||
D0A0856013B3ACEE0099B651 /* wildcard.cpp */,
|
||||
D0A0852913B3ACEE0099B651 /* wutil.h */,
|
||||
D0A0856113B3ACEE0099B651 /* wutil.cpp */,
|
||||
D0A0852A13B3ACEE0099B651 /* xdgmime.h */,
|
||||
D0A0856213B3ACEE0099B651 /* xdgmime.cpp */,
|
||||
D0A0852B13B3ACEE0099B651 /* xdgmimealias.h */,
|
||||
D0A0856313B3ACEE0099B651 /* xdgmimealias.cpp */,
|
||||
D0A0852C13B3ACEE0099B651 /* xdgmimeglob.h */,
|
||||
D0A0856413B3ACEE0099B651 /* xdgmimeglob.cpp */,
|
||||
D0A0852D13B3ACEE0099B651 /* xdgmimeint.h */,
|
||||
D0A0856513B3ACEE0099B651 /* xdgmimeint.cpp */,
|
||||
D0A0852E13B3ACEE0099B651 /* xdgmimemagic.h */,
|
||||
D0A0856613B3ACEE0099B651 /* xdgmimemagic.cpp */,
|
||||
D0A0852F13B3ACEE0099B651 /* xdgmimeparent.h */,
|
||||
D0A0856713B3ACEE0099B651 /* xdgmimeparent.cpp */,
|
||||
D04F7F8B1BA4DC7600B0F227 /* pcre */,
|
||||
);
|
||||
name = Sources;
|
||||
path = src;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0D02AAB15985C14008E62BD /* Resources */ = {
|
||||
@@ -743,36 +871,22 @@
|
||||
D0D02A9A15985A75008E62BD /* fish.app */,
|
||||
D0D02AD01598642A008E62BD /* fish_indent */,
|
||||
D00769421990137800CA4627 /* fish_tests */,
|
||||
D04F7FD01BA4E29300B0F227 /* libpcre2.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0F5E28115A7A32D00315DFF /* DerivedSources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0F5E28415A7A32D00315DFF /* config.h */,
|
||||
);
|
||||
name = DerivedSources;
|
||||
sourceTree = DERIVED_FILE_DIR;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXLegacyTarget section */
|
||||
D0A084F713B3AC130099B651 /* Makefile */ = {
|
||||
isa = PBXLegacyTarget;
|
||||
buildArgumentsString = " -f Makefile -k ${ACTION}";
|
||||
buildConfigurationList = D0A084FA13B3AC130099B651 /* Build configuration list for PBXLegacyTarget "Makefile" */;
|
||||
buildPhases = (
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
D04F7FCE1BA4E29300B0F227 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
buildToolPath = /usr/bin/make;
|
||||
buildWorkingDirectory = "";
|
||||
dependencies = (
|
||||
);
|
||||
name = Makefile;
|
||||
passBuildSettingsInEnvironment = 1;
|
||||
productName = FishsFish;
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXLegacyTarget section */
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
D00769101990137800CA4627 /* fish_tests */ = {
|
||||
@@ -785,12 +899,32 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
D008D0CF1BC58FE500841177 /* PBXTargetDependency */,
|
||||
D04F7FED1BA4E3DF00B0F227 /* PBXTargetDependency */,
|
||||
);
|
||||
name = fish_tests;
|
||||
productName = fish_Xcode;
|
||||
productReference = D00769421990137800CA4627 /* fish_tests */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
D04F7FCF1BA4E29300B0F227 /* pcre2 */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D04F7FD11BA4E29300B0F227 /* Build configuration list for PBXNativeTarget "pcre2" */;
|
||||
buildPhases = (
|
||||
D04F7FCC1BA4E29300B0F227 /* Sources */,
|
||||
D04F7FCD1BA4E29300B0F227 /* Frameworks */,
|
||||
D04F7FCE1BA4E29300B0F227 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
D04F7FF81BA4E84B00B0F227 /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = pcre2;
|
||||
productName = libpcre2.a;
|
||||
productReference = D04F7FD01BA4E29300B0F227 /* libpcre2.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
D0D02A9915985A75008E62BD /* fish.app */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D0D02AA415985A75008E62BD /* Build configuration list for PBXNativeTarget "fish.app" */;
|
||||
@@ -819,6 +953,7 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
D008D0CD1BC58FE100841177 /* PBXTargetDependency */,
|
||||
);
|
||||
name = fish_indent;
|
||||
productName = fish_indent;
|
||||
@@ -835,6 +970,8 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
D008D0CB1BC58FDD00841177 /* PBXTargetDependency */,
|
||||
D04F7FEB1BA4E3DB00B0F227 /* PBXTargetDependency */,
|
||||
);
|
||||
name = fish_shell;
|
||||
productName = fish_Xcode;
|
||||
@@ -847,7 +984,15 @@
|
||||
D0A084F213B3AC130099B651 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0630;
|
||||
LastUpgradeCheck = 0730;
|
||||
TargetAttributes = {
|
||||
D008D0C41BC58F8800841177 = {
|
||||
CreatedOnToolsVersion = 7.0.1;
|
||||
};
|
||||
D04F7FCF1BA4E29300B0F227 = {
|
||||
CreatedOnToolsVersion = 6.4;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = D0A084F513B3AC130099B651 /* Build configuration list for PBXProject "fish" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
@@ -867,8 +1012,9 @@
|
||||
D0D2693B159835CA005D9B9C /* fish_shell */,
|
||||
D0D02ACF1598642A008E62BD /* fish_indent */,
|
||||
D0A564E6168CFDD800AF6161 /* man_pages */,
|
||||
D0A084F713B3AC130099B651 /* Makefile */,
|
||||
D00769101990137800CA4627 /* fish_tests */,
|
||||
D04F7FCF1BA4E29300B0F227 /* pcre2 */,
|
||||
D008D0C41BC58F8800841177 /* generate-version-header */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -889,7 +1035,7 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
D01A25E01AF58CD0002F9E92 /* ShellScript */ = {
|
||||
D008D0C91BC58F9500841177 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -897,23 +1043,12 @@
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SHARED_DERIVED_FILE_DIR)/fish-build-version.h",
|
||||
"$(SHARED_DERIVED_FILE_DIR)/force-fish-build-version.h",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "mkdir -p -m 755 \"${TARGET_BUILD_DIR}/base/share/fish/vendor_completions.d\"";
|
||||
};
|
||||
D01A25E11AF58D8C002F9E92 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 8;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "mkdir -p -m 755 \"${INSTALL_ROOT}/${INSTALL_PATH}/share/fish/vendor_completions.d\"";
|
||||
shellScript = ./build_tools/xcode_version_gen.sh;
|
||||
};
|
||||
D0A564EB168CFDDE00AF6161 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@@ -1070,7 +1205,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "cd \"${SRCROOT}\" ;\n# Run build_documentation.sh\n# Do this in a subshell so that we keep going even if it calls exit\n( . \"./build_tools/build_documentation.sh\" \"./Doxyfile.help\" \"./doc_src\" \"$BUILT_PRODUCTS_DIR\" )\n\n# Copy certain files into man1, destined for share/man/man1 (instead of share/fish/man/man1)\n# These copies will fail if the documentation did not build; that's OK\n# We want to create the directory even if the documentation did not build, so that the Xcode build can still succeed\nmanpathdir=\"${BUILT_PRODUCTS_DIR}/pages_for_manpath/man1\"\necho \"Copying pages destined for manpath into $manpathdir\"\nrm -Rf \"$manpathdir\"\nmkdir -p \"$manpathdir\"\nfor manpage in fish.1 set_color.1 fishd.1 fish_indent.1; do\n manpagepath=\"${BUILT_PRODUCTS_DIR}/man/man1/${manpage}\"\n test -f \"$manpagepath\" && cp \"$manpagepath\" \"${BUILT_PRODUCTS_DIR}/pages_for_manpath/man1/\"\ndone\n\n# Always succeed\ntrue\n";
|
||||
shellScript = "cd \"${SRCROOT}\" ;\n# Run build_documentation.sh\n# Do this in a subshell so that we keep going even if it calls exit\nif [ -f lexicon_filter ] ; then\n export INPUT_FILTER=./lexicon_filter\nelse\n echo \"build_documentation:0: warning: lexicon_filter not found, ignoring it\" >&2\nfi\n\n( . \"./build_tools/build_documentation.sh\" \"./Doxyfile.help\" \"./doc_src\" \"$BUILT_PRODUCTS_DIR\" )\n\n# Copy certain files into man1, destined for share/man/man1 (instead of share/fish/man/man1)\n# These copies will fail if the documentation did not build; that's OK\n# We want to create the directory even if the documentation did not build, so that the Xcode build can still succeed\nmanpathdir=\"${BUILT_PRODUCTS_DIR}/pages_for_manpath/man1\"\necho \"Copying pages destined for manpath into $manpathdir\"\nrm -Rf \"$manpathdir\"\nmkdir -p \"$manpathdir\"\nfor manpage in fish.1 set_color.1 fishd.1 fish_indent.1; do\n manpagepath=\"${BUILT_PRODUCTS_DIR}/man/man1/${manpage}\"\n test -f \"$manpagepath\" && cp \"$manpagepath\" \"${BUILT_PRODUCTS_DIR}/pages_for_manpath/man1/\"\ndone\n\n# Always succeed\ntrue\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -1115,6 +1250,7 @@
|
||||
D00769321990137800CA4627 /* wgetopt.cpp in Sources */,
|
||||
D00769331990137800CA4627 /* wutil.cpp in Sources */,
|
||||
D00769341990137800CA4627 /* input.cpp in Sources */,
|
||||
D04F7F7D1BA4BF4000B0F227 /* builtin_string.cpp in Sources */,
|
||||
D00769351990137800CA4627 /* output.cpp in Sources */,
|
||||
D00769361990137800CA4627 /* intern.cpp in Sources */,
|
||||
D00769371990137800CA4627 /* env_universal_common.cpp in Sources */,
|
||||
@@ -1125,12 +1261,44 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D04F7FCC1BA4E29300B0F227 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D04F7FD51BA4E3AC00B0F227 /* pcre2_compile.c in Sources */,
|
||||
D04F7FD61BA4E3AC00B0F227 /* pcre2_config.c in Sources */,
|
||||
D04F7FD71BA4E3AC00B0F227 /* pcre2_context.c in Sources */,
|
||||
D04F7FD81BA4E3AC00B0F227 /* pcre2_dfa_match.c in Sources */,
|
||||
D04F7FD91BA4E3AC00B0F227 /* pcre2_error.c in Sources */,
|
||||
D04F7FDA1BA4E3AC00B0F227 /* pcre2_jit_compile.c in Sources */,
|
||||
D04F7FDB1BA4E3AC00B0F227 /* pcre2_maketables.c in Sources */,
|
||||
D04F7FDC1BA4E3AC00B0F227 /* pcre2_match.c in Sources */,
|
||||
D04F7FDD1BA4E3AC00B0F227 /* pcre2_match_data.c in Sources */,
|
||||
D04F7FDE1BA4E3AC00B0F227 /* pcre2_newline.c in Sources */,
|
||||
D04F7FDF1BA4E3AC00B0F227 /* pcre2_ord2utf.c in Sources */,
|
||||
D04F7FE01BA4E3AC00B0F227 /* pcre2_pattern_info.c in Sources */,
|
||||
63A2C0E91CC60F3B00973404 /* pcre2_find_bracket.c in Sources */,
|
||||
D04F7FF41BA4E6F300B0F227 /* pcre2_auto_possess.c in Sources */,
|
||||
D04F7FE11BA4E3AC00B0F227 /* pcre2_serialize.c in Sources */,
|
||||
D04F7FE21BA4E3AC00B0F227 /* pcre2_string_utils.c in Sources */,
|
||||
D04F7FE31BA4E3AC00B0F227 /* pcre2_study.c in Sources */,
|
||||
D04F7FE41BA4E3AC00B0F227 /* pcre2_substitute.c in Sources */,
|
||||
D04F7FE51BA4E3AC00B0F227 /* pcre2_substring.c in Sources */,
|
||||
D04F7FE61BA4E3AC00B0F227 /* pcre2_tables.c in Sources */,
|
||||
D04F7FE71BA4E3AC00B0F227 /* pcre2_ucd.c in Sources */,
|
||||
D04F7FE81BA4E3AC00B0F227 /* pcre2_valid_utf.c in Sources */,
|
||||
D04F7FE91BA4E3AC00B0F227 /* pcre2_xclass.c in Sources */,
|
||||
D04F7FF91BA4E87B00B0F227 /* pcre2_chartables.c.dist in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
D0D02ACC1598642A008E62BD /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D030FBF41A4A38F300F7ADA0 /* autoload.cpp in Sources */,
|
||||
D030FBF51A4A38F300F7ADA0 /* builtin.cpp in Sources */,
|
||||
D04F7FF01BA4E5B900B0F227 /* builtin_string.cpp in Sources */,
|
||||
D030FC151A4A391900F7ADA0 /* builtin_test.cpp in Sources */,
|
||||
D030FBF61A4A38F300F7ADA0 /* color.cpp in Sources */,
|
||||
D0D02AD81598649E008E62BD /* common.cpp in Sources */,
|
||||
@@ -1216,6 +1384,7 @@
|
||||
D0D02A751598385E008E62BD /* wgetopt.cpp in Sources */,
|
||||
D0D02A7615983869008E62BD /* wutil.cpp in Sources */,
|
||||
D0D02A7715983875008E62BD /* input.cpp in Sources */,
|
||||
D04F7F7C1BA4BF4000B0F227 /* builtin_string.cpp in Sources */,
|
||||
D0D02A781598387E008E62BD /* output.cpp in Sources */,
|
||||
D0D02A7915983888008E62BD /* intern.cpp in Sources */,
|
||||
D0D02A7B15983928008E62BD /* env_universal_common.cpp in Sources */,
|
||||
@@ -1237,11 +1406,36 @@
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
D008D0CB1BC58FDD00841177 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D008D0C41BC58F8800841177 /* generate-version-header */;
|
||||
targetProxy = D008D0CA1BC58FDD00841177 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D008D0CD1BC58FE100841177 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D008D0C41BC58F8800841177 /* generate-version-header */;
|
||||
targetProxy = D008D0CC1BC58FE100841177 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D008D0CF1BC58FE500841177 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D008D0C41BC58F8800841177 /* generate-version-header */;
|
||||
targetProxy = D008D0CE1BC58FE500841177 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D031890815E36CC000D9CC39 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D0F019EC15A976F30034B3B1 /* base */;
|
||||
targetProxy = D031890715E36CC000D9CC39 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D04F7FEB1BA4E3DB00B0F227 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D04F7FCF1BA4E29300B0F227 /* pcre2 */;
|
||||
targetProxy = D04F7FEA1BA4E3DB00B0F227 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D04F7FED1BA4E3DF00B0F227 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D04F7FCF1BA4E29300B0F227 /* pcre2 */;
|
||||
targetProxy = D04F7FEC1BA4E3DF00B0F227 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D07D265715E33B86009E43F6 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D0D2693B159835CA005D9B9C /* fish_shell */;
|
||||
@@ -1314,6 +1508,7 @@
|
||||
D007FDDA17136EAA00A52BE6 /* Release_C++11 */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
@@ -1327,15 +1522,19 @@
|
||||
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
|
||||
"BINDIR=L\\\"/usr/local/bin\\\"",
|
||||
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
|
||||
"FISH_BUILD_VERSION=\\\"2.2.0\\\"",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_LABEL = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
SDKROOT = macosx;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx $(SRCROOT)/osx/shared_headers $(SHARED_DERIVED_FILE_DIR)";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wall",
|
||||
"-Wunused-macros",
|
||||
);
|
||||
};
|
||||
name = "Release_C++11";
|
||||
};
|
||||
@@ -1370,6 +1569,7 @@
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
INFOPLIST_FILE = osx/Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.ridiculousfish.fish-shell";
|
||||
PRODUCT_NAME = fish;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
@@ -1378,7 +1578,6 @@
|
||||
D007FDDE17136EAA00A52BE6 /* Release_C++11 */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
@@ -1407,17 +1606,99 @@
|
||||
};
|
||||
name = "Release_C++11";
|
||||
};
|
||||
D007FDE317136EAA00A52BE6 /* Release_C++11 */ = {
|
||||
D008D0C51BC58F8800841177 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D008D0C61BC58F8800841177 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D008D0C71BC58F8800841177 /* Release_C++11 */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = "Release_C++11";
|
||||
};
|
||||
D04F7FD21BA4E29300B0F227 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
GCC_INPUT_FILETYPE = sourcecode.c.c;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"LOCALEDIR=\\\"/usr/local/share/locale\\\"",
|
||||
"PREFIX=L\\\"/usr/local\\\"",
|
||||
"DATADIR=L\\\"/usr/local/share\\\"",
|
||||
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
|
||||
"BINDIR=L\\\"/usr/local/bin\\\"",
|
||||
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
|
||||
"PCRE2_CODE_UNIT_WIDTH=32",
|
||||
"HAVE_CONFIG_H=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
GCC_WARN_UNUSED_VARIABLE = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/pcre2 $(SRCROOT)/osx/shared_headers/";
|
||||
USE_HEADERMAP = NO;
|
||||
WARNING_CFLAGS = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D04F7FD31BA4E29300B0F227 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
GCC_INPUT_FILETYPE = sourcecode.c.c;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"LOCALEDIR=\\\"/usr/local/share/locale\\\"",
|
||||
"PREFIX=L\\\"/usr/local\\\"",
|
||||
"DATADIR=L\\\"/usr/local/share\\\"",
|
||||
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
|
||||
"BINDIR=L\\\"/usr/local/bin\\\"",
|
||||
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
|
||||
"PCRE2_CODE_UNIT_WIDTH=32",
|
||||
"HAVE_CONFIG_H=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
GCC_WARN_UNUSED_VARIABLE = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/pcre2 $(SRCROOT)/osx/shared_headers/";
|
||||
USE_HEADERMAP = NO;
|
||||
WARNING_CFLAGS = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D04F7FD41BA4E29300B0F227 /* Release_C++11 */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
GCC_INPUT_FILETYPE = sourcecode.c.c;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"LOCALEDIR=\\\"/usr/local/share/locale\\\"",
|
||||
"PREFIX=L\\\"/usr/local\\\"",
|
||||
"DATADIR=L\\\"/usr/local/share\\\"",
|
||||
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
|
||||
"BINDIR=L\\\"/usr/local/bin\\\"",
|
||||
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
|
||||
"PCRE2_CODE_UNIT_WIDTH=32",
|
||||
"HAVE_CONFIG_H=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
GCC_WARN_UNUSED_VARIABLE = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/pcre2 $(SRCROOT)/osx/shared_headers/";
|
||||
USE_HEADERMAP = NO;
|
||||
WARNING_CFLAGS = "";
|
||||
};
|
||||
name = "Release_C++11";
|
||||
};
|
||||
@@ -1444,6 +1725,7 @@
|
||||
D0A084F813B3AC130099B651 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
||||
GCC_ENABLE_CPP_RTTI = YES;
|
||||
@@ -1455,23 +1737,28 @@
|
||||
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
|
||||
"BINDIR=L\\\"/usr/local/bin\\\"",
|
||||
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
|
||||
"FISH_BUILD_VERSION=\\\"2.2.0\\\"",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_LABEL = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx $(SRCROOT)/osx/shared_headers $(SHARED_DERIVED_FILE_DIR)";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wall",
|
||||
"-Wunused-macros",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D0A084F913B3AC130099B651 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_CPP_EXCEPTIONS = NO;
|
||||
@@ -1483,46 +1770,19 @@
|
||||
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
|
||||
"BINDIR=L\\\"/usr/local/bin\\\"",
|
||||
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
|
||||
"FISH_BUILD_VERSION=\\\"2.2.0\\\"",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_LABEL = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
SDKROOT = macosx;
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx/**";
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D0A084FB13B3AC130099B651 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUGGING_SYMBOLS = YES;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D0A084FC13B3AC130099B651 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/osx $(SRCROOT)/osx/shared_headers $(SHARED_DERIVED_FILE_DIR)";
|
||||
WARNING_CFLAGS = (
|
||||
"-Wall",
|
||||
"-Wunused-macros",
|
||||
);
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -1557,6 +1817,7 @@
|
||||
);
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
INFOPLIST_FILE = osx/Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.ridiculousfish.fish-shell";
|
||||
PRODUCT_NAME = fish;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
@@ -1573,6 +1834,7 @@
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
INFOPLIST_FILE = osx/Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.ridiculousfish.fish-shell";
|
||||
PRODUCT_NAME = fish;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
@@ -1609,7 +1871,6 @@
|
||||
D0D26944159835CA005D9B9C /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
@@ -1621,7 +1882,6 @@
|
||||
D0D26945159835CA005D9B9C /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
@@ -1663,6 +1923,26 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D008D0C81BC58F8800841177 /* Build configuration list for PBXAggregateTarget "generate-version-header" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D008D0C51BC58F8800841177 /* Debug */,
|
||||
D008D0C61BC58F8800841177 /* Release */,
|
||||
D008D0C71BC58F8800841177 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D04F7FD11BA4E29300B0F227 /* Build configuration list for PBXNativeTarget "pcre2" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D04F7FD21BA4E29300B0F227 /* Debug */,
|
||||
D04F7FD31BA4E29300B0F227 /* Release */,
|
||||
D04F7FD41BA4E29300B0F227 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D07D266F15E33B86009E43F6 /* Build configuration list for PBXAggregateTarget "install_tree" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
@@ -1683,16 +1963,6 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D0A084FA13B3AC130099B651 /* Build configuration list for PBXLegacyTarget "Makefile" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D0A084FB13B3AC130099B651 /* Debug */,
|
||||
D0A084FC13B3AC130099B651 /* Release */,
|
||||
D007FDE317136EAA00A52BE6 /* Release_C++11 */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D0A564E9168CFDD800AF6161 /* Build configuration list for PBXAggregateTarget "man_pages" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0630"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -23,21 +23,24 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
@@ -52,10 +55,10 @@
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0630"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -23,21 +23,24 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
@@ -52,10 +55,10 @@
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0630"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -23,10 +23,10 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
@@ -38,15 +38,18 @@
|
||||
ReferencedContainer = "container:fish.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
@@ -62,10 +65,10 @@
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0630"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -23,10 +23,10 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
@@ -38,15 +38,18 @@
|
||||
ReferencedContainer = "container:fish.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
@@ -69,10 +72,10 @@
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0630"
|
||||
LastUpgradeVersion = "0730"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -23,21 +23,24 @@
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
@@ -52,10 +55,10 @@
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
/** \file input_common.h
|
||||
|
||||
Header file for the low level input library
|
||||
|
||||
*/
|
||||
#ifndef INPUT_COMMON_H
|
||||
#define INPUT_COMMON_H
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
/**
|
||||
Use unencoded private-use keycodes for internal characters
|
||||
*/
|
||||
#define INPUT_COMMON_RESERVED 0xe000
|
||||
|
||||
enum
|
||||
{
|
||||
/**
|
||||
R_NULL is sometimes returned by the input when a character was
|
||||
requested but none could be delivered, or when an exception
|
||||
happened.
|
||||
*/
|
||||
R_NULL = INPUT_COMMON_RESERVED,
|
||||
R_EOF
|
||||
}
|
||||
;
|
||||
|
||||
/**
|
||||
Init the library
|
||||
*/
|
||||
void input_common_init(int (*ih)());
|
||||
|
||||
/**
|
||||
Free memory used by the library
|
||||
*/
|
||||
void input_common_destroy();
|
||||
|
||||
/**
|
||||
Function used by input_readch to read bytes from stdin until enough
|
||||
bytes have been read to convert them to a wchar_t. Conversion is
|
||||
done using mbrtowc. If a character has previously been read and
|
||||
then 'unread' using \c input_common_unreadch, that character is
|
||||
returned. If timed is true, readch2 will wait at most
|
||||
WAIT_ON_ESCAPE milliseconds for a character to be available for
|
||||
reading before returning with the value WEOF.
|
||||
*/
|
||||
wchar_t input_common_readch(int timed);
|
||||
|
||||
/**
|
||||
Enqueue a character or a readline function to the queue of unread
|
||||
characters that input_readch will return before actually reading from fd
|
||||
0.
|
||||
*/
|
||||
void input_common_queue_ch(wint_t ch);
|
||||
|
||||
/**
|
||||
Add a character or a readline function to the front of the queue of unread
|
||||
characters. This will be the first character returned by input_readch
|
||||
(unless this function is called more than once).
|
||||
*/
|
||||
void input_common_next_ch(wint_t ch);
|
||||
|
||||
/** Adds a callback to be invoked at the next turn of the "event loop." The callback function will be invoked and passed arg. */
|
||||
void input_common_add_callback(void (*callback)(void *), void *arg);
|
||||
|
||||
#endif
|
||||
14
install-sh
14
install-sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-01-19.21; # UTC
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
@@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
@@ -156,7 +156,7 @@ while test $# -ne 0; do
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
@@ -202,7 +202,7 @@ if test $# -eq 0; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
@@ -240,7 +240,7 @@ fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
@@ -354,7 +354,7 @@ do
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
|
||||
@@ -46,7 +46,12 @@
|
||||
# Then if it's inline. Remove and process immediately...
|
||||
/^\\fish.*$/ {
|
||||
# Catch @ symbol
|
||||
s/@/(at)/
|
||||
s/@/@at/g
|
||||
# Catch & symbol
|
||||
s/&\([^a-z]\)/@amp\1/g
|
||||
# Catch {{ & }} symbols
|
||||
s/{{/@curlyL/g
|
||||
s/}}/@curlyR/g
|
||||
s/^\\fish//
|
||||
s/\\endfish//
|
||||
b html
|
||||
@@ -56,7 +61,12 @@
|
||||
# Inside \fish block. Process...
|
||||
/\\endfish/!{
|
||||
# Catch @ symbol
|
||||
s/@/((d))/
|
||||
s/@/@at/g
|
||||
# Catch & symbol
|
||||
s/&\([^a-z]\)/@amp\1/g
|
||||
# Catch {{ & }} symbols
|
||||
s/{{/@curlyL/g
|
||||
s/}}/@curlyR/g
|
||||
# Preprocess HTML and HTML-like formatting
|
||||
/<[^>]*>/ {
|
||||
b html
|
||||
@@ -103,6 +113,9 @@ s|</i>|}|
|
||||
s|<u>|@undr{|
|
||||
s|<u [^>]*>|@undr{|
|
||||
s|</u>|}|
|
||||
# Backslash (when escaping output)
|
||||
s|<bs>|@bksl{|
|
||||
s|</bs>|}|
|
||||
t html
|
||||
#.
|
||||
# Some handy non-standard extensions
|
||||
@@ -224,11 +237,11 @@ s/ \\$/ @bksl{ }/
|
||||
#.
|
||||
# Normal Directory
|
||||
s|mkdir |mkdir :|
|
||||
s|\([~/:][/]*[.A-Za-z_0-9/-]*\)\\ |\1=|g
|
||||
s| \([~/][/]*[.A-Za-z_0-9/=-]*\)| \\\
|
||||
s|\([~/:][/]*[.A-Za-z_0-9*/-]*\)\\ |\1=|g
|
||||
s| \([~/][/]*[.A-Za-z_0-9*/=-]*\)| \\\
|
||||
<@path{\1}\
|
||||
|g
|
||||
s| \(:[/]*[.A-Za-z_0-9/=-]*\)| \\\
|
||||
s| \(:[/]*[.A-Za-z_0-9*/=-]*\)| \\\
|
||||
<@path{\1}\
|
||||
|g
|
||||
t protect
|
||||
@@ -255,6 +268,7 @@ s|^\([a-zA-Z][{},a-zA-Z0-9%*._/?!-]*\)|@args{\1}|g
|
||||
# Pick up loose text after markup.
|
||||
s/\([})]\)\([a-zA-Z0-9+%*.,][,a-zA-Z0-9%*._/?!-]*\);/\1@args{\2};/g
|
||||
s/\([})]\)\([a-zA-Z0-9+%*.,][,a-zA-Z0-9%*._/?!-]*\)$/\1@args{\2}/g
|
||||
s/\([})]\)\([a-zA-Z0-9+%*.,][,a-zA-Z0-9%*._/?!-]*\)@EOL/\1@args{\2}/g
|
||||
#.
|
||||
# Uncomment the following 2 lines (ss) to log the pattern buffer.
|
||||
s/^.*$/Pattern : &/w lexicon.log
|
||||
@@ -279,6 +293,8 @@ s,\([^\\ ]*\)\\\n\([^<]*\)<\(@[^}]*[}\\]\),\1\3\2,
|
||||
t join
|
||||
# Clean up stray new lines
|
||||
s/\n//g
|
||||
# Clean up past @EOL
|
||||
s/@EOL.*$//g
|
||||
#.
|
||||
# Uncomment the folowing two lines (ss) to log the buffer before 'cleaning'.
|
||||
s/^.*$/PreClean: &/w lexicon.log
|
||||
@@ -475,14 +491,17 @@ x
|
||||
#.
|
||||
# Mark up sesitive character entities.
|
||||
#.
|
||||
:entities
|
||||
s/</\</g
|
||||
s/>/\>/g
|
||||
s/((d))/@/g
|
||||
s/@amp/\&/g
|
||||
s/@curlyL/\{/g
|
||||
s/@curlyR/\}/g
|
||||
s/@at/@atat{ }/g
|
||||
#.
|
||||
# Final post processing
|
||||
s/};\([^]]\)/}@redr{;}\1/g
|
||||
s/};$/}@redr{;}/
|
||||
s/@sglq{}/''/
|
||||
s/ \[\([@(]\)/ @args{[}\1/g
|
||||
s/ \[\([A-Z]*\) / @args{[\1} /g
|
||||
s/@args{\([a-zA-Z0-9_.]*\)}\]/@args{\1]}/g
|
||||
@@ -494,7 +513,9 @@ s/ \]$/ @args{]}/g
|
||||
s/\]}\]$/]]}/
|
||||
s/\\\([()]\)/@optr{@bksl{\1}}/g
|
||||
s/\([()]\)/@optr{\1}/g
|
||||
s/\\\\\([cdgnstwx?]\)/@bksl{\1}/g
|
||||
s/\\n/@bksl{n}/
|
||||
s/%\([diouxXfgGeEsbmy]\)/@pcnt{\1}/g
|
||||
s/ \\$//
|
||||
#.
|
||||
# Uncomment the folowing two lines (ss) to log the final output, sent to Doxygen.
|
||||
@@ -514,6 +535,8 @@ b
|
||||
#.
|
||||
# Move protected content to hold space and mark up other entities.
|
||||
:protect
|
||||
# Add an 'End of Line' marker
|
||||
s/$/@EOL/
|
||||
s/^.*$/Input : &/w lexicon.log
|
||||
s/^Input : //
|
||||
h
|
||||
@@ -534,6 +557,7 @@ x
|
||||
s/[^\<]*//
|
||||
s/^ *\\\n//g
|
||||
s/\n *\\//g
|
||||
s/\n@EOL//g
|
||||
s/[()] \\//g
|
||||
s/^[^\<][^@][^\\]*//
|
||||
s/\n[]|;) ][^\\]*\\//
|
||||
@@ -557,11 +581,13 @@ s/^[a-z][a-z]* \n//
|
||||
# Swap the buffers back.
|
||||
x
|
||||
#.
|
||||
# A special case. Tidy up after commands.
|
||||
# A special case. Tidy up after performing command substitution.
|
||||
# Redirectors
|
||||
s/\([^{|] *\)|/\1@redr{|}/g
|
||||
s/&$/@redr{\&}/
|
||||
s/\([^{&] *\)&[^a-z]/\1@redr{\&}/g
|
||||
s/\&@EOL$/@redr{@amp}@EOL/g
|
||||
s/@amp@EOL$/@redr{@amp}@EOL/g
|
||||
s/\([<>]\)@amp\([0-9]\)/@redr{\1@amp\2}/g
|
||||
s/\([^{&] *\)&[^@a-z]/\1@redr{\&}/g
|
||||
s/\([^{<>^] *\)\([0-9]* *[<>^][<>^]*[^@][a-zA-Z0-9./_-]*\)/\1@redr{\2}/g
|
||||
s/\\}/}\\/g
|
||||
#.
|
||||
@@ -573,9 +599,9 @@ s/[[][0-9$a-zA-Z_;. -]*]/@args{&}/g
|
||||
s/\($[$]*\)\([A-Za-z_0-9][A-Za-z_0-9]*\)/@vars{@optr{\1}\2}/g
|
||||
#.
|
||||
# Files
|
||||
s/\([^@]\)\([A-Za-z0-9_-][A-Za-z0-9_-]*\.[a-z0-9*][a-z0-9*]*\)/\1@fsfo{\2}/g
|
||||
#.
|
||||
:commands
|
||||
/@at/ ! {
|
||||
s/\([A-Za-z0-9_*-][A-Za-z0-9_*-]*\.[a-z0-9*][a-z0-9*]*\)/@fsfo{\1}/g
|
||||
}
|
||||
#.
|
||||
#### This section is built in the Makefile. Just some formatting examples. #####
|
||||
#.
|
||||
|
||||
1471
mimedb.cpp
1471
mimedb.cpp
File diff suppressed because it is too large
Load Diff
@@ -7,9 +7,9 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>fish_term_icon</string>
|
||||
<string>fish_term_icon</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.ridiculousfish.fish-shell</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
@@ -17,15 +17,15 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<string>2.3.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>289.5</string>
|
||||
<string>0.1</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.productivity</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.6</string>
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012, ridiculous_fish
|
||||
All rights reserved.</string>
|
||||
|
||||
68
osx/config.h
68
osx/config.h
@@ -4,12 +4,15 @@
|
||||
/* Define to 1 if you have the `backtrace' function. */
|
||||
#define HAVE_BACKTRACE 1
|
||||
|
||||
/* Define to 1 if you have the `backtrace_symbols' function. */
|
||||
#define HAVE_BACKTRACE_SYMBOLS 1
|
||||
/* Define to 1 if you have the `backtrace_symbols_fd' function. */
|
||||
#define HAVE_BACKTRACE_SYMBOLS_FD 1
|
||||
|
||||
/* Define to 1 one if the implemented fwprintf is broken */
|
||||
/* #undef HAVE_BROKEN_FWPRINTF */
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Define to 1 if you have the <curses.h> header file. */
|
||||
#define HAVE_CURSES_H 1
|
||||
|
||||
@@ -29,6 +32,9 @@
|
||||
/* Define to 1 if you have the `fputwc' function. */
|
||||
#define HAVE_FPUTWC 1
|
||||
|
||||
/* Define to 1 if you have the `futimens' function. */
|
||||
/* #undef HAVE_FUTIMENS */
|
||||
|
||||
/* Define to 1 if you have the `futimes' function. */
|
||||
#define HAVE_FUTIMES 1
|
||||
|
||||
@@ -80,9 +86,6 @@
|
||||
/* Define to 1 if realpath accepts null for its second argument. */
|
||||
#define HAVE_REALPATH_NULL 1
|
||||
|
||||
/* Define to 1 if you have the <regex.h> header file. */
|
||||
#define HAVE_REGEX_H 1
|
||||
|
||||
/* Define to 1 if you have the <siginfo.h> header file. */
|
||||
/* #undef HAVE_SIGINFO_H */
|
||||
|
||||
@@ -194,9 +197,6 @@
|
||||
/* Define to 1 if the winsize struct and TIOCGWINSZ macro exist */
|
||||
#define HAVE_WINSIZE 1
|
||||
|
||||
/* Define to 1 if getopt_long exists and works. */
|
||||
#define HAVE_WORKING_GETOPT_LONG 1
|
||||
|
||||
/* Define to 1 if the _nl_msg_cat_cntr symbol is exported. */
|
||||
/* #undef HAVE__NL_MSG_CAT_CNTR */
|
||||
|
||||
@@ -216,13 +216,13 @@
|
||||
#define NOMACROS 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "fish-users@lists.sf.net"
|
||||
#define PACKAGE_BUGREPORT "fish-users@lists.sourceforge.net"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "fish"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "fish 2.2.0"
|
||||
#define PACKAGE_STRING "fish 2.3.0"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "fish"
|
||||
@@ -231,7 +231,10 @@
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "2.2.0"
|
||||
#define PACKAGE_VERSION "2.3.0"
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
@@ -245,19 +248,60 @@
|
||||
/* Perform string translations with gettext */
|
||||
/* #undef USE_GETTEXT */
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# define _ALL_SOURCE 1
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# define _TANDEM_SOURCE 1
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# define __EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of wchar_t in bits. */
|
||||
#define WCHAR_T_BITS 32
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Macro to enable additional prototypes under BSD */
|
||||
/* #undef _NETBSD_SOURCE */
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Macro to enable additional prototypes under BSD */
|
||||
/* #undef __BSD_VISIBLE */
|
||||
|
||||
/* Macro to enable additional prototypes under Solaris */
|
||||
/* #undef __EXTENSIONS__ */
|
||||
#define __EXTENSIONS__ 1
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
#ifndef __warn_unused
|
||||
#define __warn_unused __attribute__ ((warn_unused_result))
|
||||
#endif
|
||||
#ifndef __sentinel
|
||||
#define __sentinel __attribute__ ((sentinel))
|
||||
#endif
|
||||
#ifndef __packed
|
||||
#define __packed __attribute__ ((packed))
|
||||
#endif
|
||||
#else
|
||||
#define __warn_unused
|
||||
#define __sentinel
|
||||
|
||||
@@ -84,14 +84,15 @@ static void launch_fish_with_applescript(NSString *fish_binary_path)
|
||||
|
||||
/* This approach asks Terminal to open a script that we control */
|
||||
int main(void) {
|
||||
[[NSAutoreleasePool alloc] init];
|
||||
|
||||
/* Get the fish executable. Make sure it's absolute. */
|
||||
NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@"" subdirectory:@"base/bin"];
|
||||
if (! fish_executable)
|
||||
die("Could not find fish executable in bundle");
|
||||
@autoreleasepool {
|
||||
/* Get the fish executable. Make sure it's absolute. */
|
||||
NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@"" subdirectory:@"base/bin"];
|
||||
if (! fish_executable)
|
||||
die("Could not find fish executable in bundle");
|
||||
|
||||
launch_fish_with_applescript([fish_executable path]);
|
||||
launch_fish_with_applescript([fish_executable path]);
|
||||
}
|
||||
|
||||
/* If we succeeded, it will clean itself up */
|
||||
return 0;
|
||||
|
||||
295
osx/pcre2/config.h
Normal file
295
osx/pcre2/config.h
Normal file
@@ -0,0 +1,295 @@
|
||||
/* src/config.h. Generated from config.h.in by configure. */
|
||||
/* src/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
|
||||
/* PCRE2 is written in Standard C, but there are a few non-standard things it
|
||||
can cope with, allowing it to run on SunOS4 and other "close to standard"
|
||||
systems.
|
||||
|
||||
In environments that support the GNU autotools, config.h.in is converted into
|
||||
config.h by the "configure" script. In environments that use CMake,
|
||||
config-cmake.in is converted into config.h. If you are going to build PCRE2 "by
|
||||
hand" without using "configure" or CMake, you should copy the distributed
|
||||
config.h.generic to config.h, and edit the macro definitions to be the way you
|
||||
need them. You must then add -DHAVE_CONFIG_H to all of your compile commands,
|
||||
so that config.h is included at the start of every source.
|
||||
|
||||
Alternatively, you can avoid editing by using -D on the compiler command line
|
||||
to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
|
||||
but if you do, default values will be taken from config.h for non-boolean
|
||||
macros that are not defined on the command line.
|
||||
|
||||
Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE2_8 should either be defined
|
||||
(conventionally to 1) for TRUE, and not defined at all for FALSE. All such
|
||||
macros are listed as a commented #undef in config.h.generic. Macros such as
|
||||
MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
|
||||
surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
|
||||
|
||||
PCRE2 uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
|
||||
HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
|
||||
sure both macros are undefined; an emulation function will then be used. */
|
||||
|
||||
/* By default, the \R escape sequence matches any Unicode line ending
|
||||
character or sequence of characters. If BSR_ANYCRLF is defined (to any
|
||||
value), this is changed so that backslash-R matches only CR, LF, or CRLF.
|
||||
The build-time default can be overridden by the user of PCRE2 at runtime.
|
||||
*/
|
||||
/* #undef BSR_ANYCRLF */
|
||||
|
||||
/* If you are compiling for a system that uses EBCDIC instead of ASCII
|
||||
character codes, define this macro to any value. When EBCDIC is set, PCRE2
|
||||
assumes that all input strings are in EBCDIC. If you do not define this
|
||||
macro, PCRE2 will assume input strings are ASCII or UTF-8/16/32 Unicode. It
|
||||
is not possible to build a version of PCRE2 that supports both EBCDIC and
|
||||
UTF-8/16/32. */
|
||||
/* #undef EBCDIC */
|
||||
|
||||
/* In an EBCDIC environment, define this macro to any value to arrange for the
|
||||
NL character to be 0x25 instead of the default 0x15. NL plays the role that
|
||||
LF does in an ASCII/Unicode environment. */
|
||||
/* #undef EBCDIC_NL25 */
|
||||
|
||||
/* Define to 1 if you have the `bcopy' function. */
|
||||
#define HAVE_BCOPY 1
|
||||
|
||||
/* Define to 1 if you have the <bzlib.h> header file. */
|
||||
#define HAVE_BZLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <editline/readline.h> header file. */
|
||||
/* #undef HAVE_EDITLINE_READLINE_H */
|
||||
|
||||
/* Define to 1 if you have the <edit/readline/readline.h> header file. */
|
||||
/* #undef HAVE_EDIT_READLINE_READLINE_H */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
/* #undef HAVE_PTHREAD */
|
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */
|
||||
/* #undef HAVE_PTHREAD_PRIO_INHERIT */
|
||||
|
||||
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||
/* #undef HAVE_READLINE_HISTORY_H */
|
||||
|
||||
/* Define to 1 if you have the <readline/readline.h> header file. */
|
||||
/* #undef HAVE_READLINE_READLINE_H */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if the compiler supports simple visibility declarations. */
|
||||
#define HAVE_VISIBILITY 1
|
||||
|
||||
/* Define to 1 if you have the <windows.h> header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#define HAVE_ZLIB_H 1
|
||||
|
||||
/* PCRE2 uses recursive function calls to handle backtracking while matching.
|
||||
This can sometimes be a problem on systems that have stacks of limited
|
||||
size. Define HEAP_MATCH_RECURSE to any value to get a version that doesn't
|
||||
use recursion in the match() function; instead it creates its own stack by
|
||||
steam using memory from the heap. For more detail, see the comments and
|
||||
other stuff just above the match() function. */
|
||||
/* #undef HEAP_MATCH_RECURSE */
|
||||
|
||||
/* The value of LINK_SIZE determines the number of bytes used to store links
|
||||
as offsets within the compiled regex. The default is 2, which allows for
|
||||
compiled patterns up to 64K long. This covers the vast majority of cases.
|
||||
However, PCRE2 can also be compiled to use 3 or 4 bytes instead. This
|
||||
allows for longer patterns in extreme cases. */
|
||||
#define LINK_SIZE 2
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* The value of MATCH_LIMIT determines the default number of times the
|
||||
internal match() function can be called during a single execution of
|
||||
pcre2_match(). There is a runtime interface for setting a different limit.
|
||||
The limit exists in order to catch runaway regular expressions that take
|
||||
for ever to determine that they do not match. The default is set very large
|
||||
so that it does not accidentally catch legitimate cases. */
|
||||
#define MATCH_LIMIT 10000000
|
||||
|
||||
/* The above limit applies to all calls of match(), whether or not they
|
||||
increase the recursion depth. In some environments it is desirable to limit
|
||||
the depth of recursive calls of match() more strictly, in order to restrict
|
||||
the maximum amount of stack (or heap, if HEAP_MATCH_RECURSE is defined)
|
||||
that is used. The value of MATCH_LIMIT_RECURSION applies only to recursive
|
||||
calls of match(). To have any useful effect, it must be less than the value
|
||||
of MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. There
|
||||
is a runtime method for setting a different limit. */
|
||||
#define MATCH_LIMIT_RECURSION MATCH_LIMIT
|
||||
|
||||
/* This limit is parameterized just in case anybody ever wants to change it.
|
||||
Care must be taken if it is increased, because it guards against integer
|
||||
overflow caused by enormously large patterns. */
|
||||
#define MAX_NAME_COUNT 10000
|
||||
|
||||
/* This limit is parameterized just in case anybody ever wants to change it.
|
||||
Care must be taken if it is increased, because it guards against integer
|
||||
overflow caused by enormously large patterns. */
|
||||
#define MAX_NAME_SIZE 32
|
||||
|
||||
/* The value of NEWLINE_DEFAULT determines the default newline character
|
||||
sequence. PCRE2 client programs can override this by selecting other values
|
||||
at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), 4 (ANY), and 5
|
||||
(ANYCRLF). */
|
||||
#define NEWLINE_DEFAULT 2
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "pcre2"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "PCRE2"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "PCRE2 10.20"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "pcre2"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "10.20"
|
||||
|
||||
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
|
||||
parentheses (of any kind) in a pattern. This limits the amount of system
|
||||
stack that is used while compiling a pattern. */
|
||||
#define PARENS_NEST_LIMIT 250
|
||||
|
||||
/* The value of PCRE2GREP_BUFSIZE determines the size of buffer used by
|
||||
pcre2grep to hold parts of the file it is searching. This is also the
|
||||
minimum value. The actual amount of memory used by pcre2grep is three times
|
||||
this number, because it allows for the buffering of "before" and "after"
|
||||
lines. */
|
||||
#define PCRE2GREP_BUFSIZE 20480
|
||||
|
||||
/* to make a symbol visible */
|
||||
#define PCRE2POSIX_EXP_DECL extern __attribute__ ((visibility ("default")))
|
||||
|
||||
/* to make a symbol visible */
|
||||
#define PCRE2POSIX_EXP_DEFN extern __attribute__ ((visibility ("default")))
|
||||
|
||||
/* Define to any value to include debugging code. */
|
||||
/* #undef PCRE2_DEBUG */
|
||||
|
||||
/* to make a symbol visible */
|
||||
#define PCRE2_EXP_DECL extern __attribute__ ((visibility ("default")))
|
||||
|
||||
|
||||
/* If you are compiling for a system other than a Unix-like system or
|
||||
Win32, and it needs some magic to be inserted before the definition
|
||||
of a function that is exported by the library, define this macro to
|
||||
contain the relevant magic. If you do not define this macro, a suitable
|
||||
__declspec value is used for Windows systems; in other environments
|
||||
"extern" is used for a C compiler and "extern C" for a C++ compiler.
|
||||
This macro apears at the start of every exported function that is part
|
||||
of the external API. It does not appear on functions that are "external"
|
||||
in the C sense, but which are internal to the library. */
|
||||
#define PCRE2_EXP_DEFN __attribute__ ((visibility ("default")))
|
||||
|
||||
/* Define to any value if linking statically (TODO: make nice with Libtool) */
|
||||
#define PCRE2_STATIC 1
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
/* #undef PTHREAD_CREATE_JOINABLE */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to any value to enable support for Just-In-Time compiling. */
|
||||
/* #undef SUPPORT_JIT */
|
||||
|
||||
/* Define to any value to allow pcre2grep to be linked with libbz2, so that it
|
||||
is able to handle .bz2 files. */
|
||||
/* #undef SUPPORT_LIBBZ2 */
|
||||
|
||||
/* Define to any value to allow pcre2test to be linked with libedit. */
|
||||
/* #undef SUPPORT_LIBEDIT */
|
||||
|
||||
/* Define to any value to allow pcre2test to be linked with libreadline. */
|
||||
/* #undef SUPPORT_LIBREADLINE */
|
||||
|
||||
/* Define to any value to allow pcre2grep to be linked with libz, so that it
|
||||
is able to handle .gz files. */
|
||||
/* #undef SUPPORT_LIBZ */
|
||||
|
||||
/* Define to any value to enable JIT support in pcre2grep. */
|
||||
/* #undef SUPPORT_PCRE2GREP_JIT */
|
||||
|
||||
/* Define to any value to enable the 16 bit PCRE2 library. */
|
||||
/* #undef SUPPORT_PCRE2_16 */
|
||||
|
||||
/* Define to any value to enable the 32 bit PCRE2 library. */
|
||||
#define SUPPORT_PCRE2_32 /**/
|
||||
|
||||
/* Define to any value to enable the 8 bit PCRE2 library. */
|
||||
/* #undef SUPPORT_PCRE2_8 */
|
||||
|
||||
/* Define to any value to enable support for Unicode and UTF encoding. This
|
||||
will work even in an EBCDIC environment, but it is incompatible with the
|
||||
EBCDIC macro. That is, PCRE2 can support *either* EBCDIC code *or*
|
||||
ASCII/Unicode, but not both at once. */
|
||||
#define SUPPORT_UNICODE /**/
|
||||
|
||||
/* Define to any value for valgrind support to find invalid memory reads. */
|
||||
/* #undef SUPPORT_VALGRIND */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "10.20"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
/* #undef int64_t */
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
722
osx/shared_headers/pcre2.h
Normal file
722
osx/shared_headers/pcre2.h
Normal file
@@ -0,0 +1,722 @@
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
||||
/* This is the public header file for the PCRE library, second API, to be
|
||||
#included by applications that call PCRE2 functions.
|
||||
|
||||
Copyright (c) 2016 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _PCRE2_H
|
||||
#define _PCRE2_H
|
||||
|
||||
/* The current PCRE version information. */
|
||||
|
||||
#define PCRE2_MAJOR 10
|
||||
#define PCRE2_MINOR 21
|
||||
#define PCRE2_PRERELEASE
|
||||
#define PCRE2_DATE 2016-01-12
|
||||
|
||||
/* When an application links to a PCRE DLL in Windows, the symbols that are
|
||||
imported have to be identified as such. When building PCRE2, the appropriate
|
||||
export setting is defined in pcre2_internal.h, which includes this file. So we
|
||||
don't change existing definitions of PCRE2_EXP_DECL. */
|
||||
|
||||
#if defined(_WIN32) && !defined(PCRE2_STATIC)
|
||||
# ifndef PCRE2_EXP_DECL
|
||||
# define PCRE2_EXP_DECL extern __declspec(dllimport)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* By default, we use the standard "extern" declarations. */
|
||||
|
||||
#ifndef PCRE2_EXP_DECL
|
||||
# ifdef __cplusplus
|
||||
# define PCRE2_EXP_DECL extern "C"
|
||||
# else
|
||||
# define PCRE2_EXP_DECL extern
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Have to include limits.h, stdlib.h and stdint.h to ensure that size_t and
|
||||
uint8_t, UCHAR_MAX, etc are defined. */
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* Allow for C++ users compiling this directly. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The following option bits can be passed to pcre2_compile(), pcre2_match(),
|
||||
or pcre2_dfa_match(). PCRE2_NO_UTF_CHECK affects only the function to which it
|
||||
is passed. Put these bits at the most significant end of the options word so
|
||||
others can be added next to them */
|
||||
|
||||
#define PCRE2_ANCHORED 0x80000000u
|
||||
#define PCRE2_NO_UTF_CHECK 0x40000000u
|
||||
|
||||
/* The following option bits can be passed only to pcre2_compile(). However,
|
||||
they may affect compilation, JIT compilation, and/or interpretive execution.
|
||||
The following tags indicate which:
|
||||
|
||||
C alters what is compiled by pcre2_compile()
|
||||
J alters what is compiled by pcre2_jit_compile()
|
||||
M is inspected during pcre2_match() execution
|
||||
D is inspected during pcre2_dfa_match() execution
|
||||
*/
|
||||
|
||||
#define PCRE2_ALLOW_EMPTY_CLASS 0x00000001u /* C */
|
||||
#define PCRE2_ALT_BSUX 0x00000002u /* C */
|
||||
#define PCRE2_AUTO_CALLOUT 0x00000004u /* C */
|
||||
#define PCRE2_CASELESS 0x00000008u /* C */
|
||||
#define PCRE2_DOLLAR_ENDONLY 0x00000010u /* J M D */
|
||||
#define PCRE2_DOTALL 0x00000020u /* C */
|
||||
#define PCRE2_DUPNAMES 0x00000040u /* C */
|
||||
#define PCRE2_EXTENDED 0x00000080u /* C */
|
||||
#define PCRE2_FIRSTLINE 0x00000100u /* J M D */
|
||||
#define PCRE2_MATCH_UNSET_BACKREF 0x00000200u /* C J M */
|
||||
#define PCRE2_MULTILINE 0x00000400u /* C */
|
||||
#define PCRE2_NEVER_UCP 0x00000800u /* C */
|
||||
#define PCRE2_NEVER_UTF 0x00001000u /* C */
|
||||
#define PCRE2_NO_AUTO_CAPTURE 0x00002000u /* C */
|
||||
#define PCRE2_NO_AUTO_POSSESS 0x00004000u /* C */
|
||||
#define PCRE2_NO_DOTSTAR_ANCHOR 0x00008000u /* C */
|
||||
#define PCRE2_NO_START_OPTIMIZE 0x00010000u /* J M D */
|
||||
#define PCRE2_UCP 0x00020000u /* C J M D */
|
||||
#define PCRE2_UNGREEDY 0x00040000u /* C */
|
||||
#define PCRE2_UTF 0x00080000u /* C J M D */
|
||||
#define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */
|
||||
#define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */
|
||||
#define PCRE2_ALT_VERBNAMES 0x00400000u /* C */
|
||||
#define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */
|
||||
|
||||
/* These are for pcre2_jit_compile(). */
|
||||
|
||||
#define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */
|
||||
#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
|
||||
#define PCRE2_JIT_PARTIAL_HARD 0x00000004u
|
||||
|
||||
/* These are for pcre2_match(), pcre2_dfa_match(), and pcre2_jit_match(). Note
|
||||
that PCRE2_ANCHORED and PCRE2_NO_UTF_CHECK can also be passed to these
|
||||
functions (though pcre2_jit_match() ignores the latter since it bypasses all
|
||||
sanity checks). */
|
||||
|
||||
#define PCRE2_NOTBOL 0x00000001u
|
||||
#define PCRE2_NOTEOL 0x00000002u
|
||||
#define PCRE2_NOTEMPTY 0x00000004u /* ) These two must be kept */
|
||||
#define PCRE2_NOTEMPTY_ATSTART 0x00000008u /* ) adjacent to each other. */
|
||||
#define PCRE2_PARTIAL_SOFT 0x00000010u
|
||||
#define PCRE2_PARTIAL_HARD 0x00000020u
|
||||
|
||||
/* These are additional options for pcre2_dfa_match(). */
|
||||
|
||||
#define PCRE2_DFA_RESTART 0x00000040u
|
||||
#define PCRE2_DFA_SHORTEST 0x00000080u
|
||||
|
||||
/* These are additional options for pcre2_substitute(). */
|
||||
|
||||
#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u
|
||||
#define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u
|
||||
#define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u
|
||||
#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u
|
||||
#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u
|
||||
|
||||
/* Newline and \R settings, for use in compile contexts. The newline values
|
||||
must be kept in step with values set in config.h and both sets must all be
|
||||
greater than zero. */
|
||||
|
||||
#define PCRE2_NEWLINE_CR 1
|
||||
#define PCRE2_NEWLINE_LF 2
|
||||
#define PCRE2_NEWLINE_CRLF 3
|
||||
#define PCRE2_NEWLINE_ANY 4
|
||||
#define PCRE2_NEWLINE_ANYCRLF 5
|
||||
|
||||
#define PCRE2_BSR_UNICODE 1
|
||||
#define PCRE2_BSR_ANYCRLF 2
|
||||
|
||||
/* Error codes: no match and partial match are "expected" errors. */
|
||||
|
||||
#define PCRE2_ERROR_NOMATCH (-1)
|
||||
#define PCRE2_ERROR_PARTIAL (-2)
|
||||
|
||||
/* Error codes for UTF-8 validity checks */
|
||||
|
||||
#define PCRE2_ERROR_UTF8_ERR1 (-3)
|
||||
#define PCRE2_ERROR_UTF8_ERR2 (-4)
|
||||
#define PCRE2_ERROR_UTF8_ERR3 (-5)
|
||||
#define PCRE2_ERROR_UTF8_ERR4 (-6)
|
||||
#define PCRE2_ERROR_UTF8_ERR5 (-7)
|
||||
#define PCRE2_ERROR_UTF8_ERR6 (-8)
|
||||
#define PCRE2_ERROR_UTF8_ERR7 (-9)
|
||||
#define PCRE2_ERROR_UTF8_ERR8 (-10)
|
||||
#define PCRE2_ERROR_UTF8_ERR9 (-11)
|
||||
#define PCRE2_ERROR_UTF8_ERR10 (-12)
|
||||
#define PCRE2_ERROR_UTF8_ERR11 (-13)
|
||||
#define PCRE2_ERROR_UTF8_ERR12 (-14)
|
||||
#define PCRE2_ERROR_UTF8_ERR13 (-15)
|
||||
#define PCRE2_ERROR_UTF8_ERR14 (-16)
|
||||
#define PCRE2_ERROR_UTF8_ERR15 (-17)
|
||||
#define PCRE2_ERROR_UTF8_ERR16 (-18)
|
||||
#define PCRE2_ERROR_UTF8_ERR17 (-19)
|
||||
#define PCRE2_ERROR_UTF8_ERR18 (-20)
|
||||
#define PCRE2_ERROR_UTF8_ERR19 (-21)
|
||||
#define PCRE2_ERROR_UTF8_ERR20 (-22)
|
||||
#define PCRE2_ERROR_UTF8_ERR21 (-23)
|
||||
|
||||
/* Error codes for UTF-16 validity checks */
|
||||
|
||||
#define PCRE2_ERROR_UTF16_ERR1 (-24)
|
||||
#define PCRE2_ERROR_UTF16_ERR2 (-25)
|
||||
#define PCRE2_ERROR_UTF16_ERR3 (-26)
|
||||
|
||||
/* Error codes for UTF-32 validity checks */
|
||||
|
||||
#define PCRE2_ERROR_UTF32_ERR1 (-27)
|
||||
#define PCRE2_ERROR_UTF32_ERR2 (-28)
|
||||
|
||||
/* Error codes for pcre2[_dfa]_match(), substring extraction functions, context
|
||||
functions, and serializing functions. They are in numerical order. Originally
|
||||
they were in alphabetical order too, but now that PCRE2 is released, the
|
||||
numbers must not be changed. */
|
||||
|
||||
#define PCRE2_ERROR_BADDATA (-29)
|
||||
#define PCRE2_ERROR_MIXEDTABLES (-30) /* Name was changed */
|
||||
#define PCRE2_ERROR_BADMAGIC (-31)
|
||||
#define PCRE2_ERROR_BADMODE (-32)
|
||||
#define PCRE2_ERROR_BADOFFSET (-33)
|
||||
#define PCRE2_ERROR_BADOPTION (-34)
|
||||
#define PCRE2_ERROR_BADREPLACEMENT (-35)
|
||||
#define PCRE2_ERROR_BADUTFOFFSET (-36)
|
||||
#define PCRE2_ERROR_CALLOUT (-37) /* Never used by PCRE2 itself */
|
||||
#define PCRE2_ERROR_DFA_BADRESTART (-38)
|
||||
#define PCRE2_ERROR_DFA_RECURSE (-39)
|
||||
#define PCRE2_ERROR_DFA_UCOND (-40)
|
||||
#define PCRE2_ERROR_DFA_UFUNC (-41)
|
||||
#define PCRE2_ERROR_DFA_UITEM (-42)
|
||||
#define PCRE2_ERROR_DFA_WSSIZE (-43)
|
||||
#define PCRE2_ERROR_INTERNAL (-44)
|
||||
#define PCRE2_ERROR_JIT_BADOPTION (-45)
|
||||
#define PCRE2_ERROR_JIT_STACKLIMIT (-46)
|
||||
#define PCRE2_ERROR_MATCHLIMIT (-47)
|
||||
#define PCRE2_ERROR_NOMEMORY (-48)
|
||||
#define PCRE2_ERROR_NOSUBSTRING (-49)
|
||||
#define PCRE2_ERROR_NOUNIQUESUBSTRING (-50)
|
||||
#define PCRE2_ERROR_NULL (-51)
|
||||
#define PCRE2_ERROR_RECURSELOOP (-52)
|
||||
#define PCRE2_ERROR_RECURSIONLIMIT (-53)
|
||||
#define PCRE2_ERROR_UNAVAILABLE (-54)
|
||||
#define PCRE2_ERROR_UNSET (-55)
|
||||
#define PCRE2_ERROR_BADOFFSETLIMIT (-56)
|
||||
#define PCRE2_ERROR_BADREPESCAPE (-57)
|
||||
#define PCRE2_ERROR_REPMISSINGBRACE (-58)
|
||||
#define PCRE2_ERROR_BADSUBSTITUTION (-59)
|
||||
#define PCRE2_ERROR_BADSUBSPATTERN (-60)
|
||||
#define PCRE2_ERROR_TOOMANYREPLACE (-61)
|
||||
|
||||
/* Request types for pcre2_pattern_info() */
|
||||
|
||||
#define PCRE2_INFO_ALLOPTIONS 0
|
||||
#define PCRE2_INFO_ARGOPTIONS 1
|
||||
#define PCRE2_INFO_BACKREFMAX 2
|
||||
#define PCRE2_INFO_BSR 3
|
||||
#define PCRE2_INFO_CAPTURECOUNT 4
|
||||
#define PCRE2_INFO_FIRSTCODEUNIT 5
|
||||
#define PCRE2_INFO_FIRSTCODETYPE 6
|
||||
#define PCRE2_INFO_FIRSTBITMAP 7
|
||||
#define PCRE2_INFO_HASCRORLF 8
|
||||
#define PCRE2_INFO_JCHANGED 9
|
||||
#define PCRE2_INFO_JITSIZE 10
|
||||
#define PCRE2_INFO_LASTCODEUNIT 11
|
||||
#define PCRE2_INFO_LASTCODETYPE 12
|
||||
#define PCRE2_INFO_MATCHEMPTY 13
|
||||
#define PCRE2_INFO_MATCHLIMIT 14
|
||||
#define PCRE2_INFO_MAXLOOKBEHIND 15
|
||||
#define PCRE2_INFO_MINLENGTH 16
|
||||
#define PCRE2_INFO_NAMECOUNT 17
|
||||
#define PCRE2_INFO_NAMEENTRYSIZE 18
|
||||
#define PCRE2_INFO_NAMETABLE 19
|
||||
#define PCRE2_INFO_NEWLINE 20
|
||||
#define PCRE2_INFO_RECURSIONLIMIT 21
|
||||
#define PCRE2_INFO_SIZE 22
|
||||
#define PCRE2_INFO_HASBACKSLASHC 23
|
||||
|
||||
/* Request types for pcre2_config(). */
|
||||
|
||||
#define PCRE2_CONFIG_BSR 0
|
||||
#define PCRE2_CONFIG_JIT 1
|
||||
#define PCRE2_CONFIG_JITTARGET 2
|
||||
#define PCRE2_CONFIG_LINKSIZE 3
|
||||
#define PCRE2_CONFIG_MATCHLIMIT 4
|
||||
#define PCRE2_CONFIG_NEWLINE 5
|
||||
#define PCRE2_CONFIG_PARENSLIMIT 6
|
||||
#define PCRE2_CONFIG_RECURSIONLIMIT 7
|
||||
#define PCRE2_CONFIG_STACKRECURSE 8
|
||||
#define PCRE2_CONFIG_UNICODE 9
|
||||
#define PCRE2_CONFIG_UNICODE_VERSION 10
|
||||
#define PCRE2_CONFIG_VERSION 11
|
||||
|
||||
/* Types for code units in patterns and subject strings. */
|
||||
|
||||
typedef uint8_t PCRE2_UCHAR8;
|
||||
typedef uint16_t PCRE2_UCHAR16;
|
||||
typedef uint32_t PCRE2_UCHAR32;
|
||||
|
||||
typedef const PCRE2_UCHAR8 *PCRE2_SPTR8;
|
||||
typedef const PCRE2_UCHAR16 *PCRE2_SPTR16;
|
||||
typedef const PCRE2_UCHAR32 *PCRE2_SPTR32;
|
||||
|
||||
/* The PCRE2_SIZE type is used for all string lengths and offsets in PCRE2,
|
||||
including pattern offsets for errors and subject offsets after a match. We
|
||||
define special values to indicate zero-terminated strings and unset offsets in
|
||||
the offset vector (ovector). */
|
||||
|
||||
#define PCRE2_SIZE size_t
|
||||
#define PCRE2_SIZE_MAX SIZE_MAX
|
||||
#define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0)
|
||||
#define PCRE2_UNSET (~(PCRE2_SIZE)0)
|
||||
|
||||
/* Generic types for opaque structures and JIT callback functions. These
|
||||
declarations are defined in a macro that is expanded for each width later. */
|
||||
|
||||
#define PCRE2_TYPES_LIST \
|
||||
struct pcre2_real_general_context; \
|
||||
typedef struct pcre2_real_general_context pcre2_general_context; \
|
||||
\
|
||||
struct pcre2_real_compile_context; \
|
||||
typedef struct pcre2_real_compile_context pcre2_compile_context; \
|
||||
\
|
||||
struct pcre2_real_match_context; \
|
||||
typedef struct pcre2_real_match_context pcre2_match_context; \
|
||||
\
|
||||
struct pcre2_real_code; \
|
||||
typedef struct pcre2_real_code pcre2_code; \
|
||||
\
|
||||
struct pcre2_real_match_data; \
|
||||
typedef struct pcre2_real_match_data pcre2_match_data; \
|
||||
\
|
||||
struct pcre2_real_jit_stack; \
|
||||
typedef struct pcre2_real_jit_stack pcre2_jit_stack; \
|
||||
\
|
||||
typedef pcre2_jit_stack *(*pcre2_jit_callback)(void *);
|
||||
|
||||
|
||||
/* The structure for passing out data via the pcre_callout_function. We use a
|
||||
structure so that new fields can be added on the end in future versions,
|
||||
without changing the API of the function, thereby allowing old clients to work
|
||||
without modification. Define the generic version in a macro; the width-specific
|
||||
versions are generated from this macro below. */
|
||||
|
||||
#define PCRE2_STRUCTURE_LIST \
|
||||
typedef struct pcre2_callout_block { \
|
||||
uint32_t version; /* Identifies version of block */ \
|
||||
/* ------------------------ Version 0 ------------------------------- */ \
|
||||
uint32_t callout_number; /* Number compiled into pattern */ \
|
||||
uint32_t capture_top; /* Max current capture */ \
|
||||
uint32_t capture_last; /* Most recently closed capture */ \
|
||||
PCRE2_SIZE *offset_vector; /* The offset vector */ \
|
||||
PCRE2_SPTR mark; /* Pointer to current mark or NULL */ \
|
||||
PCRE2_SPTR subject; /* The subject being matched */ \
|
||||
PCRE2_SIZE subject_length; /* The length of the subject */ \
|
||||
PCRE2_SIZE start_match; /* Offset to start of this match attempt */ \
|
||||
PCRE2_SIZE current_position; /* Where we currently are in the subject */ \
|
||||
PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
|
||||
PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
|
||||
/* ------------------- Added for Version 1 -------------------------- */ \
|
||||
PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
|
||||
PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
|
||||
PCRE2_SPTR callout_string; /* String compiled into pattern */ \
|
||||
/* ------------------------------------------------------------------ */ \
|
||||
} pcre2_callout_block; \
|
||||
\
|
||||
typedef struct pcre2_callout_enumerate_block { \
|
||||
uint32_t version; /* Identifies version of block */ \
|
||||
/* ------------------------ Version 0 ------------------------------- */ \
|
||||
PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
|
||||
PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
|
||||
uint32_t callout_number; /* Number compiled into pattern */ \
|
||||
PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
|
||||
PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
|
||||
PCRE2_SPTR callout_string; /* String compiled into pattern */ \
|
||||
/* ------------------------------------------------------------------ */ \
|
||||
} pcre2_callout_enumerate_block;
|
||||
|
||||
|
||||
/* List the generic forms of all other functions in macros, which will be
|
||||
expanded for each width below. Start with functions that give general
|
||||
information. */
|
||||
|
||||
#define PCRE2_GENERAL_INFO_FUNCTIONS \
|
||||
PCRE2_EXP_DECL int pcre2_config(uint32_t, void *);
|
||||
|
||||
|
||||
/* Functions for manipulating contexts. */
|
||||
|
||||
#define PCRE2_GENERAL_CONTEXT_FUNCTIONS \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_general_context *pcre2_general_context_copy(pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_general_context *pcre2_general_context_create( \
|
||||
void *(*)(PCRE2_SIZE, void *), \
|
||||
void (*)(void *, void *), void *); \
|
||||
PCRE2_EXP_DECL void pcre2_general_context_free(pcre2_general_context *);
|
||||
|
||||
#define PCRE2_COMPILE_CONTEXT_FUNCTIONS \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_compile_context *pcre2_compile_context_copy(pcre2_compile_context *); \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_compile_context *pcre2_compile_context_create(pcre2_general_context *);\
|
||||
PCRE2_EXP_DECL void pcre2_compile_context_free(pcre2_compile_context *); \
|
||||
PCRE2_EXP_DECL int pcre2_set_bsr(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int pcre2_set_character_tables(pcre2_compile_context *, \
|
||||
const unsigned char *); \
|
||||
PCRE2_EXP_DECL int pcre2_set_max_pattern_length(pcre2_compile_context *, \
|
||||
PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL int pcre2_set_newline(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int pcre2_set_parens_nest_limit(pcre2_compile_context *, \
|
||||
uint32_t); \
|
||||
PCRE2_EXP_DECL int pcre2_set_compile_recursion_guard(\
|
||||
pcre2_compile_context *, int (*)(uint32_t, void *), \
|
||||
void *);
|
||||
|
||||
#define PCRE2_MATCH_CONTEXT_FUNCTIONS \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_match_context *pcre2_match_context_copy(pcre2_match_context *); \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_match_context *pcre2_match_context_create(pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL void pcre2_match_context_free(pcre2_match_context *); \
|
||||
PCRE2_EXP_DECL int pcre2_set_callout(pcre2_match_context *, \
|
||||
int (*)(pcre2_callout_block *, void *), void *); \
|
||||
PCRE2_EXP_DECL int pcre2_set_match_limit(pcre2_match_context *, \
|
||||
uint32_t); \
|
||||
PCRE2_EXP_DECL int pcre2_set_offset_limit(pcre2_match_context *, \
|
||||
PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL int pcre2_set_recursion_limit(pcre2_match_context *, \
|
||||
uint32_t); \
|
||||
PCRE2_EXP_DECL int pcre2_set_recursion_memory_management( \
|
||||
pcre2_match_context *, void *(*)(PCRE2_SIZE, void *), \
|
||||
void (*)(void *, void *), void *);
|
||||
|
||||
|
||||
/* Functions concerned with compiling a pattern to PCRE internal code. */
|
||||
|
||||
#define PCRE2_COMPILE_FUNCTIONS \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_code *pcre2_compile(PCRE2_SPTR, PCRE2_SIZE, uint32_t, \
|
||||
int *, PCRE2_SIZE *, pcre2_compile_context *); \
|
||||
PCRE2_EXP_DECL void pcre2_code_free(pcre2_code *);
|
||||
|
||||
|
||||
/* Functions that give information about a compiled pattern. */
|
||||
|
||||
#define PCRE2_PATTERN_INFO_FUNCTIONS \
|
||||
PCRE2_EXP_DECL int pcre2_pattern_info(const pcre2_code *, uint32_t, \
|
||||
void *); \
|
||||
PCRE2_EXP_DECL int pcre2_callout_enumerate(const pcre2_code *, \
|
||||
int (*)(pcre2_callout_enumerate_block *, void *), \
|
||||
void *);
|
||||
|
||||
|
||||
/* Functions for running a match and inspecting the result. */
|
||||
|
||||
#define PCRE2_MATCH_FUNCTIONS \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_match_data *pcre2_match_data_create(uint32_t, \
|
||||
pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_match_data *pcre2_match_data_create_from_pattern(\
|
||||
const pcre2_code *, \
|
||||
pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL int pcre2_dfa_match(const pcre2_code *, PCRE2_SPTR, \
|
||||
PCRE2_SIZE, PCRE2_SIZE, uint32_t, \
|
||||
pcre2_match_data *, pcre2_match_context *, int *, \
|
||||
PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL int pcre2_match(const pcre2_code *, \
|
||||
PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, uint32_t, \
|
||||
pcre2_match_data *, pcre2_match_context *); \
|
||||
PCRE2_EXP_DECL void pcre2_match_data_free(pcre2_match_data *); \
|
||||
PCRE2_EXP_DECL PCRE2_SPTR pcre2_get_mark(pcre2_match_data *); \
|
||||
PCRE2_EXP_DECL uint32_t pcre2_get_ovector_count(pcre2_match_data *); \
|
||||
PCRE2_EXP_DECL PCRE2_SIZE *pcre2_get_ovector_pointer(pcre2_match_data *); \
|
||||
PCRE2_EXP_DECL PCRE2_SIZE pcre2_get_startchar(pcre2_match_data *);
|
||||
|
||||
|
||||
/* Convenience functions for handling matched substrings. */
|
||||
|
||||
#define PCRE2_SUBSTRING_FUNCTIONS \
|
||||
PCRE2_EXP_DECL int pcre2_substring_copy_byname(pcre2_match_data *, \
|
||||
PCRE2_SPTR, PCRE2_UCHAR *, PCRE2_SIZE *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_copy_bynumber(pcre2_match_data *, \
|
||||
uint32_t, PCRE2_UCHAR *, PCRE2_SIZE *); \
|
||||
PCRE2_EXP_DECL void pcre2_substring_free(PCRE2_UCHAR *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_get_byname(pcre2_match_data *, \
|
||||
PCRE2_SPTR, PCRE2_UCHAR **, PCRE2_SIZE *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_get_bynumber(pcre2_match_data *, \
|
||||
uint32_t, PCRE2_UCHAR **, PCRE2_SIZE *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_length_byname(pcre2_match_data *, \
|
||||
PCRE2_SPTR, PCRE2_SIZE *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_length_bynumber(pcre2_match_data *, \
|
||||
uint32_t, PCRE2_SIZE *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_nametable_scan(const pcre2_code *, \
|
||||
PCRE2_SPTR, PCRE2_SPTR *, PCRE2_SPTR *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_number_from_name(\
|
||||
const pcre2_code *, PCRE2_SPTR); \
|
||||
PCRE2_EXP_DECL void pcre2_substring_list_free(PCRE2_SPTR *); \
|
||||
PCRE2_EXP_DECL int pcre2_substring_list_get(pcre2_match_data *, \
|
||||
PCRE2_UCHAR ***, PCRE2_SIZE **);
|
||||
|
||||
/* Functions for serializing / deserializing compiled patterns. */
|
||||
|
||||
#define PCRE2_SERIALIZE_FUNCTIONS \
|
||||
PCRE2_EXP_DECL int32_t pcre2_serialize_encode(const pcre2_code **, \
|
||||
int32_t, uint8_t **, PCRE2_SIZE *, \
|
||||
pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL int32_t pcre2_serialize_decode(pcre2_code **, int32_t, \
|
||||
const uint8_t *, pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL int32_t pcre2_serialize_get_number_of_codes(const uint8_t *); \
|
||||
PCRE2_EXP_DECL void pcre2_serialize_free(uint8_t *);
|
||||
|
||||
|
||||
/* Convenience function for match + substitute. */
|
||||
|
||||
#define PCRE2_SUBSTITUTE_FUNCTION \
|
||||
PCRE2_EXP_DECL int pcre2_substitute(const pcre2_code *, \
|
||||
PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, uint32_t, \
|
||||
pcre2_match_data *, pcre2_match_context *, \
|
||||
PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *, \
|
||||
PCRE2_SIZE *);
|
||||
|
||||
|
||||
/* Functions for JIT processing */
|
||||
|
||||
#define PCRE2_JIT_FUNCTIONS \
|
||||
PCRE2_EXP_DECL int pcre2_jit_compile(pcre2_code *, uint32_t); \
|
||||
PCRE2_EXP_DECL int pcre2_jit_match(const pcre2_code *, \
|
||||
PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, uint32_t, \
|
||||
pcre2_match_data *, pcre2_match_context *); \
|
||||
PCRE2_EXP_DECL void pcre2_jit_free_unused_memory(pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL \
|
||||
pcre2_jit_stack *pcre2_jit_stack_create(PCRE2_SIZE, PCRE2_SIZE, \
|
||||
pcre2_general_context *); \
|
||||
PCRE2_EXP_DECL void pcre2_jit_stack_assign(pcre2_match_context *, \
|
||||
pcre2_jit_callback, void *); \
|
||||
PCRE2_EXP_DECL void pcre2_jit_stack_free(pcre2_jit_stack *);
|
||||
|
||||
|
||||
/* Other miscellaneous functions. */
|
||||
|
||||
#define PCRE2_OTHER_FUNCTIONS \
|
||||
PCRE2_EXP_DECL int pcre2_get_error_message(int, PCRE2_UCHAR *, PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL \
|
||||
const uint8_t *pcre2_maketables(pcre2_general_context *); \
|
||||
|
||||
|
||||
/* Define macros that generate width-specific names from generic versions. The
|
||||
three-level macro scheme is necessary to get the macros expanded when we want
|
||||
them to be. First we get the width from PCRE2_LOCAL_WIDTH, which is used for
|
||||
generating three versions of everything below. After that, PCRE2_SUFFIX will be
|
||||
re-defined to use PCRE2_CODE_UNIT_WIDTH, for use when macros such as
|
||||
pcre2_compile are called by application code. */
|
||||
|
||||
#define PCRE2_JOIN(a,b) a ## b
|
||||
#define PCRE2_GLUE(a,b) PCRE2_JOIN(a,b)
|
||||
#define PCRE2_SUFFIX(a) PCRE2_GLUE(a,PCRE2_LOCAL_WIDTH)
|
||||
|
||||
|
||||
/* Data types */
|
||||
|
||||
#define PCRE2_UCHAR PCRE2_SUFFIX(PCRE2_UCHAR)
|
||||
#define PCRE2_SPTR PCRE2_SUFFIX(PCRE2_SPTR)
|
||||
|
||||
#define pcre2_code PCRE2_SUFFIX(pcre2_code_)
|
||||
#define pcre2_jit_callback PCRE2_SUFFIX(pcre2_jit_callback_)
|
||||
#define pcre2_jit_stack PCRE2_SUFFIX(pcre2_jit_stack_)
|
||||
|
||||
#define pcre2_real_code PCRE2_SUFFIX(pcre2_real_code_)
|
||||
#define pcre2_real_general_context PCRE2_SUFFIX(pcre2_real_general_context_)
|
||||
#define pcre2_real_compile_context PCRE2_SUFFIX(pcre2_real_compile_context_)
|
||||
#define pcre2_real_match_context PCRE2_SUFFIX(pcre2_real_match_context_)
|
||||
#define pcre2_real_jit_stack PCRE2_SUFFIX(pcre2_real_jit_stack_)
|
||||
#define pcre2_real_match_data PCRE2_SUFFIX(pcre2_real_match_data_)
|
||||
|
||||
|
||||
/* Data blocks */
|
||||
|
||||
#define pcre2_callout_block PCRE2_SUFFIX(pcre2_callout_block_)
|
||||
#define pcre2_callout_enumerate_block PCRE2_SUFFIX(pcre2_callout_enumerate_block_)
|
||||
#define pcre2_general_context PCRE2_SUFFIX(pcre2_general_context_)
|
||||
#define pcre2_compile_context PCRE2_SUFFIX(pcre2_compile_context_)
|
||||
#define pcre2_match_context PCRE2_SUFFIX(pcre2_match_context_)
|
||||
#define pcre2_match_data PCRE2_SUFFIX(pcre2_match_data_)
|
||||
|
||||
|
||||
/* Functions: the complete list in alphabetical order */
|
||||
|
||||
#define pcre2_callout_enumerate PCRE2_SUFFIX(pcre2_callout_enumerate_)
|
||||
#define pcre2_code_free PCRE2_SUFFIX(pcre2_code_free_)
|
||||
#define pcre2_compile PCRE2_SUFFIX(pcre2_compile_)
|
||||
#define pcre2_compile_context_copy PCRE2_SUFFIX(pcre2_compile_context_copy_)
|
||||
#define pcre2_compile_context_create PCRE2_SUFFIX(pcre2_compile_context_create_)
|
||||
#define pcre2_compile_context_free PCRE2_SUFFIX(pcre2_compile_context_free_)
|
||||
#define pcre2_config PCRE2_SUFFIX(pcre2_config_)
|
||||
#define pcre2_dfa_match PCRE2_SUFFIX(pcre2_dfa_match_)
|
||||
#define pcre2_general_context_copy PCRE2_SUFFIX(pcre2_general_context_copy_)
|
||||
#define pcre2_general_context_create PCRE2_SUFFIX(pcre2_general_context_create_)
|
||||
#define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_)
|
||||
#define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_)
|
||||
#define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_)
|
||||
#define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_)
|
||||
#define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_)
|
||||
#define pcre2_get_startchar PCRE2_SUFFIX(pcre2_get_startchar_)
|
||||
#define pcre2_jit_compile PCRE2_SUFFIX(pcre2_jit_compile_)
|
||||
#define pcre2_jit_match PCRE2_SUFFIX(pcre2_jit_match_)
|
||||
#define pcre2_jit_free_unused_memory PCRE2_SUFFIX(pcre2_jit_free_unused_memory_)
|
||||
#define pcre2_jit_stack_assign PCRE2_SUFFIX(pcre2_jit_stack_assign_)
|
||||
#define pcre2_jit_stack_create PCRE2_SUFFIX(pcre2_jit_stack_create_)
|
||||
#define pcre2_jit_stack_free PCRE2_SUFFIX(pcre2_jit_stack_free_)
|
||||
#define pcre2_maketables PCRE2_SUFFIX(pcre2_maketables_)
|
||||
#define pcre2_match PCRE2_SUFFIX(pcre2_match_)
|
||||
#define pcre2_match_context_copy PCRE2_SUFFIX(pcre2_match_context_copy_)
|
||||
#define pcre2_match_context_create PCRE2_SUFFIX(pcre2_match_context_create_)
|
||||
#define pcre2_match_context_free PCRE2_SUFFIX(pcre2_match_context_free_)
|
||||
#define pcre2_match_data_create PCRE2_SUFFIX(pcre2_match_data_create_)
|
||||
#define pcre2_match_data_create_from_pattern PCRE2_SUFFIX(pcre2_match_data_create_from_pattern_)
|
||||
#define pcre2_match_data_free PCRE2_SUFFIX(pcre2_match_data_free_)
|
||||
#define pcre2_pattern_info PCRE2_SUFFIX(pcre2_pattern_info_)
|
||||
#define pcre2_serialize_decode PCRE2_SUFFIX(pcre2_serialize_decode_)
|
||||
#define pcre2_serialize_encode PCRE2_SUFFIX(pcre2_serialize_encode_)
|
||||
#define pcre2_serialize_free PCRE2_SUFFIX(pcre2_serialize_free_)
|
||||
#define pcre2_serialize_get_number_of_codes PCRE2_SUFFIX(pcre2_serialize_get_number_of_codes_)
|
||||
#define pcre2_set_bsr PCRE2_SUFFIX(pcre2_set_bsr_)
|
||||
#define pcre2_set_callout PCRE2_SUFFIX(pcre2_set_callout_)
|
||||
#define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_)
|
||||
#define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_)
|
||||
#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
|
||||
#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
|
||||
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
|
||||
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
|
||||
#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
|
||||
#define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_)
|
||||
#define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_)
|
||||
#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
|
||||
#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
|
||||
#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)
|
||||
#define pcre2_substring_free PCRE2_SUFFIX(pcre2_substring_free_)
|
||||
#define pcre2_substring_get_byname PCRE2_SUFFIX(pcre2_substring_get_byname_)
|
||||
#define pcre2_substring_get_bynumber PCRE2_SUFFIX(pcre2_substring_get_bynumber_)
|
||||
#define pcre2_substring_length_byname PCRE2_SUFFIX(pcre2_substring_length_byname_)
|
||||
#define pcre2_substring_length_bynumber PCRE2_SUFFIX(pcre2_substring_length_bynumber_)
|
||||
#define pcre2_substring_list_get PCRE2_SUFFIX(pcre2_substring_list_get_)
|
||||
#define pcre2_substring_list_free PCRE2_SUFFIX(pcre2_substring_list_free_)
|
||||
#define pcre2_substring_nametable_scan PCRE2_SUFFIX(pcre2_substring_nametable_scan_)
|
||||
#define pcre2_substring_number_from_name PCRE2_SUFFIX(pcre2_substring_number_from_name_)
|
||||
|
||||
|
||||
/* Now generate all three sets of width-specific structures and function
|
||||
prototypes. */
|
||||
|
||||
#define PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS \
|
||||
PCRE2_TYPES_LIST \
|
||||
PCRE2_STRUCTURE_LIST \
|
||||
PCRE2_GENERAL_INFO_FUNCTIONS \
|
||||
PCRE2_GENERAL_CONTEXT_FUNCTIONS \
|
||||
PCRE2_COMPILE_CONTEXT_FUNCTIONS \
|
||||
PCRE2_MATCH_CONTEXT_FUNCTIONS \
|
||||
PCRE2_COMPILE_FUNCTIONS \
|
||||
PCRE2_PATTERN_INFO_FUNCTIONS \
|
||||
PCRE2_MATCH_FUNCTIONS \
|
||||
PCRE2_SUBSTRING_FUNCTIONS \
|
||||
PCRE2_SERIALIZE_FUNCTIONS \
|
||||
PCRE2_SUBSTITUTE_FUNCTION \
|
||||
PCRE2_JIT_FUNCTIONS \
|
||||
PCRE2_OTHER_FUNCTIONS
|
||||
|
||||
#define PCRE2_LOCAL_WIDTH 8
|
||||
PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
|
||||
#undef PCRE2_LOCAL_WIDTH
|
||||
|
||||
#define PCRE2_LOCAL_WIDTH 16
|
||||
PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
|
||||
#undef PCRE2_LOCAL_WIDTH
|
||||
|
||||
#define PCRE2_LOCAL_WIDTH 32
|
||||
PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
|
||||
#undef PCRE2_LOCAL_WIDTH
|
||||
|
||||
/* Undefine the list macros; they are no longer needed. */
|
||||
|
||||
#undef PCRE2_TYPES_LIST
|
||||
#undef PCRE2_STRUCTURE_LIST
|
||||
#undef PCRE2_GENERAL_INFO_FUNCTIONS
|
||||
#undef PCRE2_GENERAL_CONTEXT_FUNCTIONS
|
||||
#undef PCRE2_COMPILE_CONTEXT_FUNCTIONS
|
||||
#undef PCRE2_MATCH_CONTEXT_FUNCTIONS
|
||||
#undef PCRE2_COMPILE_FUNCTIONS
|
||||
#undef PCRE2_PATTERN_INFO_FUNCTIONS
|
||||
#undef PCRE2_MATCH_FUNCTIONS
|
||||
#undef PCRE2_SUBSTRING_FUNCTIONS
|
||||
#undef PCRE2_SERIALIZE_FUNCTIONS
|
||||
#undef PCRE2_SUBSTITUTE_FUNCTION
|
||||
#undef PCRE2_JIT_FUNCTIONS
|
||||
#undef PCRE2_OTHER_FUNCTIONS
|
||||
#undef PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
|
||||
|
||||
/* PCRE2_CODE_UNIT_WIDTH must be defined. If it is 8, 16, or 32, redefine
|
||||
PCRE2_SUFFIX to use it. If it is 0, undefine the other macros and make
|
||||
PCRE2_SUFFIX a no-op. Otherwise, generate an error. */
|
||||
|
||||
#undef PCRE2_SUFFIX
|
||||
#ifndef PCRE2_CODE_UNIT_WIDTH
|
||||
#error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h.
|
||||
#error Use 8, 16, or 32; or 0 for a multi-width application.
|
||||
#else /* PCRE2_CODE_UNIT_WIDTH is defined */
|
||||
#if PCRE2_CODE_UNIT_WIDTH == 8 || \
|
||||
PCRE2_CODE_UNIT_WIDTH == 16 || \
|
||||
PCRE2_CODE_UNIT_WIDTH == 32
|
||||
#define PCRE2_SUFFIX(a) PCRE2_GLUE(a, PCRE2_CODE_UNIT_WIDTH)
|
||||
#elif PCRE2_CODE_UNIT_WIDTH == 0
|
||||
#undef PCRE2_JOIN
|
||||
#undef PCRE2_GLUE
|
||||
#define PCRE2_SUFFIX(a) a
|
||||
#else
|
||||
#error PCRE2_CODE_UNIT_WIDTH must be 0, 8, 16, or 32.
|
||||
#endif
|
||||
#endif /* PCRE2_CODE_UNIT_WIDTH is defined */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* End of pcre2.h */
|
||||
15
pcre2-10.21/.gitignore
vendored
Normal file
15
pcre2-10.21/.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
!config.h.in
|
||||
!configure
|
||||
!doc/
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs/
|
||||
*.la
|
||||
*.lo
|
||||
*.pc
|
||||
libtool
|
||||
pcre2_chartables.c
|
||||
pcre2-config
|
||||
pcre2test
|
||||
pcre2.h
|
||||
stamp-h1
|
||||
313
pcre2-10.21/132html
Executable file
313
pcre2-10.21/132html
Executable file
@@ -0,0 +1,313 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Script to turn PCRE2 man pages into HTML
|
||||
|
||||
|
||||
# Subroutine to handle font changes and other escapes
|
||||
|
||||
sub do_line {
|
||||
my($s) = $_[0];
|
||||
|
||||
$s =~ s/</</g; # Deal with < and >
|
||||
$s =~ s/>/>/g;
|
||||
$s =~ s"\\fI(.*?)\\f[RP]"<i>$1</i>"g;
|
||||
$s =~ s"\\fB(.*?)\\f[RP]"<b>$1</b>"g;
|
||||
$s =~ s"\\e"\\"g;
|
||||
$s =~ s/(?<=Copyright )\(c\)/©/g;
|
||||
$s;
|
||||
}
|
||||
|
||||
# Subroutine to ensure not in a paragraph
|
||||
|
||||
sub end_para {
|
||||
if ($inpara)
|
||||
{
|
||||
print TEMP "</PRE>\n" if ($inpre);
|
||||
print TEMP "</P>\n";
|
||||
}
|
||||
$inpara = $inpre = 0;
|
||||
$wrotetext = 0;
|
||||
}
|
||||
|
||||
# Subroutine to start a new paragraph
|
||||
|
||||
sub new_para {
|
||||
&end_para();
|
||||
print TEMP "<P>\n";
|
||||
$inpara = 1;
|
||||
}
|
||||
|
||||
|
||||
# Main program
|
||||
|
||||
$innf = 0;
|
||||
$inpara = 0;
|
||||
$inpre = 0;
|
||||
$wrotetext = 0;
|
||||
$toc = 0;
|
||||
$ref = 1;
|
||||
|
||||
while ($#ARGV >= 0 && $ARGV[0] =~ /^-/)
|
||||
{
|
||||
$toc = 1 if $ARGV[0] eq "-toc";
|
||||
shift;
|
||||
}
|
||||
|
||||
# Initial output to STDOUT
|
||||
|
||||
print <<End ;
|
||||
<html>
|
||||
<head>
|
||||
<title>$ARGV[0] specification</title>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
|
||||
<h1>$ARGV[0] man page</h1>
|
||||
<p>
|
||||
Return to the <a href="index.html">PCRE2 index page</a>.
|
||||
</p>
|
||||
<p>
|
||||
This page is part of the PCRE2 HTML documentation. It was generated
|
||||
automatically from the original man page. If there is any nonsense in it,
|
||||
please consult the man page, in case the conversion went wrong.
|
||||
<br>
|
||||
End
|
||||
|
||||
print "<ul>\n" if ($toc);
|
||||
|
||||
open(TEMP, ">/tmp/$$") || die "Can't open /tmp/$$ for output\n";
|
||||
|
||||
while (<STDIN>)
|
||||
{
|
||||
# Handle lines beginning with a dot
|
||||
|
||||
if (/^\./)
|
||||
{
|
||||
# Some of the PCRE2 man pages used to contain instances of .br. However,
|
||||
# they should have all been removed because they cause trouble in some
|
||||
# (other) automated systems that translate man pages to HTML. Complain if
|
||||
# we find .br or .in (another macro that is deprecated).
|
||||
|
||||
if (/^\.br/ || /^\.in/)
|
||||
{
|
||||
print STDERR "\n*** Deprecated macro encountered - rewrite needed\n";
|
||||
print STDERR "*** $_\n";
|
||||
die "*** Processing abandoned\n";
|
||||
}
|
||||
|
||||
# Instead of .br, relevent "literal" sections are enclosed in .nf/.fi.
|
||||
|
||||
elsif (/^\.nf/)
|
||||
{
|
||||
$innf = 1;
|
||||
}
|
||||
|
||||
elsif (/^\.fi/)
|
||||
{
|
||||
$innf = 0;
|
||||
}
|
||||
|
||||
# Handling .sp is subtle. If it is inside a literal section, do nothing if
|
||||
# the next line is a non literal text line; similarly, if not inside a
|
||||
# literal section, do nothing if a literal follows, unless we are inside
|
||||
# a .nf/.ne section. The point being that the <pre> and </pre> that delimit
|
||||
# literal sections will do the spacing. Always skip if no previous output.
|
||||
|
||||
elsif (/^\.sp/)
|
||||
{
|
||||
if ($wrotetext)
|
||||
{
|
||||
$_ = <STDIN>;
|
||||
if ($inpre)
|
||||
{
|
||||
print TEMP "\n" if (/^[\s.]/);
|
||||
}
|
||||
else
|
||||
{
|
||||
print TEMP "<br>\n<br>\n" if ($innf || !/^[\s.]/);
|
||||
}
|
||||
redo; # Now process the lookahead line we just read
|
||||
}
|
||||
}
|
||||
elsif (/^\.TP/ || /^\.PP/ || /^\.P/)
|
||||
{
|
||||
&new_para();
|
||||
}
|
||||
elsif (/^\.SH\s*("?)(.*)\1/)
|
||||
{
|
||||
# Ignore the NAME section
|
||||
if ($2 =~ /^NAME\b/)
|
||||
{
|
||||
<STDIN>;
|
||||
next;
|
||||
}
|
||||
|
||||
&end_para();
|
||||
my($title) = &do_line($2);
|
||||
if ($toc)
|
||||
{
|
||||
printf("<li><a name=\"TOC%d\" href=\"#SEC%d\">$title</a>\n",
|
||||
$ref, $ref);
|
||||
printf TEMP ("<br><a name=\"SEC%d\" href=\"#TOC1\">$title</a><br>\n",
|
||||
$ref);
|
||||
$ref++;
|
||||
}
|
||||
else
|
||||
{
|
||||
print TEMP "<br><b>\n$title\n</b><br>\n";
|
||||
}
|
||||
}
|
||||
elsif (/^\.SS\s*("?)(.*)\1/)
|
||||
{
|
||||
&end_para();
|
||||
my($title) = &do_line($2);
|
||||
print TEMP "<br><b>\n$title\n</b><br>\n";
|
||||
}
|
||||
elsif (/^\.B\s*(.*)/)
|
||||
{
|
||||
&new_para() if (!$inpara);
|
||||
$_ = &do_line($1);
|
||||
s/"(.*?)"/$1/g;
|
||||
print TEMP "<b>$_</b>\n";
|
||||
$wrotetext = 1;
|
||||
}
|
||||
elsif (/^\.I\s*(.*)/)
|
||||
{
|
||||
&new_para() if (!$inpara);
|
||||
$_ = &do_line($1);
|
||||
s/"(.*?)"/$1/g;
|
||||
print TEMP "<i>$_</i>\n";
|
||||
$wrotetext = 1;
|
||||
}
|
||||
|
||||
# A comment that starts "HREF" takes the next line as a name that
|
||||
# is turned into a hyperlink, using the text given, which might be
|
||||
# in a special font. If it ends in () or (digits) or punctuation, they
|
||||
# aren't part of the link.
|
||||
|
||||
elsif (/^\.\\"\s*HREF/)
|
||||
{
|
||||
$_=<STDIN>;
|
||||
chomp;
|
||||
$_ = &do_line($_);
|
||||
$_ =~ s/\s+$//;
|
||||
$_ =~ /^(?:<.>)?([^<(]+)(?:\(\))?(?:<\/.>)?(?:\(\d+\))?[.,;:]?$/;
|
||||
print TEMP "<a href=\"$1.html\">$_</a>\n";
|
||||
}
|
||||
|
||||
# A comment that starts "HTML" inserts literal HTML
|
||||
|
||||
elsif (/^\.\\"\s*HTML\s*(.*)/)
|
||||
{
|
||||
print TEMP $1;
|
||||
}
|
||||
|
||||
# A comment that starts < inserts that HTML at the end of the
|
||||
# *next* input line - so as not to get a newline between them.
|
||||
|
||||
elsif (/^\.\\"\s*(<.*>)/)
|
||||
{
|
||||
my($markup) = $1;
|
||||
$_=<STDIN>;
|
||||
chomp;
|
||||
$_ = &do_line($_);
|
||||
$_ =~ s/\s+$//;
|
||||
print TEMP "$_$markup\n";
|
||||
}
|
||||
|
||||
# A comment that starts JOIN joins the next two lines together, with one
|
||||
# space between them. Then that line is processed. This is used in some
|
||||
# displays where two lines are needed for the "man" version. JOINSH works
|
||||
# the same, except that it assumes this is a shell command, so removes
|
||||
# continuation backslashes.
|
||||
|
||||
elsif (/^\.\\"\s*JOIN(SH)?/)
|
||||
{
|
||||
my($one,$two);
|
||||
$one = <STDIN>;
|
||||
$two = <STDIN>;
|
||||
$one =~ s/\s*\\e\s*$// if (defined($1));
|
||||
chomp($one);
|
||||
$two =~ s/^\s+//;
|
||||
$_ = "$one $two";
|
||||
redo; # Process the joined lines
|
||||
}
|
||||
|
||||
# .EX/.EE are used in the pcre2demo page to bracket the entire program,
|
||||
# which is unmodified except for turning backslash into "\e".
|
||||
|
||||
elsif (/^\.EX\s*$/)
|
||||
{
|
||||
print TEMP "<PRE>\n";
|
||||
while (<STDIN>)
|
||||
{
|
||||
last if /^\.EE\s*$/;
|
||||
s/\\e/\\/g;
|
||||
s/&/&/g;
|
||||
s/</</g;
|
||||
s/>/>/g;
|
||||
print TEMP;
|
||||
}
|
||||
}
|
||||
|
||||
# Ignore anything not recognized
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
# Line does not begin with a dot. Replace blank lines with new paragraphs
|
||||
|
||||
if (/^\s*$/)
|
||||
{
|
||||
&end_para() if ($wrotetext);
|
||||
next;
|
||||
}
|
||||
|
||||
# Convert fonts changes and output an ordinary line. Ensure that indented
|
||||
# lines are marked as literal.
|
||||
|
||||
$_ = &do_line($_);
|
||||
&new_para() if (!$inpara);
|
||||
|
||||
if (/^\s/)
|
||||
{
|
||||
if (!$inpre)
|
||||
{
|
||||
print TEMP "<pre>\n";
|
||||
$inpre = 1;
|
||||
}
|
||||
}
|
||||
elsif ($inpre)
|
||||
{
|
||||
print TEMP "</pre>\n";
|
||||
$inpre = 0;
|
||||
}
|
||||
|
||||
# Add <br> to the end of a non-literal line if we are within .nf/.fi
|
||||
|
||||
$_ .= "<br>\n" if (!$inpre && $innf);
|
||||
|
||||
print TEMP;
|
||||
$wrotetext = 1;
|
||||
}
|
||||
|
||||
# The TOC, if present, will have been written - terminate it
|
||||
|
||||
print "</ul>\n" if ($toc);
|
||||
|
||||
# Copy the remainder to the standard output
|
||||
|
||||
close(TEMP);
|
||||
open(TEMP, "/tmp/$$") || die "Can't open /tmp/$$ for input\n";
|
||||
|
||||
print while (<TEMP>);
|
||||
|
||||
print <<End ;
|
||||
<p>
|
||||
Return to the <a href="index.html">PCRE2 index page</a>.
|
||||
</p>
|
||||
End
|
||||
|
||||
close(TEMP);
|
||||
unlink("/tmp/$$");
|
||||
|
||||
# End
|
||||
36
pcre2-10.21/AUTHORS
Normal file
36
pcre2-10.21/AUTHORS
Normal file
@@ -0,0 +1,36 @@
|
||||
THE MAIN PCRE2 LIBRARY CODE
|
||||
---------------------------
|
||||
|
||||
Written by: Philip Hazel
|
||||
Email local part: ph10
|
||||
Email domain: cam.ac.uk
|
||||
|
||||
University of Cambridge Computing Service,
|
||||
Cambridge, England.
|
||||
|
||||
Copyright (c) 1997-2016 University of Cambridge
|
||||
All rights reserved
|
||||
|
||||
|
||||
PCRE2 JUST-IN-TIME COMPILATION SUPPORT
|
||||
--------------------------------------
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Emain domain: freemail.hu
|
||||
|
||||
Copyright(c) 2010-2016 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
|
||||
STACK-LESS JUST-IN-TIME COMPILER
|
||||
--------------------------------
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Emain domain: freemail.hu
|
||||
|
||||
Copyright(c) 2009-2016 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
####
|
||||
780
pcre2-10.21/CMakeLists.txt
Normal file
780
pcre2-10.21/CMakeLists.txt
Normal file
@@ -0,0 +1,780 @@
|
||||
# CMakeLists.txt
|
||||
#
|
||||
#
|
||||
# This file enables PCRE2 to be built with the CMake configuration and build
|
||||
# tool. Download CMake in source or binary form from http://www.cmake.org/
|
||||
# Converted to support PCRE2 from the original PCRE file, August 2014.
|
||||
#
|
||||
# Original listfile by Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
|
||||
# Refined and expanded by Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||
# 2007-09-14 mod by Sheri so 7.4 supported configuration options can be entered
|
||||
# 2007-09-19 Adjusted by PH to retain previous default settings
|
||||
# 2007-12-26 (a) On UNIX, use names libpcre instead of just pcre
|
||||
# (b) Ensure pcretest and pcregrep link with the local library,
|
||||
# not a previously-installed one.
|
||||
# (c) Add PCRE_SUPPORT_LIBREADLINE, PCRE_SUPPORT_LIBZ, and
|
||||
# PCRE_SUPPORT_LIBBZ2.
|
||||
# 2008-01-20 Brought up to date to include several new features by Christian
|
||||
# Ehrlicher.
|
||||
# 2008-01-22 Sheri added options for backward compatibility of library names
|
||||
# when building with minGW:
|
||||
# if "ON", NON_STANDARD_LIB_PREFIX causes shared libraries to
|
||||
# be built without "lib" as prefix. (The libraries will be named
|
||||
# pcre.dll, pcreposix.dll and pcrecpp.dll).
|
||||
# if "ON", NON_STANDARD_LIB_SUFFIX causes shared libraries to
|
||||
# be built with suffix of "-0.dll". (The libraries will be named
|
||||
# libpcre-0.dll, libpcreposix-0.dll and libpcrecpp-0.dll - same names
|
||||
# built by default with Configure and Make.
|
||||
# 2008-01-23 PH removed the automatic build of pcredemo.
|
||||
# 2008-04-22 PH modified READLINE support so it finds NCURSES when needed.
|
||||
# 2008-07-03 PH updated for revised UCP property support (change of files)
|
||||
# 2009-03-23 PH applied Steven Van Ingelgem's patch to change the name
|
||||
# CMAKE_BINARY_DIR to PROJECT_BINARY_DIR so that it works when PCRE
|
||||
# is included within another project.
|
||||
# 2009-03-23 PH applied a modified version of Steven Van Ingelgem's patches to
|
||||
# add options to stop the building of pcregrep and the tests, and
|
||||
# to disable the final configuration report.
|
||||
# 2009-04-11 PH applied Christian Ehrlicher's patch to show compiler flags that
|
||||
# are set by specifying a release type.
|
||||
# 2010-01-02 PH added test for stdint.h
|
||||
# 2010-03-02 PH added test for inttypes.h
|
||||
# 2011-08-01 PH added PCREGREP_BUFSIZE
|
||||
# 2011-08-22 PH added PCRE_SUPPORT_JIT
|
||||
# 2011-09-06 PH modified WIN32 ADD_TEST line as suggested by Sergey Cherepanov
|
||||
# 2011-09-06 PH added PCRE_SUPPORT_PCREGREP_JIT
|
||||
# 2011-10-04 Sheri added support for including coff data in windows shared libraries
|
||||
# compiled with MINGW if pcre.rc and/or pcreposix.rc are placed in
|
||||
# the source dir by the user prior to building
|
||||
# 2011-10-04 Sheri changed various add_test's to use exes' location built instead
|
||||
# of DEBUG location only (likely only matters in MSVC)
|
||||
# 2011-10-04 Sheri added scripts to provide needed variables to RunTest and
|
||||
# RunGrepTest (used for UNIX and Msys)
|
||||
# 2011-10-04 Sheri added scripts to provide needed variables and to execute
|
||||
# RunTest.bat in Win32 (for effortless testing with "make test")
|
||||
# 2011-10-04 Sheri Increased minimum required cmake version
|
||||
# 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c
|
||||
# 2012-01-10 Zoltan Herczeg added libpcre16 support
|
||||
# 2012-01-13 Stephen Kelly added out of source build support
|
||||
# 2012-01-17 PH applied Stephen Kelly's patch to parse the version data out
|
||||
# of the configure.ac file
|
||||
# 2012-02-26 PH added support for libedit
|
||||
# 2012-09-06 PH added support for PCRE_EBCDIC_NL25
|
||||
# 2012-09-08 ChPe added PCRE32 support
|
||||
# 2012-10-23 PH added support for VALGRIND and GCOV
|
||||
# 2012-12-08 PH added patch from Daniel Richard G to quash some MSVC warnings
|
||||
# 2013-07-01 PH realized that the "support" for GCOV was a total nonsense and
|
||||
# so it has been removed.
|
||||
# 2013-10-08 PH got rid of the "source" command, which is a bash-ism (use ".")
|
||||
# 2013-11-05 PH added support for PARENS_NEST_LIMIT
|
||||
# 2014-08-29 PH converted the file for PCRE2 (which has no C++).
|
||||
# 2015-04-24 PH added support for PCRE2_DEBUG
|
||||
# 2015-07-16 PH updated for new pcre2_find_bracket source module
|
||||
# 2015-08-24 PH correct C_FLAGS setting (patch from Roy Ivy III)
|
||||
# 2015-10=16 PH added support for never-backslash-C
|
||||
|
||||
PROJECT(PCRE2 C)
|
||||
|
||||
# Increased minimum to 2.8.0 to support newer add_test features. Set policy
|
||||
# CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY.
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
|
||||
CMAKE_POLICY(SET CMP0026 OLD)
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake
|
||||
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR}/src")
|
||||
|
||||
# external packages
|
||||
FIND_PACKAGE( BZip2 )
|
||||
FIND_PACKAGE( ZLIB )
|
||||
FIND_PACKAGE( Readline )
|
||||
FIND_PACKAGE( Editline )
|
||||
|
||||
# Configuration checks
|
||||
|
||||
INCLUDE(CheckIncludeFile)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
INCLUDE(CheckTypeSize)
|
||||
|
||||
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
|
||||
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
|
||||
CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H)
|
||||
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
|
||||
CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
|
||||
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY)
|
||||
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
|
||||
CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR)
|
||||
|
||||
# User-configurable options
|
||||
#
|
||||
# Note: CMakeSetup displays these in alphabetical order, regardless of
|
||||
# the order we use here.
|
||||
|
||||
SET(BUILD_SHARED_LIBS OFF CACHE BOOL
|
||||
"Build shared libraries instead of static ones.")
|
||||
|
||||
OPTION(PCRE2_BUILD_PCRE2_8 "Build 8 bit PCRE2 library" ON)
|
||||
|
||||
OPTION(PCRE2_BUILD_PCRE2_16 "Build 16 bit PCRE2 library" OFF)
|
||||
|
||||
OPTION(PCRE2_BUILD_PCRE2_32 "Build 32 bit PCRE2 library" OFF)
|
||||
|
||||
OPTION(PCRE2_DEBUG "Include debugging code" OFF)
|
||||
|
||||
SET(PCRE2_EBCDIC OFF CACHE BOOL
|
||||
"Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems.)")
|
||||
|
||||
SET(PCRE2_EBCDIC_NL25 OFF CACHE BOOL
|
||||
"Use 0x25 as EBCDIC NL character instead of 0x15; implies EBCDIC.")
|
||||
|
||||
SET(PCRE2_LINK_SIZE "2" CACHE STRING
|
||||
"Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.")
|
||||
|
||||
SET(PCRE2_PARENS_NEST_LIMIT "250" CACHE STRING
|
||||
"Default nested parentheses limit. See PARENS_NEST_LIMIT in config.h.in for details.")
|
||||
|
||||
SET(PCRE2_MATCH_LIMIT "10000000" CACHE STRING
|
||||
"Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.")
|
||||
|
||||
SET(PCRE2_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING
|
||||
"Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.")
|
||||
|
||||
SET(PCRE2GREP_BUFSIZE "20480" CACHE STRING
|
||||
"Buffer size parameter for pcre2grep. See PCRE2GREP_BUFSIZE in config.h.in for details.")
|
||||
|
||||
SET(PCRE2_NEWLINE "LF" CACHE STRING
|
||||
"What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).")
|
||||
|
||||
SET(PCRE2_HEAP_MATCH_RECURSE OFF CACHE BOOL
|
||||
"If ON, then don't use stack recursion when matching. See HEAP_MATCH_RECURSE in config.h.in for details.")
|
||||
|
||||
SET(PCRE2_SUPPORT_JIT OFF CACHE BOOL
|
||||
"Enable support for Just-in-time compiling.")
|
||||
|
||||
SET(PCRE2_SUPPORT_PCRE2GREP_JIT ON CACHE BOOL
|
||||
"Enable use of Just-in-time compiling in pcre2grep.")
|
||||
|
||||
SET(PCRE2_SUPPORT_UNICODE ON CACHE BOOL
|
||||
"Enable support for Unicode and UTF-8/UTF-16/UTF-32 encoding.")
|
||||
|
||||
SET(PCRE2_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
|
||||
"ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")
|
||||
|
||||
SET(PCRE2_NEVER_BACKSLASH_C OFF CACHE BOOL
|
||||
"If ON, backslash-C (upper case C) is locked out.")
|
||||
|
||||
SET(PCRE2_SUPPORT_VALGRIND OFF CACHE BOOL
|
||||
"Enable Valgrind support.")
|
||||
|
||||
OPTION(PCRE2_SHOW_REPORT "Show the final configuration report" ON)
|
||||
OPTION(PCRE2_BUILD_PCRE2GREP "Build pcre2grep" ON)
|
||||
OPTION(PCRE2_BUILD_TESTS "Build the tests" ON)
|
||||
|
||||
IF (MINGW)
|
||||
OPTION(NON_STANDARD_LIB_PREFIX
|
||||
"ON=Shared libraries built in mingw will be named pcre2.dll, etc., instead of libpcre2.dll, etc."
|
||||
OFF)
|
||||
|
||||
OPTION(NON_STANDARD_LIB_SUFFIX
|
||||
"ON=Shared libraries built in mingw will be named libpcre2-0.dll, etc., instead of libpcre2.dll, etc."
|
||||
OFF)
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(MSVC)
|
||||
OPTION(INSTALL_MSVC_PDB
|
||||
"ON=Install .pdb files built by MSVC, if generated"
|
||||
OFF)
|
||||
ENDIF(MSVC)
|
||||
|
||||
# bzip2 lib
|
||||
IF(BZIP2_FOUND)
|
||||
OPTION (PCRE2_SUPPORT_LIBBZ2 "Enable support for linking pcre2grep with libbz2." ON)
|
||||
ENDIF(BZIP2_FOUND)
|
||||
IF(PCRE2_SUPPORT_LIBBZ2)
|
||||
INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
|
||||
ENDIF(PCRE2_SUPPORT_LIBBZ2)
|
||||
|
||||
# zlib
|
||||
IF(ZLIB_FOUND)
|
||||
OPTION (PCRE2_SUPPORT_LIBZ "Enable support for linking pcre2grep with libz." ON)
|
||||
ENDIF(ZLIB_FOUND)
|
||||
IF(PCRE2_SUPPORT_LIBZ)
|
||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
ENDIF(PCRE2_SUPPORT_LIBZ)
|
||||
|
||||
# editline lib
|
||||
IF(EDITLINE_FOUND)
|
||||
OPTION (PCRE2_SUPPORT_LIBEDIT "Enable support for linking pcre2test with libedit." OFF)
|
||||
ENDIF(EDITLINE_FOUND)
|
||||
IF(PCRE2_SUPPORT_LIBEDIT)
|
||||
INCLUDE_DIRECTORIES(${EDITLINE_INCLUDE_DIR})
|
||||
ENDIF(PCRE2_SUPPORT_LIBEDIT)
|
||||
|
||||
# readline lib
|
||||
IF(READLINE_FOUND)
|
||||
OPTION (PCRE2_SUPPORT_LIBREADLINE "Enable support for linking pcre2test with libreadline." ON)
|
||||
ENDIF(READLINE_FOUND)
|
||||
IF(PCRE2_SUPPORT_LIBREADLINE)
|
||||
INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR})
|
||||
ENDIF(PCRE2_SUPPORT_LIBREADLINE)
|
||||
|
||||
# Prepare build configuration
|
||||
|
||||
IF(NOT BUILD_SHARED_LIBS)
|
||||
SET(PCRE2_STATIC 1)
|
||||
ENDIF(NOT BUILD_SHARED_LIBS)
|
||||
|
||||
IF(NOT PCRE2_BUILD_PCRE2_8 AND NOT PCRE2_BUILD_PCRE2_16 AND NOT PCRE2_BUILD_PCRE2_32)
|
||||
MESSAGE(FATAL_ERROR "At least one of PCRE2_BUILD_PCRE2_8, PCRE2_BUILD_PCRE2_16 or PCRE2_BUILD_PCRE2_32 must be enabled")
|
||||
ENDIF(NOT PCRE2_BUILD_PCRE2_8 AND NOT PCRE2_BUILD_PCRE2_16 AND NOT PCRE2_BUILD_PCRE2_32)
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2_8)
|
||||
SET(SUPPORT_PCRE2_8 1)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_8)
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2_16)
|
||||
SET(SUPPORT_PCRE2_16 1)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_16)
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2_32)
|
||||
SET(SUPPORT_PCRE2_32 1)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_32)
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2GREP AND NOT PCRE2_BUILD_PCRE2_8)
|
||||
MESSAGE(STATUS "** PCRE2_BUILD_PCRE2_8 must be enabled for the pcre2grep program")
|
||||
SET(PCRE2_BUILD_PCRE2GREP OFF)
|
||||
ENDIF(PCRE2_BUILD_PCRE2GREP AND NOT PCRE2_BUILD_PCRE2_8)
|
||||
|
||||
IF(PCRE2_SUPPORT_LIBREADLINE AND PCRE2_SUPPORT_LIBEDIT)
|
||||
MESSAGE(FATAL_ERROR "Only one of libreadline or libeditline can be specified")
|
||||
ENDIF(PCRE2_SUPPORT_LIBREADLINE AND PCRE2_SUPPORT_LIBEDIT)
|
||||
|
||||
IF(PCRE2_SUPPORT_BSR_ANYCRLF)
|
||||
SET(BSR_ANYCRLF 1)
|
||||
ENDIF(PCRE2_SUPPORT_BSR_ANYCRLF)
|
||||
|
||||
IF(PCRE2_NEVER_BACKSLASH_C)
|
||||
SET(NEVER_BACKSLASH_C 1)
|
||||
ENDIF(PCRE2_NEVER_BACKSLASH_C)
|
||||
|
||||
IF(PCRE2_SUPPORT_UNICODE)
|
||||
SET(SUPPORT_UNICODE 1)
|
||||
ENDIF(PCRE2_SUPPORT_UNICODE)
|
||||
|
||||
IF(PCRE2_SUPPORT_JIT)
|
||||
SET(SUPPORT_JIT 1)
|
||||
ENDIF(PCRE2_SUPPORT_JIT)
|
||||
|
||||
IF(PCRE2_SUPPORT_PCRE2GREP_JIT)
|
||||
SET(SUPPORT_PCRE2GREP_JIT 1)
|
||||
ENDIF(PCRE2_SUPPORT_PCRE2GREP_JIT)
|
||||
|
||||
IF(PCRE2_SUPPORT_VALGRIND)
|
||||
SET(SUPPORT_VALGRIND 1)
|
||||
ENDIF(PCRE2_SUPPORT_VALGRIND)
|
||||
|
||||
# This next one used to reference ${READLINE_LIBRARY})
|
||||
# but I was advised to add the NCURSES test as well, along with
|
||||
# some modifications to cmake/FindReadline.cmake which should
|
||||
# make it possible to override the default if necessary. PH
|
||||
|
||||
IF(PCRE2_SUPPORT_LIBREADLINE)
|
||||
SET(SUPPORT_LIBREADLINE 1)
|
||||
SET(PCRE2TEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
|
||||
ENDIF(PCRE2_SUPPORT_LIBREADLINE)
|
||||
|
||||
# libedit is a plug-compatible alternative to libreadline
|
||||
|
||||
IF(PCRE2_SUPPORT_LIBEDIT)
|
||||
SET(SUPPORT_LIBEDIT 1)
|
||||
SET(PCRE2TEST_LIBS ${EDITLINE_LIBRARY} ${NCURSES_LIBRARY})
|
||||
ENDIF(PCRE2_SUPPORT_LIBEDIT)
|
||||
|
||||
IF(PCRE2_SUPPORT_LIBZ)
|
||||
SET(SUPPORT_LIBZ 1)
|
||||
SET(PCRE2GREP_LIBS ${PCRE2GREP_LIBS} ${ZLIB_LIBRARIES})
|
||||
ENDIF(PCRE2_SUPPORT_LIBZ)
|
||||
|
||||
IF(PCRE2_SUPPORT_LIBBZ2)
|
||||
SET(SUPPORT_LIBBZ2 1)
|
||||
SET(PCRE2GREP_LIBS ${PCRE2GREP_LIBS} ${BZIP2_LIBRARIES})
|
||||
ENDIF(PCRE2_SUPPORT_LIBBZ2)
|
||||
|
||||
SET(NEWLINE_DEFAULT "")
|
||||
|
||||
IF(PCRE2_NEWLINE STREQUAL "CR")
|
||||
SET(NEWLINE_DEFAULT "1")
|
||||
ENDIF(PCRE2_NEWLINE STREQUAL "CR")
|
||||
IF(PCRE2_NEWLINE STREQUAL "LF")
|
||||
SET(NEWLINE_DEFAULT "2")
|
||||
ENDIF(PCRE2_NEWLINE STREQUAL "LF")
|
||||
IF(PCRE2_NEWLINE STREQUAL "CRLF")
|
||||
SET(NEWLINE_DEFAULT "3")
|
||||
ENDIF(PCRE2_NEWLINE STREQUAL "CRLF")
|
||||
IF(PCRE2_NEWLINE STREQUAL "ANY")
|
||||
SET(NEWLINE_DEFAULT "4")
|
||||
ENDIF(PCRE2_NEWLINE STREQUAL "ANY")
|
||||
IF(PCRE2_NEWLINE STREQUAL "ANYCRLF")
|
||||
SET(NEWLINE_DEFAULT "5")
|
||||
ENDIF(PCRE2_NEWLINE STREQUAL "ANYCRLF")
|
||||
|
||||
IF(NEWLINE_DEFAULT STREQUAL "")
|
||||
MESSAGE(FATAL_ERROR "The PCRE2_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".")
|
||||
ENDIF(NEWLINE_DEFAULT STREQUAL "")
|
||||
|
||||
IF(PCRE2_EBCDIC)
|
||||
SET(EBCDIC 1)
|
||||
ENDIF(PCRE2_EBCDIC)
|
||||
|
||||
IF(PCRE2_EBCDIC_NL25)
|
||||
SET(EBCDIC 1)
|
||||
SET(EBCDIC_NL25 1)
|
||||
ENDIF(PCRE2_EBCDIC_NL25)
|
||||
|
||||
IF(PCRE2_HEAP_MATCH_RECURSE)
|
||||
SET(HEAP_MATCH_RECURSE 1)
|
||||
ENDIF(PCRE2_HEAP_MATCH_RECURSE)
|
||||
|
||||
# Output files
|
||||
|
||||
CONFIGURE_FILE(config-cmake.h.in
|
||||
${PROJECT_BINARY_DIR}/config.h
|
||||
@ONLY)
|
||||
|
||||
# Parse version numbers and date out of configure.ac
|
||||
|
||||
file(STRINGS ${PROJECT_SOURCE_DIR}/configure.ac
|
||||
configure_lines
|
||||
LIMIT_COUNT 50 # Read only the first 50 lines of the file
|
||||
)
|
||||
|
||||
set(SEARCHED_VARIABLES "pcre2_major" "pcre2_minor" "pcre2_prerelease" "pcre2_date")
|
||||
foreach(configure_line ${configure_lines})
|
||||
foreach(_substitution_variable ${SEARCHED_VARIABLES})
|
||||
string(TOUPPER ${_substitution_variable} _substitution_variable_upper)
|
||||
if (NOT ${_substitution_variable_upper})
|
||||
string(REGEX MATCH "m4_define\\(${_substitution_variable}, \\[(.*)\\]" MACTHED_STRING ${configure_line})
|
||||
if (CMAKE_MATCH_1)
|
||||
set(${_substitution_variable_upper} ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
CONFIGURE_FILE(src/pcre2.h.in
|
||||
${PROJECT_BINARY_DIR}/pcre2.h
|
||||
@ONLY)
|
||||
|
||||
# What about pcre2-config and libpcre2.pc?
|
||||
|
||||
# Character table generation
|
||||
|
||||
OPTION(PCRE2_REBUILD_CHARTABLES "Rebuild char tables" OFF)
|
||||
IF(PCRE2_REBUILD_CHARTABLES)
|
||||
ADD_EXECUTABLE(dftables src/dftables.c)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
COMMENT "Generating character tables (pcre2_chartables.c) for current locale"
|
||||
DEPENDS dftables
|
||||
COMMAND dftables
|
||||
ARGS ${PROJECT_BINARY_DIR}/pcre2_chartables.c
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/pcre2_chartables.c
|
||||
)
|
||||
ELSE(PCRE2_REBUILD_CHARTABLES)
|
||||
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/src/pcre2_chartables.c.dist
|
||||
${PROJECT_BINARY_DIR}/pcre2_chartables.c
|
||||
COPYONLY)
|
||||
ENDIF(PCRE2_REBUILD_CHARTABLES)
|
||||
|
||||
# Source code
|
||||
|
||||
SET(PCRE2_HEADERS ${PROJECT_BINARY_DIR}/pcre2.h)
|
||||
|
||||
SET(PCRE2_SOURCES
|
||||
src/pcre2_auto_possess.c
|
||||
${PROJECT_BINARY_DIR}/pcre2_chartables.c
|
||||
src/pcre2_compile.c
|
||||
src/pcre2_config.c
|
||||
src/pcre2_context.c
|
||||
src/pcre2_dfa_match.c
|
||||
src/pcre2_error.c
|
||||
src/pcre2_find_bracket.c
|
||||
src/pcre2_jit_compile.c
|
||||
src/pcre2_maketables.c
|
||||
src/pcre2_match.c
|
||||
src/pcre2_match_data.c
|
||||
src/pcre2_newline.c
|
||||
src/pcre2_ord2utf.c
|
||||
src/pcre2_pattern_info.c
|
||||
src/pcre2_serialize.c
|
||||
src/pcre2_string_utils.c
|
||||
src/pcre2_study.c
|
||||
src/pcre2_substitute.c
|
||||
src/pcre2_substring.c
|
||||
src/pcre2_tables.c
|
||||
src/pcre2_ucd.c
|
||||
src/pcre2_valid_utf.c
|
||||
src/pcre2_xclass.c
|
||||
)
|
||||
|
||||
SET(PCRE2POSIX_HEADERS src/pcre2posix.h)
|
||||
SET(PCRE2POSIX_SOURCES src/pcre2posix.c)
|
||||
|
||||
IF(MINGW AND NOT PCRE2_STATIC)
|
||||
IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre2.rc)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre2.o
|
||||
PRE-LINK
|
||||
COMMAND windres ARGS pcre2.rc pcre2.o
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMENT Using pcre2 coff info in mingw build)
|
||||
SET(PCRE2_SOURCES
|
||||
${PCRE2_SOURCES} ${PROJECT_SOURCE_DIR}/pcre2.o
|
||||
)
|
||||
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre2.rc)
|
||||
IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre2posix.rc)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre2posix.o
|
||||
PRE-LINK
|
||||
COMMAND windres ARGS pcre2posix.rc pcre2posix.o
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMENT Using pcre2posix coff info in mingw build)
|
||||
SET(PCRE2POSIX_SOURCES
|
||||
${PCRE2POSIX_SOURCES} ${PROJECT_SOURCE_DIR}/pcre2posix.o
|
||||
)
|
||||
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre2posix.rc)
|
||||
ENDIF(MINGW AND NOT PCRE2_STATIC)
|
||||
|
||||
IF(MSVC AND NOT PCRE2_STATIC)
|
||||
IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre2.rc)
|
||||
SET(PCRE2_SOURCES
|
||||
${PCRE2_SOURCES} pcre2.rc)
|
||||
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre2.rc)
|
||||
IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre2posix.rc)
|
||||
SET(PCRE2POSIX_SOURCES
|
||||
${PCRE2POSIX_SOURCES} pcre2posix.rc)
|
||||
ENDIF (EXISTS ${PROJECT_SOURCE_DIR}/pcre2posix.rc)
|
||||
ENDIF(MSVC AND NOT PCRE2_STATIC)
|
||||
|
||||
# Build setup
|
||||
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
|
||||
IF(MSVC)
|
||||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
|
||||
ENDIF(MSVC)
|
||||
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR 1)
|
||||
# needed to make sure to not link debug libs
|
||||
# against release libs and vice versa
|
||||
IF(WIN32)
|
||||
SET(CMAKE_DEBUG_POSTFIX "d")
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET(targets)
|
||||
|
||||
# 8-bit library
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2_8)
|
||||
ADD_LIBRARY(pcre2-8 ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
|
||||
SET_PROPERTY(TARGET pcre2-8
|
||||
PROPERTY COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=8)
|
||||
SET(targets ${targets} pcre2-8)
|
||||
ADD_LIBRARY(pcre2posix ${PCRE2POSIX_HEADERS} ${PCRE2POSIX_SOURCES})
|
||||
SET_PROPERTY(TARGET pcre2posix
|
||||
PROPERTY COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=8)
|
||||
SET(targets ${targets} pcre2posix)
|
||||
TARGET_LINK_LIBRARIES(pcre2posix pcre2-8)
|
||||
|
||||
IF(MINGW AND NOT PCRE2_STATIC)
|
||||
IF(NON_STANDARD_LIB_PREFIX)
|
||||
SET_TARGET_PROPERTIES(pcre2-8 pcre2posix PROPERTIES PREFIX "")
|
||||
ENDIF(NON_STANDARD_LIB_PREFIX)
|
||||
IF(NON_STANDARD_LIB_SUFFIX)
|
||||
SET_TARGET_PROPERTIES(pcre2-8 pcre2posix PROPERTIES SUFFIX "-0.dll")
|
||||
ENDIF(NON_STANDARD_LIB_SUFFIX)
|
||||
ENDIF(MINGW AND NOT PCRE2_STATIC)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_8)
|
||||
|
||||
# 16-bit library
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2_16)
|
||||
ADD_LIBRARY(pcre2-16 ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
|
||||
SET_PROPERTY(TARGET pcre2-16
|
||||
PROPERTY COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=16)
|
||||
SET(targets ${targets} pcre2-16)
|
||||
|
||||
IF(MINGW AND NOT PCRE2_STATIC)
|
||||
IF(NON_STANDARD_LIB_PREFIX)
|
||||
SET_TARGET_PROPERTIES(pcre2-16 PROPERTIES PREFIX "")
|
||||
ENDIF(NON_STANDARD_LIB_PREFIX)
|
||||
IF(NON_STANDARD_LIB_SUFFIX)
|
||||
SET_TARGET_PROPERTIES(pcre2-16 PROPERTIES SUFFIX "-0.dll")
|
||||
ENDIF(NON_STANDARD_LIB_SUFFIX)
|
||||
ENDIF(MINGW AND NOT PCRE2_STATIC)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_16)
|
||||
|
||||
# 32-bit library
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2_32)
|
||||
ADD_LIBRARY(pcre2-32 ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
|
||||
SET_PROPERTY(TARGET pcre2-32
|
||||
PROPERTY COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=32)
|
||||
SET(targets ${targets} pcre2-32)
|
||||
|
||||
IF(MINGW AND NOT PCRE2_STATIC)
|
||||
IF(NON_STANDARD_LIB_PREFIX)
|
||||
SET_TARGET_PROPERTIES(pcre2-32 PROPERTIES PREFIX "")
|
||||
ENDIF(NON_STANDARD_LIB_PREFIX)
|
||||
IF(NON_STANDARD_LIB_SUFFIX)
|
||||
SET_TARGET_PROPERTIES(pcre2-32 PROPERTIES SUFFIX "-0.dll")
|
||||
ENDIF(NON_STANDARD_LIB_SUFFIX)
|
||||
ENDIF(MINGW AND NOT PCRE2_STATIC)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_32)
|
||||
|
||||
# Executables
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2GREP)
|
||||
ADD_EXECUTABLE(pcre2grep src/pcre2grep.c)
|
||||
SET_PROPERTY(TARGET pcre2grep
|
||||
PROPERTY COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=8)
|
||||
SET(targets ${targets} pcre2grep)
|
||||
TARGET_LINK_LIBRARIES(pcre2grep pcre2posix ${PCRE2GREP_LIBS})
|
||||
ENDIF(PCRE2_BUILD_PCRE2GREP)
|
||||
|
||||
# Testing
|
||||
|
||||
IF(PCRE2_BUILD_TESTS)
|
||||
ENABLE_TESTING()
|
||||
|
||||
SET(PCRE2TEST_SOURCES src/pcre2test.c)
|
||||
|
||||
ADD_EXECUTABLE(pcre2test ${PCRE2TEST_SOURCES})
|
||||
SET(targets ${targets} pcre2test)
|
||||
IF(PCRE2_BUILD_PCRE2_8)
|
||||
LIST(APPEND PCRE2TEST_LIBS pcre2posix pcre2-8)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_8)
|
||||
IF(PCRE2_BUILD_PCRE2_16)
|
||||
LIST(APPEND PCRE2TEST_LIBS pcre2-16)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_16)
|
||||
IF(PCRE2_BUILD_PCRE2_32)
|
||||
LIST(APPEND PCRE2TEST_LIBS pcre2-32)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_32)
|
||||
TARGET_LINK_LIBRARIES(pcre2test ${PCRE2TEST_LIBS})
|
||||
|
||||
IF(PCRE2_SUPPORT_JIT)
|
||||
ADD_EXECUTABLE(pcre2_jit_test src/pcre2_jit_test.c)
|
||||
SET(targets ${targets} pcre2_jit_test)
|
||||
SET(PCRE2_JIT_TEST_LIBS )
|
||||
IF(PCRE2_BUILD_PCRE2_8)
|
||||
LIST(APPEND PCRE2_JIT_TEST_LIBS pcre2-8)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_8)
|
||||
IF(PCRE2_BUILD_PCRE2_16)
|
||||
LIST(APPEND PCRE2_JIT_TEST_LIBS pcre2-16)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_16)
|
||||
IF(PCRE2_BUILD_PCRE2_32)
|
||||
LIST(APPEND PCRE2_JIT_TEST_LIBS pcre2-32)
|
||||
ENDIF(PCRE2_BUILD_PCRE2_32)
|
||||
TARGET_LINK_LIBRARIES(pcre2_jit_test ${PCRE2_JIT_TEST_LIBS})
|
||||
ENDIF(PCRE2_SUPPORT_JIT)
|
||||
|
||||
# exes in Debug location tested by the RunTest shell script
|
||||
# via "make test"
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2GREP)
|
||||
GET_TARGET_PROPERTY(PCRE2GREP_EXE pcre2grep DEBUG_LOCATION)
|
||||
ENDIF(PCRE2_BUILD_PCRE2GREP)
|
||||
|
||||
GET_TARGET_PROPERTY(PCRE2TEST_EXE pcre2test DEBUG_LOCATION)
|
||||
|
||||
# =================================================
|
||||
# Write out a CTest configuration file
|
||||
#
|
||||
FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest
|
||||
"# This is a generated file.
|
||||
MESSAGE(\"When testing is complete, review test output in the
|
||||
\\\"${PROJECT_BINARY_DIR}/Testing/Temporary\\\" folder.\")
|
||||
MESSAGE(\" \")
|
||||
")
|
||||
|
||||
FILE(WRITE ${PROJECT_BINARY_DIR}/pcre2_test.sh
|
||||
"#! /bin/sh
|
||||
# This is a generated file.
|
||||
. ${PROJECT_SOURCE_DIR}/RunTest
|
||||
if test \"$?\" != \"0\"; then exit 1; fi
|
||||
# End
|
||||
")
|
||||
|
||||
IF(UNIX)
|
||||
ADD_TEST(pcre2_test sh ${PROJECT_BINARY_DIR}/pcre2_test.sh)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(PCRE2_BUILD_PCRE2GREP)
|
||||
FILE(WRITE ${PROJECT_BINARY_DIR}/pcre2_grep_test.sh
|
||||
"#! /bin/sh
|
||||
# This is a generated file.
|
||||
. ${PROJECT_SOURCE_DIR}/RunGrepTest
|
||||
if test \"$?\" != \"0\"; then exit 1; fi
|
||||
# End
|
||||
")
|
||||
|
||||
IF(UNIX)
|
||||
ADD_TEST(pcre2_grep_test sh ${PROJECT_BINARY_DIR}/pcre2_grep_test.sh)
|
||||
ENDIF(UNIX)
|
||||
ENDIF(PCRE2_BUILD_PCRE2GREP)
|
||||
|
||||
IF(WIN32)
|
||||
# Provide environment for executing the bat file version of RunTest
|
||||
FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} winsrc)
|
||||
FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} winbin)
|
||||
FILE(TO_NATIVE_PATH ${PCRE2TEST_EXE} winexe)
|
||||
|
||||
FILE(WRITE ${PROJECT_BINARY_DIR}/pcre2_test.bat
|
||||
"\@REM This is a generated file.
|
||||
\@echo off
|
||||
setlocal
|
||||
SET srcdir=\"${winsrc}\"
|
||||
SET pcre2test=\"${winexe}\"
|
||||
if not [%CMAKE_CONFIG_TYPE%]==[] SET pcre2test=\"${winbin}\\%CMAKE_CONFIG_TYPE%\\pcre2test.exe\"
|
||||
call %srcdir%\\RunTest.Bat
|
||||
if errorlevel 1 exit /b 1
|
||||
echo RunTest.bat tests successfully completed
|
||||
")
|
||||
|
||||
ADD_TEST(NAME pcre2_test_bat
|
||||
COMMAND pcre2_test.bat)
|
||||
SET_TESTS_PROPERTIES(pcre2_test_bat PROPERTIES
|
||||
PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")
|
||||
|
||||
IF("$ENV{OSTYPE}" STREQUAL "msys")
|
||||
# Both the sh and bat file versions of RunTest are run if make test is used
|
||||
# in msys
|
||||
ADD_TEST(pcre2_test_sh sh.exe ${PROJECT_BINARY_DIR}/pcre2_test.sh)
|
||||
IF(PCRE2_BUILD_PCRE2GREP)
|
||||
ADD_TEST(pcre2_grep_test sh.exe ${PROJECT_BINARY_DIR}/pcre2_grep_test.sh)
|
||||
ENDIF(PCRE2_BUILD_PCRE2GREP)
|
||||
ENDIF("$ENV{OSTYPE}" STREQUAL "msys")
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Changed to accommodate testing whichever location was just built
|
||||
|
||||
IF(PCRE2_SUPPORT_JIT)
|
||||
ADD_TEST(pcre2_jit_test pcre2_jit_test)
|
||||
ENDIF(PCRE2_SUPPORT_JIT)
|
||||
|
||||
ENDIF(PCRE2_BUILD_TESTS)
|
||||
|
||||
# Installation
|
||||
|
||||
SET(CMAKE_INSTALL_ALWAYS 1)
|
||||
|
||||
INSTALL(TARGETS ${targets}
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
INSTALL(FILES ${PCRE2_HEADERS} ${PCRE2POSIX_HEADERS} DESTINATION include)
|
||||
|
||||
FILE(GLOB html ${PROJECT_SOURCE_DIR}/doc/html/*.html)
|
||||
FILE(GLOB man1 ${PROJECT_SOURCE_DIR}/doc/*.1)
|
||||
FILE(GLOB man3 ${PROJECT_SOURCE_DIR}/doc/*.3)
|
||||
|
||||
FOREACH(man ${man3})
|
||||
GET_FILENAME_COMPONENT(man_tmp ${man} NAME)
|
||||
SET(man3_new ${man3} ${man})
|
||||
ENDFOREACH(man ${man3})
|
||||
SET(man3 ${man3_new})
|
||||
|
||||
INSTALL(FILES ${man1} DESTINATION man/man1)
|
||||
INSTALL(FILES ${man3} DESTINATION man/man3)
|
||||
INSTALL(FILES ${html} DESTINATION share/doc/pcre2/html)
|
||||
|
||||
IF(MSVC AND INSTALL_MSVC_PDB)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/pcre2.pdb
|
||||
${PROJECT_BINARY_DIR}/pcre2posix.pdb
|
||||
DESTINATION bin
|
||||
CONFIGURATIONS RelWithDebInfo)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/pcre2d.pdb
|
||||
${PROJECT_BINARY_DIR}/pcre2posixd.pdb
|
||||
DESTINATION bin
|
||||
CONFIGURATIONS Debug)
|
||||
ENDIF(MSVC AND INSTALL_MSVC_PDB)
|
||||
|
||||
# Help, only for nice output
|
||||
IF(BUILD_SHARED_LIBS)
|
||||
SET(BUILD_STATIC_LIBS OFF)
|
||||
ELSE(BUILD_SHARED_LIBS)
|
||||
SET(BUILD_STATIC_LIBS ON)
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
|
||||
IF(PCRE2_SHOW_REPORT)
|
||||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype)
|
||||
IF (CMAKE_C_FLAGS)
|
||||
SET(cfsp " ")
|
||||
ENDIF(CMAKE_C_FLAGS)
|
||||
MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS "PCRE2 configuration summary:")
|
||||
MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}")
|
||||
MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}")
|
||||
MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}")
|
||||
MESSAGE(STATUS "")
|
||||
MESSAGE(STATUS " Build 8 bit PCRE2 library ....... : ${PCRE2_BUILD_PCRE2_8}")
|
||||
MESSAGE(STATUS " Build 16 bit PCRE2 library ...... : ${PCRE2_BUILD_PCRE2_16}")
|
||||
MESSAGE(STATUS " Build 32 bit PCRE2 library ...... : ${PCRE2_BUILD_PCRE2_32}")
|
||||
MESSAGE(STATUS " Enable JIT compiling support .... : ${PCRE2_SUPPORT_JIT}")
|
||||
MESSAGE(STATUS " Enable Unicode support .......... : ${PCRE2_SUPPORT_UNICODE}")
|
||||
MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE2_NEWLINE}")
|
||||
MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE2_SUPPORT_BSR_ANYCRLF}")
|
||||
MESSAGE(STATUS " \\C is disabled .................. : ${PCRE2_NEVER_BACKSLASH_C}")
|
||||
MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE2_EBCDIC}")
|
||||
MESSAGE(STATUS " EBCDIC coding with NL=0x25 ...... : ${PCRE2_EBCDIC_NL25}")
|
||||
MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE2_REBUILD_CHARTABLES}")
|
||||
MESSAGE(STATUS " Use heap recursion .............. : ${PCRE2_HEAP_MATCH_RECURSE}")
|
||||
MESSAGE(STATUS " Internal link size .............. : ${PCRE2_LINK_SIZE}")
|
||||
MESSAGE(STATUS " Parentheses nest limit .......... : ${PCRE2_PARENS_NEST_LIMIT}")
|
||||
MESSAGE(STATUS " Match limit ..................... : ${PCRE2_MATCH_LIMIT}")
|
||||
MESSAGE(STATUS " Match limit recursion ........... : ${PCRE2_MATCH_LIMIT_RECURSION}")
|
||||
MESSAGE(STATUS " Build shared libs ............... : ${BUILD_SHARED_LIBS}")
|
||||
MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}")
|
||||
MESSAGE(STATUS " Build pcre2grep ................. : ${PCRE2_BUILD_PCRE2GREP}")
|
||||
MESSAGE(STATUS " Enable JIT in pcre2grep ......... : ${PCRE2_SUPPORT_PCRE2GREP_JIT}")
|
||||
MESSAGE(STATUS " Buffer size for pcre2grep ....... : ${PCRE2GREP_BUFSIZE}")
|
||||
MESSAGE(STATUS " Build tests (implies pcre2test . : ${PCRE2_BUILD_TESTS}")
|
||||
MESSAGE(STATUS " and pcre2grep)")
|
||||
IF(ZLIB_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2grep with libz ........ : ${PCRE2_SUPPORT_LIBZ}")
|
||||
ELSE(ZLIB_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2grep with libz ........ : Library not found" )
|
||||
ENDIF(ZLIB_FOUND)
|
||||
IF(BZIP2_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2grep with libbz2 ...... : ${PCRE2_SUPPORT_LIBBZ2}")
|
||||
ELSE(BZIP2_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2grep with libbz2 ...... : Library not found" )
|
||||
ENDIF(BZIP2_FOUND)
|
||||
IF(EDITLINE_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2test with libeditline . : ${PCRE2_SUPPORT_LIBEDIT}")
|
||||
ELSE(EDITLINE_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2test with libeditline . : Library not found" )
|
||||
ENDIF(EDITLINE_FOUND)
|
||||
IF(READLINE_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2test with libreadline . : ${PCRE2_SUPPORT_LIBREADLINE}")
|
||||
ELSE(READLINE_FOUND)
|
||||
MESSAGE(STATUS " Link pcre2test with libreadline . : Library not found" )
|
||||
ENDIF(READLINE_FOUND)
|
||||
MESSAGE(STATUS " Support Valgrind .................: ${PCRE2_SUPPORT_VALGRIND}")
|
||||
|
||||
IF(MINGW AND NOT PCRE2_STATIC)
|
||||
MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")
|
||||
MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}")
|
||||
ENDIF(MINGW AND NOT PCRE2_STATIC)
|
||||
|
||||
IF(MSVC)
|
||||
MESSAGE(STATUS " Install MSVC .pdb files ..........: ${INSTALL_MSVC_PDB}")
|
||||
ENDIF(MSVC)
|
||||
|
||||
MESSAGE(STATUS "")
|
||||
ENDIF(PCRE2_SHOW_REPORT)
|
||||
|
||||
# end CMakeLists.txt
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user