mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-11 02:51:15 -03:00
Compare commits
795 Commits
test-drive
...
update-def
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb2b1c6621 | ||
|
|
f79e5d5820 | ||
|
|
54e80e65a8 | ||
|
|
1122bba3c1 | ||
|
|
094e8b29c2 | ||
|
|
decec955d2 | ||
|
|
4a5e8a8f48 | ||
|
|
f8699d2b7e | ||
|
|
168c1a50a4 | ||
|
|
7e393f47e4 | ||
|
|
5897d13333 | ||
|
|
d18cb6ce27 | ||
|
|
9b44a59b80 | ||
|
|
788eddd0e8 | ||
|
|
e7c9f6d47e | ||
|
|
bb1e3f3aba | ||
|
|
e490ba6fdf | ||
|
|
84c48c3f97 | ||
|
|
fd0f942fd0 | ||
|
|
c8f2471357 | ||
|
|
742016f455 | ||
|
|
e71cace5f1 | ||
|
|
50b93dd5c0 | ||
|
|
364d84e620 | ||
|
|
829709c9c4 | ||
|
|
7bdb561d24 | ||
|
|
e10573088a | ||
|
|
b431873ce5 | ||
|
|
2c07dc3851 | ||
|
|
95ff22f644 | ||
|
|
73a7d79023 | ||
|
|
1f944c1c54 | ||
|
|
05508fa551 | ||
|
|
2f9d5ac7d6 | ||
|
|
f222db609f | ||
|
|
97641c7bf6 | ||
|
|
59d86e8e33 | ||
|
|
4555768d98 | ||
|
|
07ed77e9a8 | ||
|
|
709f193b50 | ||
|
|
131f0f3916 | ||
|
|
ae6eb121d9 | ||
|
|
51cf65d7c8 | ||
|
|
0349a70321 | ||
|
|
ce631fd2fb | ||
|
|
cc9849c279 | ||
|
|
ef25f1d27b | ||
|
|
692599387b | ||
|
|
c32b7d35ea | ||
|
|
939902eb29 | ||
|
|
cebc05f6c1 | ||
|
|
de830644fc | ||
|
|
1a63956860 | ||
|
|
6a8a02a549 | ||
|
|
d33cc5ea24 | ||
|
|
9c39cab239 | ||
|
|
426b242ce5 | ||
|
|
69aa492d40 | ||
|
|
45a13a0075 | ||
|
|
fada8cfd6c | ||
|
|
a77da2366b | ||
|
|
f36b704098 | ||
|
|
234a9ef777 | ||
|
|
dd02a7e662 | ||
|
|
037c1896d4 | ||
|
|
b7c4ad455c | ||
|
|
8586286837 | ||
|
|
64c362bb73 | ||
|
|
2ce3068465 | ||
|
|
6cf96c5950 | ||
|
|
5067fa5f1d | ||
|
|
70c25096f2 | ||
|
|
007eda2f89 | ||
|
|
76dbd76c73 | ||
|
|
82e7281675 | ||
|
|
1f0ce40408 | ||
|
|
5b9ba559c7 | ||
|
|
6f65661109 | ||
|
|
489d5d1733 | ||
|
|
e6bc8ffa13 | ||
|
|
ff87e2cf0a | ||
|
|
a528567d5c | ||
|
|
374b504eeb | ||
|
|
119716fbf2 | ||
|
|
68a357be3d | ||
|
|
996b34b5cb | ||
|
|
8f46b617db | ||
|
|
f7543dd447 | ||
|
|
7d98cc8850 | ||
|
|
b33795533c | ||
|
|
3f4839e5f2 | ||
|
|
cef7c3c5c4 | ||
|
|
a874237bff | ||
|
|
0b4883d07f | ||
|
|
3b3063287b | ||
|
|
be88d103ba | ||
|
|
271a85571d | ||
|
|
5f0584a6e6 | ||
|
|
22d2dd6c90 | ||
|
|
485a6fa859 | ||
|
|
ca8416f18d | ||
|
|
f1456f9707 | ||
|
|
9d904e1113 | ||
|
|
c88e6827b7 | ||
|
|
3d7d57d612 | ||
|
|
fb314b28ff | ||
|
|
aa01f984b7 | ||
|
|
b8bd3a25d7 | ||
|
|
01e7ba4b3a | ||
|
|
e5c953ea92 | ||
|
|
70d682a110 | ||
|
|
21e284e548 | ||
|
|
c2b8ee5554 | ||
|
|
5e8276ed15 | ||
|
|
bc3e3ae029 | ||
|
|
3191ac13e5 | ||
|
|
4f810809c8 | ||
|
|
4e85366416 | ||
|
|
0284292392 | ||
|
|
d9ba27f58f | ||
|
|
b061178606 | ||
|
|
a63633edea | ||
|
|
c740c656a8 | ||
|
|
721c9a2c14 | ||
|
|
7337bfee47 | ||
|
|
5076cfbd71 | ||
|
|
2d506245be | ||
|
|
afa517d907 | ||
|
|
123b262e97 | ||
|
|
267b16235d | ||
|
|
76a6ffe59e | ||
|
|
6ede047680 | ||
|
|
ab7d52d727 | ||
|
|
6c75cf75fe | ||
|
|
827bc32561 | ||
|
|
85ea9eefc6 | ||
|
|
692b53ab85 | ||
|
|
92510c0488 | ||
|
|
765b700a04 | ||
|
|
b569f0d62f | ||
|
|
6e85e5f6a0 | ||
|
|
4b2c707721 | ||
|
|
b3e417fd05 | ||
|
|
231ab22ce4 | ||
|
|
ca1d7ef863 | ||
|
|
7ed4dfbd2d | ||
|
|
cb31f3e092 | ||
|
|
b81a55e5f0 | ||
|
|
6fcb418ae3 | ||
|
|
e7270915ac | ||
|
|
e45401e403 | ||
|
|
fee48f8508 | ||
|
|
d622949d26 | ||
|
|
9618a38215 | ||
|
|
5c0fddae70 | ||
|
|
5c8d822ee1 | ||
|
|
170b3593a0 | ||
|
|
b815fff292 | ||
|
|
329cd7d429 | ||
|
|
53b2f5511b | ||
|
|
1a96db1708 | ||
|
|
ee2a6a851d | ||
|
|
b56b876a98 | ||
|
|
ca3a7f8356 | ||
|
|
c8719fbff5 | ||
|
|
2a1c5b18e8 | ||
|
|
2a3a23f53d | ||
|
|
66d7c00ba3 | ||
|
|
64659e48f8 | ||
|
|
17b4b39c8b | ||
|
|
ad6d7137b8 | ||
|
|
f2e28fa6c4 | ||
|
|
ef7bd4f13a | ||
|
|
f1aba8e3cd | ||
|
|
854e13048b | ||
|
|
0ca08ce81d | ||
|
|
15379ae409 | ||
|
|
7d5fb623c6 | ||
|
|
c0ad15fbc5 | ||
|
|
926566bad5 | ||
|
|
aa825c40da | ||
|
|
423a5a20ba | ||
|
|
594daf8f64 | ||
|
|
d3b4a33ba4 | ||
|
|
ce01b16402 | ||
|
|
39aa478108 | ||
|
|
9206a91701 | ||
|
|
af3b49bf9c | ||
|
|
ad0e2c17ac | ||
|
|
83963287d6 | ||
|
|
d95b662542 | ||
|
|
eb4a0b2560 | ||
|
|
d88d3122c8 | ||
|
|
c94e30293a | ||
|
|
68a8ab9667 | ||
|
|
88e724384c | ||
|
|
50a6e486a5 | ||
|
|
7f25d865a9 | ||
|
|
855a1f702e | ||
|
|
fabbbba037 | ||
|
|
2731c4f8c8 | ||
|
|
a7f717c59c | ||
|
|
ba49981f17 | ||
|
|
05ae55b172 | ||
|
|
b5877ebe44 | ||
|
|
f9a03215b8 | ||
|
|
ff0980c4c1 | ||
|
|
1a58d3f08b | ||
|
|
b71027f622 | ||
|
|
84c03c6f26 | ||
|
|
bf455bc316 | ||
|
|
6af0378916 | ||
|
|
de154065fe | ||
|
|
459e9b7847 | ||
|
|
5e25cdaa6f | ||
|
|
9c5be2a2d8 | ||
|
|
18371fbd4e | ||
|
|
d234ebf484 | ||
|
|
81f1ab75d0 | ||
|
|
daa692a20b | ||
|
|
892c970bfa | ||
|
|
defd041863 | ||
|
|
d4082893ae | ||
|
|
fb2d427a45 | ||
|
|
e9d1cdfe87 | ||
|
|
26ca12d5af | ||
|
|
3fe6d49224 | ||
|
|
2719ae443b | ||
|
|
ec1c2473c2 | ||
|
|
bbf678e718 | ||
|
|
e21eea6ac6 | ||
|
|
99fdcd725b | ||
|
|
b35825e618 | ||
|
|
4eceabeaad | ||
|
|
2e89f37446 | ||
|
|
f88470aa3c | ||
|
|
415da8fc3b | ||
|
|
18e6074aa7 | ||
|
|
4c212776bf | ||
|
|
bf65b9e3a7 | ||
|
|
205d80c75a | ||
|
|
446f1344fc | ||
|
|
460b93a5bc | ||
|
|
6dcead7be5 | ||
|
|
35ae0bf1f2 | ||
|
|
95b93c6bff | ||
|
|
2dedff2200 | ||
|
|
269ed5ddf4 | ||
|
|
795d6b6c40 | ||
|
|
6ead168c82 | ||
|
|
b2aaf1db52 | ||
|
|
f127323c33 | ||
|
|
3fc245d829 | ||
|
|
11c7310f17 | ||
|
|
d88f5ddbaf | ||
|
|
89b62a56e1 | ||
|
|
542793a534 | ||
|
|
360cfdb7ae | ||
|
|
5012bcb976 | ||
|
|
3744c02a01 | ||
|
|
149386a593 | ||
|
|
c2121b5a8d | ||
|
|
a5adb362b0 | ||
|
|
ea8e122fad | ||
|
|
66115490d8 | ||
|
|
0dbfb4ccb1 | ||
|
|
17c072b4bf | ||
|
|
e8bd45d760 | ||
|
|
18c231de29 | ||
|
|
1d78c8bd42 | ||
|
|
8e78857836 | ||
|
|
733f704267 | ||
|
|
841687a1af | ||
|
|
039df1c7c7 | ||
|
|
c7efbf590e | ||
|
|
d203ee4d53 | ||
|
|
932010cd04 | ||
|
|
5771085280 | ||
|
|
76d2419228 | ||
|
|
642ec399ca | ||
|
|
ffbf957fa3 | ||
|
|
a0a6edd303 | ||
|
|
d1c7e8d96f | ||
|
|
a9837a3cbf | ||
|
|
7f8e773b4d | ||
|
|
6eb9b60250 | ||
|
|
e0953cac41 | ||
|
|
adde79259b | ||
|
|
29ae571afa | ||
|
|
2930466d53 | ||
|
|
a296ee085c | ||
|
|
0113db3ff7 | ||
|
|
7cc72f1306 | ||
|
|
4ce552bf94 | ||
|
|
48306409ef | ||
|
|
a18680cb53 | ||
|
|
f4a8368c9e | ||
|
|
bdb8f7da3a | ||
|
|
f43b16b1cb | ||
|
|
65eb6cfbfe | ||
|
|
19267ce3fc | ||
|
|
b85e4057bc | ||
|
|
f30a85f538 | ||
|
|
5fecc2e355 | ||
|
|
052a010b57 | ||
|
|
517b02899a | ||
|
|
411a396fa9 | ||
|
|
9f79fe17fc | ||
|
|
ae3532e9ec | ||
|
|
5cd2ef903a | ||
|
|
c03de2086a | ||
|
|
6627d403d3 | ||
|
|
7224776f80 | ||
|
|
6d93e6324a | ||
|
|
1477bf7a54 | ||
|
|
298d79ef58 | ||
|
|
3a86f8e6c7 | ||
|
|
a1b50b1a0e | ||
|
|
67b6afffd4 | ||
|
|
6df88e1a9f | ||
|
|
f8202408f9 | ||
|
|
61884bda36 | ||
|
|
66584dadcc | ||
|
|
d2cf002e64 | ||
|
|
5944518e6e | ||
|
|
3c8e058b75 | ||
|
|
19502ff9e7 | ||
|
|
b08ff33291 | ||
|
|
5b94af6367 | ||
|
|
18c4ee4b41 | ||
|
|
b0be53ed6a | ||
|
|
e37e1b8f78 | ||
|
|
4d81cf8af4 | ||
|
|
5d31be1c3e | ||
|
|
2b4f150883 | ||
|
|
ea6e819a33 | ||
|
|
7a959723ef | ||
|
|
4227f534b4 | ||
|
|
7d3b157f13 | ||
|
|
ad0feab86c | ||
|
|
2ecd0d011b | ||
|
|
ad7631093d | ||
|
|
2930c85926 | ||
|
|
4f80e5cb54 | ||
|
|
bd8d268255 | ||
|
|
90218821f9 | ||
|
|
6e8d6328ee | ||
|
|
83f29ed09c | ||
|
|
aca6836103 | ||
|
|
cc455ff976 | ||
|
|
b38551dde9 | ||
|
|
f2dde229aa | ||
|
|
c9f1979b05 | ||
|
|
4a35c48ce5 | ||
|
|
f336cf5624 | ||
|
|
30fa57022a | ||
|
|
a0dada5618 | ||
|
|
4ff94b657f | ||
|
|
1504731d53 | ||
|
|
54f9778003 | ||
|
|
9dce68fab4 | ||
|
|
49023adec7 | ||
|
|
ce40229da6 | ||
|
|
8d8d25ff45 | ||
|
|
e5852a6100 | ||
|
|
db4c999272 | ||
|
|
b69a1b2ffe | ||
|
|
9f5e1736a8 | ||
|
|
b3ff27b089 | ||
|
|
2bb5cbc959 | ||
|
|
67e95a1ce7 | ||
|
|
815bc054e7 | ||
|
|
b8af4b20c2 | ||
|
|
e1be842167 | ||
|
|
852cb60ebd | ||
|
|
c06830ccf2 | ||
|
|
e015956de7 | ||
|
|
f96b9c53ce | ||
|
|
12527d1522 | ||
|
|
46422b6a16 | ||
|
|
44d5abdc05 | ||
|
|
50e595503e | ||
|
|
97f0809b62 | ||
|
|
d30a2c5240 | ||
|
|
4378e73fc7 | ||
|
|
e5e932e970 | ||
|
|
335462697e | ||
|
|
7ee6d91ba0 | ||
|
|
a94c4e96ab | ||
|
|
76923de6cf | ||
|
|
e767bb623f | ||
|
|
86e531b848 | ||
|
|
e0dd983c49 | ||
|
|
9dd1f6b634 | ||
|
|
e925eccad2 | ||
|
|
200eeffeee | ||
|
|
7b7e744353 | ||
|
|
0d453039ac | ||
|
|
c790b1051d | ||
|
|
044afefc5c | ||
|
|
5cce0918a9 | ||
|
|
495083249b | ||
|
|
5278686f55 | ||
|
|
d1bb4503d6 | ||
|
|
3a673aff63 | ||
|
|
b6269438e9 | ||
|
|
880aa479bf | ||
|
|
c926a87bdb | ||
|
|
692e14ec82 | ||
|
|
b8934318f3 | ||
|
|
fe7f13e5ad | ||
|
|
b401aee4ce | ||
|
|
7c2388fbfc | ||
|
|
f415413bfb | ||
|
|
303af078f3 | ||
|
|
84eb06ac14 | ||
|
|
fa390f1b14 | ||
|
|
20e9fe9c95 | ||
|
|
a9c61394a8 | ||
|
|
ede3f81eef | ||
|
|
5e2ddaace9 | ||
|
|
11b6fad7ba | ||
|
|
1e069b0fff | ||
|
|
eb336889b7 | ||
|
|
1c57144f8b | ||
|
|
6d30751f1c | ||
|
|
f224ff1d28 | ||
|
|
d33b967196 | ||
|
|
ea115f8595 | ||
|
|
def40ff34d | ||
|
|
bfa1e0dafb | ||
|
|
b52173c854 | ||
|
|
b82d0fcbcc | ||
|
|
8ec1a3e7b9 | ||
|
|
3688dd01ba | ||
|
|
1835f141eb | ||
|
|
750fe3bcc1 | ||
|
|
b5736c5535 | ||
|
|
6c9e6b3baf | ||
|
|
e2a0b0e2b8 | ||
|
|
ebc460b9f9 | ||
|
|
afbdb9f268 | ||
|
|
72f2433120 | ||
|
|
5e38a2a46b | ||
|
|
22b944ef4b | ||
|
|
8657362d86 | ||
|
|
df56f7155e | ||
|
|
b2eebbe194 | ||
|
|
40b63c35ab | ||
|
|
b72dc096f9 | ||
|
|
c571b65221 | ||
|
|
82750bbaec | ||
|
|
d32c455269 | ||
|
|
4cb5927e7a | ||
|
|
ffdec4b485 | ||
|
|
cad42a0e53 | ||
|
|
b4b0b42792 | ||
|
|
7197bc7760 | ||
|
|
fab273cf4d | ||
|
|
0f346991e4 | ||
|
|
15ca164773 | ||
|
|
9c2bfec150 | ||
|
|
9c40f72643 | ||
|
|
b6fe6b7bf4 | ||
|
|
3350145371 | ||
|
|
774ad16404 | ||
|
|
6d7a7c2254 | ||
|
|
7accf4ffa1 | ||
|
|
e1349b9c4a | ||
|
|
d47a4899b4 | ||
|
|
0677c03689 | ||
|
|
1b6e107131 | ||
|
|
7ea368b6d3 | ||
|
|
00b2009851 | ||
|
|
2849cd11ae | ||
|
|
df6bd36e82 | ||
|
|
d862e7bf26 | ||
|
|
4b20e3ad91 | ||
|
|
d418d7638a | ||
|
|
ba458052ea | ||
|
|
a1e8628c21 | ||
|
|
47d3189614 | ||
|
|
b50c832a35 | ||
|
|
414293521e | ||
|
|
65ac71edcc | ||
|
|
f4503af037 | ||
|
|
9e19e419a4 | ||
|
|
7db955374b | ||
|
|
8ddb078db8 | ||
|
|
a11b9e5af7 | ||
|
|
db244e0492 | ||
|
|
3469fd25ec | ||
|
|
378f452eaa | ||
|
|
9490c74746 | ||
|
|
49c848ed42 | ||
|
|
82c4896809 | ||
|
|
5e4f801ad5 | ||
|
|
c1c23269d2 | ||
|
|
8a86b4e4fc | ||
|
|
04151d758b | ||
|
|
bf91da5979 | ||
|
|
1d827d1d2d | ||
|
|
7c32cb1b44 | ||
|
|
8d6fdfd9de | ||
|
|
0df6fa7915 | ||
|
|
5dd6759d01 | ||
|
|
2b6f6b8cbc | ||
|
|
5d0e2244bb | ||
|
|
66e2b6d8c1 | ||
|
|
2f2ea729a7 | ||
|
|
cbedfc8a64 | ||
|
|
9a46b66d04 | ||
|
|
5eee4fc2c7 | ||
|
|
db48cd547b | ||
|
|
6d8f1aeb27 | ||
|
|
acadf00718 | ||
|
|
bfb32cdbd9 | ||
|
|
c54131c8c5 | ||
|
|
0ecf4b1ce0 | ||
|
|
be95b176bc | ||
|
|
e2c9969840 | ||
|
|
9915a07741 | ||
|
|
7acc2b7223 | ||
|
|
5ecf5aef8a | ||
|
|
1339da330e | ||
|
|
6bb19cf1f4 | ||
|
|
d667ec5061 | ||
|
|
e63fea1127 | ||
|
|
93ac5d0eb3 | ||
|
|
4ae3c487a6 | ||
|
|
6c4d658c15 | ||
|
|
ba193665e2 | ||
|
|
66f1aba0f2 | ||
|
|
ef4fad763f | ||
|
|
a42c5b4025 | ||
|
|
5aec9e3b47 | ||
|
|
d7fb0308a7 | ||
|
|
fa5de3ece8 | ||
|
|
be48d73599 | ||
|
|
1cf71656ef | ||
|
|
29e69bd113 | ||
|
|
4d6544591e | ||
|
|
acf9ba4195 | ||
|
|
064d867873 | ||
|
|
bfbee7a7ff | ||
|
|
3400844f9a | ||
|
|
2184aaf9b4 | ||
|
|
f1bb4e02fe | ||
|
|
9385a25c22 | ||
|
|
323bddcce6 | ||
|
|
d29d63d930 | ||
|
|
a62bae9e8f | ||
|
|
f241187c4a | ||
|
|
77406ddd11 | ||
|
|
183e20cc3a | ||
|
|
27e5ed7456 | ||
|
|
d2b2c5286a | ||
|
|
9116c61736 | ||
|
|
4370fb755d | ||
|
|
514f4b9e23 | ||
|
|
b73c8abb79 | ||
|
|
5c81e18b2e | ||
|
|
bba15c6d14 | ||
|
|
28d4fc33d8 | ||
|
|
7dc046b959 | ||
|
|
d7354880e3 | ||
|
|
fff421ad9c | ||
|
|
90e916e164 | ||
|
|
0047abbe7a | ||
|
|
b6a1bedab9 | ||
|
|
88c8992cc3 | ||
|
|
2b2f824b94 | ||
|
|
9882849fda | ||
|
|
c651a79cb6 | ||
|
|
4c28a7771e | ||
|
|
2d234bb676 | ||
|
|
64859fc242 | ||
|
|
06b49b9721 | ||
|
|
630a06cf8f | ||
|
|
95d61ea0fb | ||
|
|
6e2c5d4365 | ||
|
|
545a23734e | ||
|
|
d69a9296a6 | ||
|
|
3fdd2d3fc2 | ||
|
|
db546da3ca | ||
|
|
6a9f1b925d | ||
|
|
bffbf0cd57 | ||
|
|
b5c869d5e7 | ||
|
|
4994000a27 | ||
|
|
d5fdcc96c8 | ||
|
|
aee729bd44 | ||
|
|
92582d5b1f | ||
|
|
8eb5e36aa6 | ||
|
|
fd3ed7cfa5 | ||
|
|
4e13ce33c5 | ||
|
|
eab9e647f4 | ||
|
|
e67819f532 | ||
|
|
29cddabfe4 | ||
|
|
4c9dfcc5d7 | ||
|
|
945a535570 | ||
|
|
4024d82412 | ||
|
|
8208a12a76 | ||
|
|
d3c37de753 | ||
|
|
a7fdd8d002 | ||
|
|
92bd366c1b | ||
|
|
5b0622cf00 | ||
|
|
98a96f5b58 | ||
|
|
0494b1b608 | ||
|
|
494bdfa013 | ||
|
|
97db461e7f | ||
|
|
45a2017580 | ||
|
|
0199583435 | ||
|
|
4a71ee1288 | ||
|
|
4b99fe2288 | ||
|
|
b1213f1385 | ||
|
|
f43abc42f9 | ||
|
|
485201ba2e | ||
|
|
e32572e4e6 | ||
|
|
ebdc3a0393 | ||
|
|
e0c6384ed3 | ||
|
|
98750e1ae5 | ||
|
|
efce176ceb | ||
|
|
f26ebac8dd | ||
|
|
4ce8037e73 | ||
|
|
8116e80140 | ||
|
|
3436836b94 | ||
|
|
4e965cba47 | ||
|
|
9b14408b1b | ||
|
|
f28e43717b | ||
|
|
059e7424c1 | ||
|
|
6b5ad163d3 | ||
|
|
7ad47c34e8 | ||
|
|
a328fd995b | ||
|
|
bcc69da569 | ||
|
|
dfa77e6c19 | ||
|
|
9752b83e65 | ||
|
|
4208798585 | ||
|
|
8a6ba7fc4c | ||
|
|
f2d2632eca | ||
|
|
1123169bbd | ||
|
|
79320e3ba7 | ||
|
|
5d55dd9879 | ||
|
|
fb2caf63e5 | ||
|
|
1c11055241 | ||
|
|
ba4ead6ead | ||
|
|
3d797b9eb8 | ||
|
|
28fb5b5207 | ||
|
|
1516c08e89 | ||
|
|
6e6495664c | ||
|
|
ced5569a25 | ||
|
|
37e3111069 | ||
|
|
45439f07d7 | ||
|
|
6126237bc4 | ||
|
|
0cc7ee5511 | ||
|
|
dd2b9943a7 | ||
|
|
d6e001ac7e | ||
|
|
452aa6c614 | ||
|
|
24abbb6de7 | ||
|
|
8c92ea1642 | ||
|
|
1bf2b43d30 | ||
|
|
349f62cd7c | ||
|
|
10dd8a8e73 | ||
|
|
3a6e87744b | ||
|
|
67ccbdae96 | ||
|
|
debfdf0a39 | ||
|
|
6d18f57e96 | ||
|
|
373bb56441 | ||
|
|
e678fb8578 | ||
|
|
80a6ece45b | ||
|
|
f5b2928cbb | ||
|
|
c7adb572d0 | ||
|
|
de6c4f85bc | ||
|
|
9fd1fd366c | ||
|
|
24a32d5202 | ||
|
|
3695c349c6 | ||
|
|
40f5aac764 | ||
|
|
674b7b6f92 | ||
|
|
6f480d1d85 | ||
|
|
081c3282b7 | ||
|
|
2e025cfd76 | ||
|
|
4e29dba1d5 | ||
|
|
c4b4e90031 | ||
|
|
c12f853db2 | ||
|
|
f139d8ebed | ||
|
|
a0e687965e | ||
|
|
644c3a87e3 | ||
|
|
153300f6d1 | ||
|
|
2508cc9de6 | ||
|
|
d2bfb51611 | ||
|
|
28233b0711 | ||
|
|
806734cc56 | ||
|
|
021b18335c | ||
|
|
23f218eb8e | ||
|
|
8e141070b2 | ||
|
|
d32257c2d5 | ||
|
|
37a1611b54 | ||
|
|
24e216ae82 | ||
|
|
c77c35152d | ||
|
|
cbbf95ee55 | ||
|
|
723943fd1f | ||
|
|
b6c249be0c | ||
|
|
0cfc95993a | ||
|
|
b46417c77b | ||
|
|
33d92d2a1f | ||
|
|
0f4e195819 | ||
|
|
9785824794 | ||
|
|
4f3d6427ce | ||
|
|
a1b7c36db5 | ||
|
|
f0eb599ff1 | ||
|
|
7b30745800 | ||
|
|
afb1cc21b6 | ||
|
|
aa77892be4 | ||
|
|
b009c0d480 | ||
|
|
54fef433e9 | ||
|
|
b2fe405365 | ||
|
|
ab1b6bcea5 | ||
|
|
1b0c53e30e | ||
|
|
44555de69a | ||
|
|
e4674cd7b5 | ||
|
|
a2c48539cd | ||
|
|
d9f3cf332c | ||
|
|
b43b0e0195 | ||
|
|
51adba6ee0 | ||
|
|
d06ee1ee9c | ||
|
|
7c539b9539 | ||
|
|
f8b245eb31 | ||
|
|
4a6d8d0b3a | ||
|
|
0f1408e0ea | ||
|
|
411745ebce | ||
|
|
f448ddd579 | ||
|
|
29c45100fa | ||
|
|
a4f91a8543 | ||
|
|
1f45ab63d1 | ||
|
|
0f6e85466a | ||
|
|
417b2eb8c6 | ||
|
|
3bbfaf532e | ||
|
|
c7358d14c8 | ||
|
|
67eb0e8317 | ||
|
|
83586aebcc | ||
|
|
c1a43b896c | ||
|
|
0fcb2f7590 | ||
|
|
e3868effe1 | ||
|
|
b9c6806e45 | ||
|
|
b8208d72f7 | ||
|
|
52cb42ba3d | ||
|
|
b3aa79e9aa | ||
|
|
5c25d3c3b1 | ||
|
|
ef7aa793c6 | ||
|
|
fbf9ac8046 | ||
|
|
fac29e775a | ||
|
|
fb6d3c3669 | ||
|
|
d6dccc3c88 | ||
|
|
00c7baf68c | ||
|
|
0e512f8033 | ||
|
|
f36a7262db | ||
|
|
8a5b1ccc17 | ||
|
|
52a2bed38c | ||
|
|
cbfbac2198 | ||
|
|
a9b7dd1a9b | ||
|
|
4decacb933 | ||
|
|
620eed466b | ||
|
|
33fe575112 | ||
|
|
13f7e6d0a5 | ||
|
|
44a8344da1 | ||
|
|
92919effc5 | ||
|
|
046cadb53a | ||
|
|
a5f99afa47 | ||
|
|
24397c71cd | ||
|
|
566ff38fee | ||
|
|
7ea2ab4ebb | ||
|
|
e6e647092d | ||
|
|
5845a3f7ad | ||
|
|
ff8a879e80 | ||
|
|
6749a44d0f | ||
|
|
550a076fa3 | ||
|
|
c28659a045 | ||
|
|
d2608588fc | ||
|
|
dd333cdc82 | ||
|
|
57a7920e15 | ||
|
|
2f99a82700 | ||
|
|
5f76fc3e41 | ||
|
|
c0a2b55efd | ||
|
|
f75912d205 | ||
|
|
701853fdd3 | ||
|
|
ea2c53ca85 | ||
|
|
06105e9207 | ||
|
|
e858322749 | ||
|
|
bd2ddda9a4 | ||
|
|
6db110916b | ||
|
|
d707a516d2 | ||
|
|
aed52049ab | ||
|
|
5fed900b94 | ||
|
|
70ba81e5b3 | ||
|
|
f237fb7b9f | ||
|
|
7069f3fe40 |
8
.cargo/config.toml
Normal file
8
.cargo/config.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# This file is _not_ included in the tarballs for now
|
||||||
|
# Binary builds on Linux packaging infrastructure need to overwrite it to make `cargo vendor` work
|
||||||
|
# Releases and development builds made using OBS/Launchpad will _not_ reflect the contents of this
|
||||||
|
# file
|
||||||
|
|
||||||
|
[resolver]
|
||||||
|
# Make cargo 1.84+ respect MSRV (rust-version in Cargo.toml)
|
||||||
|
incompatible-rust-versions = "fallback"
|
||||||
12
.gitattributes
vendored
12
.gitattributes
vendored
@@ -5,9 +5,10 @@
|
|||||||
|
|
||||||
# let git show off diff hunk headers, help git diff -L:
|
# let git show off diff hunk headers, help git diff -L:
|
||||||
# https://git-scm.com/docs/gitattributes
|
# https://git-scm.com/docs/gitattributes
|
||||||
*.cpp diff=cpp
|
*.c diff=cpp
|
||||||
*.h diff=cpp
|
*.h diff=cpp
|
||||||
*.py diff=py
|
*.py diff=py
|
||||||
|
*.rs diff=rust
|
||||||
# add a [diff "fish"] to git config with pattern
|
# add a [diff "fish"] to git config with pattern
|
||||||
*.fish diff=fish
|
*.fish diff=fish
|
||||||
|
|
||||||
@@ -21,12 +22,13 @@
|
|||||||
/.github/* export-ignore
|
/.github/* export-ignore
|
||||||
/.builds export-ignore
|
/.builds export-ignore
|
||||||
/.builds/* export-ignore
|
/.builds/* export-ignore
|
||||||
|
# to make cargo vendor work correctly
|
||||||
|
/.cargo/ export-ignore
|
||||||
|
/.cargo/config.toml export-ignore
|
||||||
|
|
||||||
# for linguist; let github identify our project as C++ instead of C due to pcre2
|
# for linguist, which drives GitHub's language statistics
|
||||||
pcre2/** linguist-vendored
|
|
||||||
alpine.js linguist-vendored
|
alpine.js linguist-vendored
|
||||||
doc_src/** linguist-documentation
|
doc_src/** linguist-documentation
|
||||||
*.fish linguist-language=fish
|
*.fish linguist-language=fish
|
||||||
src/*.h linguist-language=c++
|
# see 70f2899fcd which attempts to "rig the count"
|
||||||
src/builtins/*.h linguist-language=c++
|
|
||||||
share/completions/*.fish linguist-documentation
|
share/completions/*.fish linguist-documentation
|
||||||
|
|||||||
@@ -1,10 +1,18 @@
|
|||||||
|
---
|
||||||
|
name: "Bug Report"
|
||||||
|
about: "Simple template for bug reports"
|
||||||
|
title: ""
|
||||||
|
labels: []
|
||||||
|
assignees: []
|
||||||
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Please tell us which fish version you are using by executing the following:
|
Please tell us which fish version you are using by executing the following:
|
||||||
|
|
||||||
fish --version
|
fish --version
|
||||||
echo $version
|
echo $version
|
||||||
|
|
||||||
Please tell us which operating system and terminal you are using. The output of `uname -a` and `echo $TERM` may be helpful in this regard although other commands might be relevant in your specific situation.
|
Please tell us which operating system (output of `uname`) and terminal you are using.
|
||||||
|
|
||||||
Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting:
|
Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting:
|
||||||
|
|
||||||
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
@@ -1,9 +1,9 @@
|
|||||||
name: make test
|
name: make fish_run_tests
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CTEST_PARALLEL_LEVEL: "1"
|
CTEST_PARALLEL_LEVEL: "4"
|
||||||
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -28,10 +28,10 @@ jobs:
|
|||||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make VERBOSE=1
|
make -C build VERBOSE=1
|
||||||
- name: make test
|
- name: make fish_run_tests
|
||||||
run: |
|
run: |
|
||||||
make VERBOSE=1 test
|
make -C build VERBOSE=1 fish_run_tests
|
||||||
|
|
||||||
ubuntu-32bit-static-pcre2:
|
ubuntu-32bit-static-pcre2:
|
||||||
|
|
||||||
@@ -54,10 +54,10 @@ jobs:
|
|||||||
cmake -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i586-unknown-linux-gnu ..
|
cmake -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i586-unknown-linux-gnu ..
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make VERBOSE=1
|
make -C build VERBOSE=1
|
||||||
- name: make test
|
- name: make fish_run_tests
|
||||||
run: |
|
run: |
|
||||||
make VERBOSE=1 test
|
make -C build VERBOSE=1 fish_run_tests
|
||||||
|
|
||||||
ubuntu-asan:
|
ubuntu-asan:
|
||||||
|
|
||||||
@@ -92,8 +92,8 @@ jobs:
|
|||||||
cmake .. -DASAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=Debug
|
cmake .. -DASAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=Debug
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make VERBOSE=1
|
make -C build VERBOSE=1
|
||||||
- name: make test
|
- name: make fish_run_tests
|
||||||
env:
|
env:
|
||||||
FISH_CI_SAN: 1
|
FISH_CI_SAN: 1
|
||||||
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1:fast_unwind_on_malloc=0
|
ASAN_OPTIONS: check_initialization_order=1:detect_stack_use_after_return=1:detect_leaks=1:fast_unwind_on_malloc=0
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
llvm_version=$(clang --version | awk 'NR==1 { split($NF, version, "."); print version[1] }')
|
llvm_version=$(clang --version | awk 'NR==1 { split($NF, version, "."); print version[1] }')
|
||||||
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-$llvm_version
|
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-$llvm_version
|
||||||
export LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$PWD/build_tools/lsan_suppressions.txt"
|
export LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$PWD/build_tools/lsan_suppressions.txt"
|
||||||
make VERBOSE=1 test
|
make -C build VERBOSE=1 fish_run_tests
|
||||||
|
|
||||||
# Our clang++ tsan builds are not recognizing safe rust patterns (such as the fact that Drop
|
# Our clang++ tsan builds are not recognizing safe rust patterns (such as the fact that Drop
|
||||||
# cannot be called while a thread is using the object in question). Rust has its own way of
|
# cannot be called while a thread is using the object in question). Rust has its own way of
|
||||||
@@ -133,9 +133,9 @@ jobs:
|
|||||||
# - name: make
|
# - name: make
|
||||||
# run: |
|
# run: |
|
||||||
# make
|
# make
|
||||||
# - name: make test
|
# - name: make fish_run_tests
|
||||||
# run: |
|
# run: |
|
||||||
# make test
|
# make -C build fish_run_tests
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ jobs:
|
|||||||
cmake -DWITH_GETTEXT=NO -DCMAKE_BUILD_TYPE=Debug ..
|
cmake -DWITH_GETTEXT=NO -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make VERBOSE=1
|
make -C build VERBOSE=1
|
||||||
- name: make test
|
- name: make fish_run_tests
|
||||||
run: |
|
run: |
|
||||||
make VERBOSE=1 test
|
make -C build VERBOSE=1 fish_run_tests
|
||||||
|
|||||||
23
.github/workflows/staticbuild.yml
vendored
23
.github/workflows/staticbuild.yml
vendored
@@ -32,22 +32,20 @@ jobs:
|
|||||||
sudo apt install musl-tools crossbuild-essential-arm64 python3-pexpect tmux -y
|
sudo apt install musl-tools crossbuild-essential-arm64 python3-pexpect tmux -y
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" CMAKE_WITH_GETTEXT=0 CC=aarch64-linux-gnu-gcc RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc -C link-arg=-lgcc -C link-arg=-D_FORTIFY_SOURCE=0" cargo build --release --target aarch64-unknown-linux-musl
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" CMAKE_WITH_GETTEXT=0 CC=aarch64-linux-gnu-gcc RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc -C link-arg=-lgcc -C link-arg=-D_FORTIFY_SOURCE=0" cargo build --release --target aarch64-unknown-linux-musl --bin fish
|
||||||
cargo build --release --target x86_64-unknown-linux-musl
|
cargo build --release --target x86_64-unknown-linux-musl
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
FISHDIR=target/x86_64-unknown-linux-musl/release/ tests/test_driver.sh tests/test.fish
|
test -e tests/test_driver.py && tests/test_driver.py -f /tmp target/x86_64-unknown-linux-musl/release/
|
||||||
FISHDIR=target/x86_64-unknown-linux-musl/release/ tests/test_driver.sh tests/interactive.fish
|
|
||||||
- name: Compress
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
tar -cazf fish-amd64.tar.xz -C target/x86_64-unknown-linux-musl/release/ fish{,_indent,_key_reader}
|
tar -cazf fish-static-x86_64-$(git describe).tar.xz -C target/x86_64-unknown-linux-musl/release/ fish
|
||||||
tar -cazf fish-aarch64.tar.xz -C target/aarch64-unknown-linux-musl/release/ fish{,_indent,_key_reader}
|
tar -cazf fish-static-aarch64-$(git describe).tar.xz -C target/aarch64-unknown-linux-musl/release/ fish
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: fish-static-linux
|
name: fish-static-linux
|
||||||
path: |
|
path: |
|
||||||
fish-amd64.tar.xz
|
fish-*.tar.xz
|
||||||
fish-aarch64.tar.xz
|
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
staticbuilds-macos:
|
staticbuilds-macos:
|
||||||
|
|
||||||
@@ -68,16 +66,15 @@ jobs:
|
|||||||
rustup target add aarch64-apple-darwin
|
rustup target add aarch64-apple-darwin
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target aarch64-apple-darwin
|
PCRE2_SYS_STATIC=1 cargo build --release --target aarch64-apple-darwin --bin fish
|
||||||
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-apple-darwin
|
PCRE2_SYS_STATIC=1 cargo build --release --target x86_64-apple-darwin --bin fish
|
||||||
- name: Compress
|
- name: Compress
|
||||||
run: |
|
run: |
|
||||||
tar -cazf fish-macos-aarch64.tar.xz -C target/aarch64-apple-darwin/release/ fish{,_indent,_key_reader}
|
tar -cazf fish-macos-aarch64.tar.xz -C target/aarch64-apple-darwin/release/ fish
|
||||||
tar -cazf fish-macos-amd64.tar.xz -C target/x86_64-apple-darwin/release/ fish{,_indent,_key_reader}
|
tar -cazf fish-macos-x86_64.tar.xz -C target/x86_64-apple-darwin/release/ fish
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: fish-static-macos
|
name: fish-static-macos
|
||||||
path: |
|
path: |
|
||||||
fish-macos-amd64.tar.xz
|
fish-macos-*.tar.xz
|
||||||
fish-macos-aarch64.tar.xz
|
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ PREFIX?=/usr/local
|
|||||||
build/fish: build/$(BUILDFILE)
|
build/fish: build/$(BUILDFILE)
|
||||||
$(CMAKE) --build build
|
$(CMAKE) --build build
|
||||||
|
|
||||||
# Don't split the mkdir into its own rule because that would cause CMake to regenerate the build
|
# Don't split the mkdir into its own rule because that would cause CMake to regenerate the build
|
||||||
# files after each build (because it adds the mdate of the build directory into the out-of-date
|
# files after each build (because it adds the mdate of the build directory into the out-of-date
|
||||||
# calculation tree). GNUmake supports order-only dependencies, BSDmake does not seem to.
|
# calculation tree). GNUmake supports order-only dependencies, BSDmake does not seem to.
|
||||||
build/$(BUILDFILE):
|
build/$(BUILDFILE):
|
||||||
@@ -48,7 +48,11 @@ clean:
|
|||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: build/fish
|
test: build/fish
|
||||||
$(CMAKE) --build build --target test
|
$(CMAKE) --build build --target fish_run_tests
|
||||||
|
|
||||||
|
.PHONY: fish_run_tests
|
||||||
|
fish_run_tests: build/fish
|
||||||
|
$(CMAKE) --build build --target fish_run_tests
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
run: build/fish
|
run: build/fish
|
||||||
|
|||||||
221
CHANGELOG.rst
221
CHANGELOG.rst
@@ -3,52 +3,142 @@ fish 4.1.0 (released ???)
|
|||||||
|
|
||||||
Notable improvements and fixes
|
Notable improvements and fixes
|
||||||
------------------------------
|
------------------------------
|
||||||
|
- Compound commands (``begin; echo 1; echo 2; end``) can now be now be abbreviated using braces (``{ echo1; echo 2 }``), like in other shells.
|
||||||
|
- Fish now supports transient prompts: if :envvar:`fish_transient_prompt` is set to 1, fish will reexecute prompt functions with the ``--final-rendering`` argument before running a commandline (:issue:`11153`).
|
||||||
|
- When tab completion results are truncated, any common directory name is omitted. E.g. if you complete "share/functions", and it includes the files "foo.fish" and "bar.fish",
|
||||||
|
the completion pager will now show "…/foo.fish" and "…/bar.fish". This will make the candidates shorter and allow for more to be shown at once (:issue:`11250`).
|
||||||
|
- The self-installing configuration introduced in fish 4.0 has been changed.
|
||||||
|
Now fish built with embedded data will just read the data straight from its own binary or write it out when necessary, instead of requiring an installation step on start.
|
||||||
|
That means it is now possible to build fish as a single file and copy it to a compatible system, including as a different user, without extracting any files.
|
||||||
|
As before this is the default when building via `cargo`, and disabled when building via `cmake`, and for packagers we continue to recommend cmake.
|
||||||
|
|
||||||
|
Note: When fish is built like this, the `$__fish_data_dir` variable will be empty because that directory no longer has meaning. If you need to load files from there,
|
||||||
|
use `status get-file` or find alternatives (like loading completions for "foo" via `complete -C"foo "`).
|
||||||
|
|
||||||
|
We're considering making data embedding mandatory in future releases because it has a few advantages even for installation from a package (like making file conflicts with other packages impossible). (:issue:`11143`)
|
||||||
|
|
||||||
Deprecations and removed features
|
Deprecations and removed features
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
- Tokens like ``{ echo, echo }`` in command position are no longer interpreted as brace expansion but as compound command.
|
||||||
|
- Terminfo-style key names (``bind -k``) are no longer supported. They had been superseded by the native notation since 4.0,
|
||||||
|
and currently they would map back to information from terminfo, which does not match what terminals would send with the kitty keyboard protocol (:issue:`11342`).
|
||||||
|
- fish no longer reads the terminfo database, so its behavior is no longer affected by the :envvar:`TERM` environment variable (:issue:`11344`).
|
||||||
|
For the time being, this can be turned off via the "ignore-terminfo" feature flag::
|
||||||
|
|
||||||
|
set -Ua fish_features no-ignore-terminfo
|
||||||
|
|
||||||
|
- The ``--install`` option when fish is built as self-installable was removed. If you need to write out fish's data you can use the new ``status list-files`` and ``status get-file`` subcommands, but it should no longer be necessary. (:issue:`11143`)
|
||||||
|
- RGB colors (``set_color ff0000``) now default to using 24-bit RGB true-color commands, even if $COLORTERM is unset, because that is often lost e.g. over ssh (:issue:`11372`)
|
||||||
|
|
||||||
|
- To go back to using the nearest match from the 256-color palette, use ``set fish_term24bit 0`` or set $COLORTERM to a value that is not "24bit" or "truecolor".
|
||||||
|
To make the nearest-match logic use the 16 color palette instead, use ``set fish_term256 0``.
|
||||||
|
- Inside macOS Terminal.app, fish makes an attempt to still use the palette colors.
|
||||||
|
If that doesn't work, use ``set fish_term24bit 0``.
|
||||||
|
- ``set_color --background=COLOR`` no longer implicitly activates bold mode.
|
||||||
|
To mitigate this change on existing installations that use a default theme, update your theme with ``fish_config theme choose`` or ``fish_config theme save``.
|
||||||
|
|
||||||
Scripting improvements
|
Scripting improvements
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Interactive improvements
|
Interactive improvements
|
||||||
------------------------
|
------------------------
|
||||||
- Autosuggestions are now also provided in multi-line command lines. Like `ctrl-r`, autosuggestions operate only on the current line.
|
- Autosuggestions are now also provided in multi-line command lines. Like `ctrl-r`, autosuggestions operate only on the current line.
|
||||||
- New feature flag ``buffered-enter-noexec`` with the following effect:
|
- Autosuggestions used to not suggest multi-line commandlines from history; now autosuggestions include individual lines from multi-line command lines.
|
||||||
when typing a command and :kbd:`enter` while the previous one is still running, the new one will no longer execute immediately. Similarly, keys that are bound to shell commands will be ignored.
|
- The history search now preserves ordering between :kbd:`ctrl-s` forward and :kbd:`ctrl-r` backward searches.
|
||||||
This mitigates a security issue where a command like ``cat malicious-file.txt`` could write terminal escape codes prompting the terminal to write arbitrary text to fish's standard input.
|
- Left mouse click (as requested by `click_events <terminal-compatibility.html#click-events>`__) can now select pager items (:issue:`10932`).
|
||||||
Such a malicious file can still potentially insert arbitrary text into the command line but can no longer execute it directly (:issue:`10987`).
|
- Instead of flashing all the text to the left of the cursor, fish now flashes the matched token during history token search, the completed token during completion (:issue:`11050`), the autosuggestion when deleting it, and the full command line in all other cases.
|
||||||
|
- Pasted commands are now stripped of any ``$`` prefix.
|
||||||
|
|
||||||
New or improved bindings
|
New or improved bindings
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
- On non-macOS systems, :kbd:`alt-left`, :kbd:`alt-right`, :kbd:`alt-backspace`, :kbd:`alt-delete` no longer operate on punctuation-delimited words but on whole arguments, possibly including special characters like ``/`` and quoted spaces.
|
||||||
|
On macOS, the corresponding :kbd:`ctrl-` prefixed keys operate on whole arguments.
|
||||||
|
Word operations are still available via the other respective modifier, same as in the browser.
|
||||||
- :kbd:`ctrl-z` (undo) after executing a command will restore the previous cursor position instead of placing the cursor at the end of the command line.
|
- :kbd:`ctrl-z` (undo) after executing a command will restore the previous cursor position instead of placing the cursor at the end of the command line.
|
||||||
- The OSC 133 prompt marking feature has learned about kitty's ``click_events=1`` flag, which allows moving fish's cursor by clicking.
|
- The OSC 133 prompt marking feature has learned about kitty's ``click_events=1`` flag, which allows moving fish's cursor by clicking.
|
||||||
- :kbd:`ctrl-l` no longer clears the screen but only pushes to the terminal's scrollback all text above the prompt (via a new special input function ``scrollback-push``).
|
- :kbd:`ctrl-l` now pushes all text located above the prompt to the terminal's scrollback, before clearing and redrawing the screen (via a new special input function ``scrollback-push``).
|
||||||
This feature depends on the terminal advertising via XTGETTCAP support for the ``indn`` and ``cuu`` terminfo capabilities,
|
For compatibility with terminals that do not provide the scroll-forward command,
|
||||||
and on the terminal supporting Synchronized Output (which is used by fish to detect features).
|
this is only enabled by default if the terminal advertises support for the ``indn`` capability via XTGETTCAP.
|
||||||
If any is missing, the binding falls back to ``clear-screen``.
|
- Bindings using shift with non-ASCII letters (such as :kbd:`ctrl-shift-ä`) are now supported.
|
||||||
|
If there is any modifier other than shift, this is the recommended notation (as opposed to :kbd:`ctrl-Ä`).
|
||||||
|
|
||||||
Completions
|
Completions
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Improved terminal support
|
Improved terminal support
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
- Support for curly underlines in `fish_color_*` variables and :doc:`set_color <cmds/set_color>` (:issue:`10957`).
|
||||||
|
- Underlines can now be colored independent of text (:issue:`7619`).
|
||||||
|
- New documentation page `Terminal Compatibility <terminal-compatibility.html>`_ (also accessible via ``man fish-terminal-compatibility``) lists required and optional terminal control sequences used by fish.
|
||||||
|
|
||||||
Other improvements
|
Other improvements
|
||||||
------------------
|
------------------
|
||||||
|
- ``fish_indent`` and ``fish_key_reader`` are now available as builtins, and if fish is called with that name it will act like the given tool (as a multi-call binary).
|
||||||
|
This allows truly distributing fish as a single file. (:issue:`10876`)
|
||||||
|
- ``fish_indent --dump-parse-tree`` now emits simple metrics about the tree including its memory consumption.
|
||||||
|
|
||||||
For distributors
|
For distributors
|
||||||
----------------
|
----------------
|
||||||
|
- ``fish_indent`` and ``fish_key_reader`` are still built as separate binaries for now, but can also be replaced with a symlink if you want to save disk space (:issue:`10876`).
|
||||||
|
- The CMake system was simplified and no longer second-guesses rustup. It will run rustc and cargo via $PATH or in ~/.cargo/bin/.
|
||||||
|
If that doesn't match your setup, set the Rust_COMPILER and Rust_CARGO cmake variables (:issue:`11328`).
|
||||||
|
- Cygwin support has been reintroduced, since rust gained a Cygwin target (https://github.com/rust-lang/rust/pull/134999, :issue:`11238`).
|
||||||
|
|
||||||
fish 4.0b1 (released December 17, 2024)
|
--------------
|
||||||
|
|
||||||
|
fish 4.0.2 (released April 20, 2025)
|
||||||
|
====================================
|
||||||
|
|
||||||
|
This release of fish fixes a number of issues identified in fish 4.0.1:
|
||||||
|
|
||||||
|
- Completions are quoted, rather than backslash-escaped, only if the completion is unambiguous. Continuing to edit the token is therefore easier (:issue:`11271`). This changes the behavior introduced in 4.0.0 where all completions were quoted.
|
||||||
|
- The warning when the terminfo database can't be found has been downgraded to a log message. fish will act as if the terminal behaves like xterm-256color, which is correct for the vast majority of cases (:issue:`11277`, :issue:`11290`).
|
||||||
|
- Key combinations using the super (Windows/command) key can now (actually) be bound using the :kbd:`super-` prefix (:issue:`11217`). This was listed in the release notes for 4.0.1 but did not work correctly.
|
||||||
|
- :doc:`function <cmds/function>` is stricter about argument parsing, rather than allowing additional parameters to be silently ignored (:issue:`11295`).
|
||||||
|
- Using parentheses in the :doc:`test <cmds/test>` builtin works correctly, following a regression in 4.0.0 where they were not recognized (:issue:`11387`).
|
||||||
|
- :kbd:`delete` in Vi mode when Num Lock is active will work correctly (:issue:`11303`).
|
||||||
|
- Abbreviations cannot alter the command-line contents, preventing a crash (:issue:`11324`).
|
||||||
|
- Improvements to various completions, including new completions for ``wl-randr`` (:issue:`11301`), performance improvements for ``cargo`` completions by avoiding network requests (:issue:`11347`), and other improvements for ``btrfs`` (:issue:`11320`), ``cryptsetup`` (:issue:`11315`), ``git`` (:issue:`11319`, :issue:`11322`, :issue:`11323`), ``jj`` (:issue:`11046`), and ``systemd-analyze`` (:issue:`11314`).
|
||||||
|
- The Mercurial (``hg``) prompt can handle working directories that contain an embedded newline, rather than producing errors (:issue:`11348`).
|
||||||
|
- A number of crashes have been fixed. Triggers include prompts containing backspace characters (:issue:`11280`), history pager search (:issue:`11355`), invalid UTF-8 in :doc:`read <cmds/read>` (:issue:`11383`), and the ``kill-selection`` binding (:issue:`11367`).
|
||||||
|
- A race condition in the test suite has been fixed (:issue:`11254`), and a test for fish versioning relaxed to support downstream distributors' modifications (:issue:`11173`).
|
||||||
|
- Small improvements to the documentation (:issue:`11264`, :issue:`11329`, :issue:`11361`).
|
||||||
|
|
||||||
|
--------------
|
||||||
|
|
||||||
|
fish 4.0.1 (released March 12, 2025)
|
||||||
|
====================================
|
||||||
|
|
||||||
|
This release of fish includes the following improvements compared to fish 4.0.0:
|
||||||
|
|
||||||
|
- Key combinations using the super (Windows/command) key can be bound using the :kbd:`super-` prefix (:issue:`11217`).
|
||||||
|
- Konsole's menu shows the "Open folder with" option again (:issue:`11198`).
|
||||||
|
- ``$fish_color_search_match`` will now only be applied to the foreground color if it has an explicit foreground. For example, this allows setting::
|
||||||
|
set -g fish_color_search_match --reverse
|
||||||
|
- Cursor shape commands (``\e[2 q``) are no longer sent in non-interactive shells or in redirections (:issue:`11255`).
|
||||||
|
- :doc:`status <cmds/status>` gained a ``is-interactive-read`` subcommand, to check whether the script is being called from an interactive :doc:`read <cmds/read>` invocation.
|
||||||
|
- fish's background tasks are now started in a way that avoids an error on macOS Terminal.app (:issue:`11181`).
|
||||||
|
- Using key combinations within qemu should work correctly.
|
||||||
|
- Prompts containing control characters no longer cause incorrect display of command lines (:issue:`11252`).
|
||||||
|
- Cancelling the command-line in Vi mode displays correctly again (:issue:`11261`).
|
||||||
|
- The acidhub prompt properly displays the git branch again (:issue:`11179`).
|
||||||
|
- Completions for ``wine`` correctly include files again (:issue:`11202`).
|
||||||
|
- On macOS, paths from ``/etc/paths`` and ``/etc/manpaths`` containing colons are handled correctly (:issue:`10684`). This functionality was included in the 4.0.0 release notes but was missing from the source code.
|
||||||
|
- The XTerm ``modifyOtherKeys`` keyboard encoding is no longer used under WezTerm, as it does not work correctly in all layouts (:issue:`11204`).
|
||||||
|
- :kbd:`option-left` and other similar keys should now work in iTerm versions before 3.5.12; the kitty keyboard protocol is now disabled on these versions (:issue:`11192`).
|
||||||
|
- The kitty keyboard protocol is no longer used under Midnight Commander, as it does not work correctly (:issue:`10640`).
|
||||||
|
- fish now sends the commandline along with the OSC 133 semantic prompt command start sequence. This fixes a test in the kitty terminal (:issue:`11203`).
|
||||||
|
- Git completions for third-party commands like "git-absorb" are completed correctly again (:issue:`11205`).
|
||||||
|
- Completions for ``diskutil`` no longer produce an error (:issue:`11201`).
|
||||||
|
- The output of certain error messages no longer prints newlines to standard output (:issue:`11248`).
|
||||||
|
- A number of crashes have been fixed, including file names longer than 255 bytes (:issue:`11221`), using fish on a btrfs filesystem (:issue:`11219`), history files that do not have the expected format (:issue:`11236`), and pasting into an empty command line (:issue:`11256`).
|
||||||
|
|
||||||
|
--------------
|
||||||
|
|
||||||
|
fish 4.0.0 (released February 27, 2025)
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
These are the draft release notes for fish 4.0.0. Like this release of fish itself, they are in beta and are not complete. Please report any issues you find.
|
fish's core code has been ported from C++ to Rust (:issue:`9512`). This means a large change in dependencies and how to build fish. However, there should be no direct impact on users. Packagers should see the :ref:`For Distributors <rust-packaging>` section at the end.
|
||||||
|
|
||||||
.. ignore: 751 2037 2037 3017 3018 3162 3299 4770 4865 5284 5991 6981 6996 7172 9332 9439 9440 9442 9452 9469 9480 9482 9520 9536 9541 9542 9544 9554 9556 9559 9561 9563 9566 9567 9568 9573 9575 9576 9579 9585 9586 9588 9589 9591 9592 9593 9594 9599 9600 9603 9607 9608 9612 9613 9615 9616 9619 9621 9625 9626 9630 9636 9637 9638 9641 9642 9643 9653 9654 9658 9661 9666 9671 9673 9688 9725 9726 9729 9735 9739 9745 9746 9751 9754 9765 9767 9768 9771 9777 9778 9786 9816 9818 9821 9839 9845 9856 9859 9861 9863 9864 9867 9869 9873 9874 9879 9881 9893 9894 9896 9902 9916 9923 9925 9927 9928 9930 9947 9948 9950 9952 9962 9963 9966 9968 9980 9981 9984 9990 9991 10040 10061 10090 10101 10102 10108 10114 10115 10121 10128 10129 10143 10145 10146 10161 10173 10174 10175 10179 10180 10181 10182 10184 10185 10186 10188 10195 10198 10200 10201 10204 10210 10214 10219 10220 10222 10223 10227 10228 10232 10235 10237 10241 10243 10244 10245 10246 10251 10254 10260 10263 10267 10268 10270 10272 10276 10277 10278 10279 10281 10288 10290 10291 10293 10305 10306 10307 10308 10309 10316 10317 10321 10327 10328 10329 10330 10336 10338 10340 10342 10345 10346 10347 10348 10349 10353 10354 10355 10356 10357 10358 10360 10366 10368 10370 10371 10372 10373 10377 10379 10381 10388 10389 10390 10395 10398 10400 10403 10404 10407 10408 10409 10411 10412 10415 10417 10418 10427 10429 10434 10438 10439 10440 10441 10442 10443 10445 10446 10448 10450 10451 10452 10456 10457 10462 10463 10464 10466 10467 10471 10473 10474 10479 10481 10485 10486 10487 10490 10491 10492 10494 10499 10500 10503 10505 10507 10508 10509 10510 10511 10512 10513 10518 10519 10520 10524 10528 10529 10530 10538 10541 10542 10547 10548 10549 10555 10560 10562 10564 10565 10568 10569 10572 10573 10574 10575 10578 10580 10582 10583 10588 10591 10594 10595 10596 10609 10622 10623 10627 10628 10634 10635 10636 10637 10640 10646 10647 10649 10650 10652 10653 10654 10655 10657 10659 10662 10664 10667 10669 10670 10674 10679 10681 10685 10686 10687 10688 10689 10697 10698 10702 10707 10708 10712 10713 10716 10718 10719 10721 10726 10727 10728 10731 10760 10762 10763 10767 10770 10775 10776 10778 10779 10782 10784 10789 10792 10795 10796 10801 10812 10817 10825 10836 10839 10844 10845 10847 10851 10858 10863 10864 10873 10874 10880 10885 10891 10894 10907
|
|
||||||
|
|
||||||
fish's core code has been ported from C++ to Rust (:issue:`9512`).
|
|
||||||
This means a large change in dependencies and how to build fish.
|
|
||||||
Packagers should see the :ref:`For Distributors <rust-packaging>` section at the end.
|
|
||||||
|
|
||||||
Notable backwards-incompatible changes
|
Notable backwards-incompatible changes
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@@ -56,10 +146,7 @@ Notable backwards-incompatible changes
|
|||||||
- As part of a larger binding rework, ``bind`` gained a new key notation.
|
- As part of a larger binding rework, ``bind`` gained a new key notation.
|
||||||
In most cases the old notation should keep working, but in rare cases you may have to change a ``bind`` invocation to use the new notation.
|
In most cases the old notation should keep working, but in rare cases you may have to change a ``bind`` invocation to use the new notation.
|
||||||
See :ref:`below <changelog-new-bindings>` for details.
|
See :ref:`below <changelog-new-bindings>` for details.
|
||||||
- Terminals that fail to ignore unrecognized OSC or CSI sequences may display garbage. We know cool-retro-term and emacs' ansi-term are affected,
|
- :kbd:`ctrl-c` now calls a new bind function called ``clear-commandline``. The old behavior, which leaves a "^C" marker, is available as ``cancel-commandline`` (:issue:`10935`)
|
||||||
most mainstream terminals are not.
|
|
||||||
- :kbd:`alt-left` and :kbd:`alt-right` will now move by one argument (which may contain quoted spaces), not just one word like :kbd:`ctrl-left` and :kbd:`ctrl-right` do.
|
|
||||||
- :kbd:`alt-backspace` will delete an entire argument, not just one word. The old word behavior has been moved to :kbd:`ctrl-backspace`. If your terminal doesn't support `ctrl-backspace`, consider using :kbd:`ctrl-w`, or :kbd:`alt-b` + :kbd:`alt-d`.
|
|
||||||
- ``random`` will produce different values from previous versions of fish when used with the same seed, and will work more sensibly with small seed numbers.
|
- ``random`` will produce different values from previous versions of fish when used with the same seed, and will work more sensibly with small seed numbers.
|
||||||
The seed was never guaranteed to give the same result across systems,
|
The seed was never guaranteed to give the same result across systems,
|
||||||
so we do not expect this to have a large impact (:issue:`9593`).
|
so we do not expect this to have a large impact (:issue:`9593`).
|
||||||
@@ -74,8 +161,9 @@ Notable backwards-incompatible changes
|
|||||||
set -Ua fish_features no-qmark-noglob
|
set -Ua fish_features no-qmark-noglob
|
||||||
|
|
||||||
The flag will eventually be made read-only, making it impossible to turn off.
|
The flag will eventually be made read-only, making it impossible to turn off.
|
||||||
|
- Terminals that fail to ignore unrecognized OSC or CSI sequences may display garbage. We know cool-retro-term and emacs' ansi-term are affected, but most mainstream terminals are not.
|
||||||
- fish no longer searches directories from the Windows system/user ``$PATH`` environment variable for Linux executables. To execute Linux binaries by name (i.e. not with a relative or absolute path) from a Windows folder, make sure the ``/mnt/c/...`` path is explicitly added to ``$fish_user_paths`` and not just automatically appended to ``$PATH`` by ``wsl.exe`` (:issue:`10506`).
|
- fish no longer searches directories from the Windows system/user ``$PATH`` environment variable for Linux executables. To execute Linux binaries by name (i.e. not with a relative or absolute path) from a Windows folder, make sure the ``/mnt/c/...`` path is explicitly added to ``$fish_user_paths`` and not just automatically appended to ``$PATH`` by ``wsl.exe`` (:issue:`10506`).
|
||||||
- Under Microsoft Windows Subsystem for Linux 1 (not WSL 2) , backgrounded jobs that have not been disowned and do not terminate on their own after a ``SIGHUP`` + ``SIGCONT`` sequence will be explicitly killed by fish on exit (after the usual prompt to close or disown them) to work around a WSL 1 deficiency that sees backgrounded processes that run into ``SIGTTOU`` remain in a suspended state indefinitely (:issue:`5263`). The workaround is to explicitly ``disown`` processes you wish to outlive the shell session.
|
- Under Microsoft Windows Subsystem for Linux 1 (not WSL 2), backgrounded jobs that have not been disowned and do not terminate on their own after a ``SIGHUP`` + ``SIGCONT`` sequence will be explicitly killed by fish on exit (after the usual prompt to close or disown them) to work around a WSL 1 deficiency that sees backgrounded processes that run into ``SIGTTOU`` remain in a suspended state indefinitely (:issue:`5263`). The workaround is to explicitly ``disown`` processes you wish to outlive the shell session.
|
||||||
|
|
||||||
Notable improvements and fixes
|
Notable improvements and fixes
|
||||||
------------------------------
|
------------------------------
|
||||||
@@ -92,23 +180,30 @@ Notable improvements and fixes
|
|||||||
- ``bind ctrl-x,alt-c 'do something'`` binds a sequence of two keys.
|
- ``bind ctrl-x,alt-c 'do something'`` binds a sequence of two keys.
|
||||||
|
|
||||||
Any key argument that starts with an ASCII control character (like ``\e`` or ``\cX``) or is up to 3 characters long, not a named key, and does not contain ``,`` or ``-`` will be interpreted in the old syntax to keep compatibility for the majority of bindings.
|
Any key argument that starts with an ASCII control character (like ``\e`` or ``\cX``) or is up to 3 characters long, not a named key, and does not contain ``,`` or ``-`` will be interpreted in the old syntax to keep compatibility for the majority of bindings.
|
||||||
|
|
||||||
|
Keyboard protocols can be turned off by disabling the "keyboard-protocols" feature flag::
|
||||||
|
|
||||||
|
set -Ua fish_features no-keyboard-protocols
|
||||||
|
|
||||||
|
This is a temporary measure to work around buggy terminals (:issue:`11056`), which appear to be relatively rare.
|
||||||
|
Use this if something like "=0" or "=5u" appears in your commandline mysteriously.
|
||||||
|
|
||||||
- fish can now be built as a self-installing binary (:issue:`10367`). That means it can be easily built on one system and copied to another, where it can extract supporting files.
|
- fish can now be built as a self-installing binary (:issue:`10367`). That means it can be easily built on one system and copied to another, where it can extract supporting files.
|
||||||
To do this, run::
|
To do this, run::
|
||||||
|
|
||||||
cargo install --path . # in a clone of the fish repository
|
cargo install --path . # in a clone of the fish repository
|
||||||
# or `cargo build --release` and copy target/release/fish{,_indent,_key_reader} wherever you want
|
# or `cargo build --release` and copy target/release/fish{,_indent,_key_reader} wherever you want
|
||||||
|
|
||||||
The first time it runs interactively, it will extract all the data files to ``~/.local/share/fish/install/``. To uninstall, remove the fish binaries and that directory.
|
The first time it runs interactively, it will extract all the data files to ``~/.local/share/fish/install/``. A specific path can be used for the data files with ``fish --install=PATH`` To uninstall, remove the fish binaries and that directory.
|
||||||
|
|
||||||
This build system is experimental; the main build system, using ``cmake``, remains the recommended approach for packaging and installation to a prefix.
|
This build system is experimental; the main build system, using ``cmake``, remains the recommended approach for packaging and installation to a prefix.
|
||||||
- A new function ``fish_should_add_to_history`` can be overridden to decide whether a command should be added to the history (:issue:`10302`).
|
- A new function ``fish_should_add_to_history`` can be overridden to decide whether a command should be added to the history (:issue:`10302`).
|
||||||
- :kbd:`ctrl-c` during command input no longer prints ``^C`` and a new prompt, but merely clears the command line. This restores the behavior from version 2.2. To revert to the old behavior, use ``for mode in (bind --list-modes); bind -M $mode ctrl-c cancel-commandline-traditional; end`` (:issue:`10213`).
|
|
||||||
- Bindings can now mix special input functions and shell commands, so ``bind ctrl-g expand-abbr "commandline -i \n"`` works as expected (:issue:`8186`).
|
- Bindings can now mix special input functions and shell commands, so ``bind ctrl-g expand-abbr "commandline -i \n"`` works as expected (:issue:`8186`).
|
||||||
- Special input functions run from bindings via ``commandline -f`` are now applied immediately, instead of after the currently executing binding (:issue:`3031`).
|
- Special input functions run from bindings via ``commandline -f`` are now applied immediately, instead of after the currently executing binding (:issue:`3031`, :issue:`10126`).
|
||||||
For example, ``commandline -i foo; commandline | grep foo`` succeeds now.
|
For example, ``commandline -i foo; commandline | grep foo`` succeeds now.
|
||||||
- Undo history is no longer truncated after every command, but kept for the lifetime of the shell process.
|
- Undo history is no longer truncated after every command, but kept for the lifetime of the shell process.
|
||||||
- The :kbd:`ctrl-r` history search now uses glob syntax (:issue:`10131`).
|
- The :kbd:`ctrl-r` history search now uses glob syntax (:issue:`10131`).
|
||||||
- The :kbd:`ctrl-r` history search now operates only on the line or command substitution at cursor, making it easier to combine commands from history.
|
- The :kbd:`ctrl-r` history search now operates only on the line or command substitution at cursor, making it easier to combine commands from history (:issue:`9751`).
|
||||||
- Abbreviations can now be restricted to specific commands. For instance::
|
- Abbreviations can now be restricted to specific commands. For instance::
|
||||||
|
|
||||||
abbr --add --command git back 'reset --hard HEAD^'
|
abbr --add --command git back 'reset --hard HEAD^'
|
||||||
@@ -138,6 +233,7 @@ Deprecations and removed features
|
|||||||
If this happens, you can use the ``reset`` command from ``ncurses`` to restore the terminal state.
|
If this happens, you can use the ``reset`` command from ``ncurses`` to restore the terminal state.
|
||||||
- ``fish_key_reader --verbose`` no longer shows timing information.
|
- ``fish_key_reader --verbose`` no longer shows timing information.
|
||||||
- Terminal information is no longer read from hashed terminfo databases, or termcap databases (:issue:`10269`). The vast majority of systems use a non-hashed terminfo database, which is still supported.
|
- Terminal information is no longer read from hashed terminfo databases, or termcap databases (:issue:`10269`). The vast majority of systems use a non-hashed terminfo database, which is still supported.
|
||||||
|
- ``source`` returns an error if used without a filename or pipe/redirection (:issue:`10774`).
|
||||||
|
|
||||||
Scripting improvements
|
Scripting improvements
|
||||||
----------------------
|
----------------------
|
||||||
@@ -164,6 +260,8 @@ Scripting improvements
|
|||||||
- A new ``path basename -E`` option that causes it to return the basename ("filename" with the directory prefix removed) with the final extension (if any) also removed. This is a shorter version of ``path change-extension "" (path basename $foo)`` (:issue:`10521`).
|
- A new ``path basename -E`` option that causes it to return the basename ("filename" with the directory prefix removed) with the final extension (if any) also removed. This is a shorter version of ``path change-extension "" (path basename $foo)`` (:issue:`10521`).
|
||||||
- A new ``math --scale-mode`` option to select ``truncate``, ``round``, ``floor``, ``ceiling`` as you wish; the default value is ``truncate``. (:issue:`9117`).
|
- A new ``math --scale-mode`` option to select ``truncate``, ``round``, ``floor``, ``ceiling`` as you wish; the default value is ``truncate``. (:issue:`9117`).
|
||||||
- ``random`` is now less strict about its arguments, allowing a start larger or equal to the end. (:issue:`10879`)
|
- ``random`` is now less strict about its arguments, allowing a start larger or equal to the end. (:issue:`10879`)
|
||||||
|
- ``function --argument-names`` now produces an error if a read-only variable name is used, rather than simply ignoring it (:issue:`10842`).
|
||||||
|
- Tilde expansion in braces (that is, ``{~,}``) works correctly (:issue:`10610`).
|
||||||
|
|
||||||
Interactive improvements
|
Interactive improvements
|
||||||
------------------------
|
------------------------
|
||||||
@@ -183,11 +281,19 @@ Interactive improvements
|
|||||||
- Measuring a command with ``time`` now considers the time taken for command substitution (:issue:`9100`).
|
- Measuring a command with ``time`` now considers the time taken for command substitution (:issue:`9100`).
|
||||||
- ``fish_add_path`` now automatically enables verbose mode when used interactively (in the command line), in an effort to be clearer about what it does (:issue:`10532`).
|
- ``fish_add_path`` now automatically enables verbose mode when used interactively (in the command line), in an effort to be clearer about what it does (:issue:`10532`).
|
||||||
- fish no longer adopts TTY modes of failed commands (:issue:`10603`).
|
- fish no longer adopts TTY modes of failed commands (:issue:`10603`).
|
||||||
- `complete -e cmd` now prevents autoloading completions for `cmd` (:issue:`6716`).
|
- ``complete -e cmd`` now prevents autoloading completions for ``cmd`` (:issue:`6716`).
|
||||||
- fish's default color scheme no longer uses the color "blue", as it has bad contrast against the background in a few terminal's default palettes (:issue:`10758`, :issue:`10786`)
|
- fish's default color scheme no longer uses the color "blue", as it has bad contrast against the background in a few terminal's default palettes (:issue:`10758`, :issue:`10786`)
|
||||||
The color scheme will not be upgraded for existing installs. If you want, you should select it again via ``fish_config``.
|
The color scheme will not be upgraded for existing installs. If you want, you should select it again via ``fish_config``.
|
||||||
- Command lines which are larger than the terminal are now displayed correctly, instead of multiple blank lines being displayed (:issue:`7296`).
|
- Command lines which are larger than the terminal are now displayed correctly, instead of multiple blank lines being displayed (:issue:`7296`).
|
||||||
- Prompts that use external commands will no longer produce an infinite loop if the command crashes (:issue:`9796`).
|
- Prompts that use external commands will no longer produce an infinite loop if the command crashes (:issue:`9796`).
|
||||||
|
- The output of ``jobs`` shows "-" for jobs that have the same process group ID as the fish process, rather than "-2" (:issue:`10833`).
|
||||||
|
- Job expansion (``%1`` syntax) works properly for jobs that are a mixture of external commands and functions (:issue:`10832`).
|
||||||
|
- Command lines which have more lines than the terminal can be displayed and edited correctly (:issue:`10827`).
|
||||||
|
- Functions that have been erased are no longer highlighted as valid commands (:issue:`10866`).
|
||||||
|
- ``not``, ``time``, and variable assignments (that is ``not time a=b env``) is correctly recognized as valid syntax (:issue:`10890`).
|
||||||
|
- The Web-based configuration removes old right-hand-side prompts again, fixing a regression in fish 3.4.0 (:issue:`10675`).
|
||||||
|
- Further protection against programs which crash and leave the terminal in an inconsistent state (:issue:`10834`, :issue:`11038`).
|
||||||
|
- A workaround for git being very slow on macOS has been applied, improving performance after a fresh boot (:issue:`10535`).
|
||||||
|
|
||||||
New or improved bindings
|
New or improved bindings
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -195,8 +301,8 @@ New or improved bindings
|
|||||||
- During up-arrow history search, :kbd:`shift-delete` will delete the current search item and move to the next older item. Previously this was only supported in the history pager.
|
- During up-arrow history search, :kbd:`shift-delete` will delete the current search item and move to the next older item. Previously this was only supported in the history pager.
|
||||||
- :kbd:`shift-delete` will also remove the currently-displayed autosuggestion from history, and remove it as a suggestion.
|
- :kbd:`shift-delete` will also remove the currently-displayed autosuggestion from history, and remove it as a suggestion.
|
||||||
- :kbd:`ctrl-Z` (also known as :kbd:`ctrl-shift-z`) is now bound to redo.
|
- :kbd:`ctrl-Z` (also known as :kbd:`ctrl-shift-z`) is now bound to redo.
|
||||||
- :kbd:`alt-delete` now deletes the argument (which may contain quoted spaces) right of the cursor.
|
|
||||||
- Some improvements to the :kbd:`alt-e` binding which edits the command line in an external editor:
|
- Some improvements to the :kbd:`alt-e` binding which edits the command line in an external editor:
|
||||||
|
|
||||||
- The editor's cursor position is copied back to fish. This is currently supported for Vim and Kakoune.
|
- The editor's cursor position is copied back to fish. This is currently supported for Vim and Kakoune.
|
||||||
- Cursor position synchronization is only supported for a set of known editors, which are now also detected in aliases which use ``complete --wraps``. For example, use ``complete --wraps my-vim vim`` to synchronize cursors when ``EDITOR=my-vim``.
|
- Cursor position synchronization is only supported for a set of known editors, which are now also detected in aliases which use ``complete --wraps``. For example, use ``complete --wraps my-vim vim`` to synchronize cursors when ``EDITOR=my-vim``.
|
||||||
- Multiline commands are indented before being sent to the editor, which matches how they are displayed in fish.
|
- Multiline commands are indented before being sent to the editor, which matches how they are displayed in fish.
|
||||||
@@ -205,23 +311,30 @@ New or improved bindings
|
|||||||
- :kbd:`alt-d` on an empty command line lists the directory history again. This restores the behavior of version 2.1.
|
- :kbd:`alt-d` on an empty command line lists the directory history again. This restores the behavior of version 2.1.
|
||||||
- ``history-prefix-search-backward`` and ``-forward`` now maintain the cursor position, instead of moving the cursor to the end of the command line (:issue:`10430`).
|
- ``history-prefix-search-backward`` and ``-forward`` now maintain the cursor position, instead of moving the cursor to the end of the command line (:issue:`10430`).
|
||||||
- The following keys have refined behavior if the terminal supports :ref:`the new keyboard encodings <changelog-new-bindings>`:
|
- The following keys have refined behavior if the terminal supports :ref:`the new keyboard encodings <changelog-new-bindings>`:
|
||||||
|
|
||||||
- :kbd:`shift-enter` now inserts a newline instead of executing the command line.
|
- :kbd:`shift-enter` now inserts a newline instead of executing the command line.
|
||||||
- :kbd:`ctrl-backspace` now deletes the last word instead of only one character (:issue:`10741`).
|
- :kbd:`ctrl-backspace` now deletes the last word instead of only one character (:issue:`10741`).
|
||||||
- :kbd:`ctrl-delete` deletes the next word (same as :kbd:`alt-d`).
|
- :kbd:`ctrl-delete` deletes the next word (same as :kbd:`alt-d`).
|
||||||
- New special input functions:
|
- New special input functions:
|
||||||
|
|
||||||
- ``forward-char-passive`` and ``backward-char-passive`` are like their non-passive variants but do not accept autosuggestions or move focus in the completion pager (:issue:`10398`).
|
- ``forward-char-passive`` and ``backward-char-passive`` are like their non-passive variants but do not accept autosuggestions or move focus in the completion pager (:issue:`10398`).
|
||||||
- ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token which includes escaped spaces (:issue:`2014`).
|
- ``forward-token``, ``backward-token``, ``kill-token``, and ``backward-kill-token`` are similar to the ``*-bigword`` variants but for the whole argument token (which includes escaped spaces) (:issue:`2014`).
|
||||||
|
- ``clear-commandline``, which merely clears the command line, as an alternative to ``cancel-commandline`` which prints ``^C`` and a new prompt (:issue:`10213`).
|
||||||
- The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept (:issue:`10608`).
|
- The ``accept-autosuggestion`` special input function now returns false when there was nothing to accept (:issue:`10608`).
|
||||||
- Vi mode has seen some improvements but continues to suffer from the lack of people working on it.
|
- Vi mode has seen some improvements but continues to suffer from the lack of people working on it.
|
||||||
|
|
||||||
- New default cursor shapes for insert and replace mode.
|
- New default cursor shapes for insert and replace mode.
|
||||||
- Insert-mode :kbd:`ctrl-n` accepts autosuggestions (:issue:`10339`).
|
- :kbd:`ctrl-n` in insert mode accepts autosuggestions (:issue:`10339`).
|
||||||
- Outside insert mode, the cursor will no longer be placed beyond the last character on the commandline.
|
- Outside insert mode, the cursor will no longer be placed beyond the last character on the commandline.
|
||||||
- When the cursor is at the end of the commandline, a single :kbd:`l` will accept an autosuggestion (:issue:`10286`).
|
- When the cursor is at the end of the commandline, a single :kbd:`l` will accept an autosuggestion (:issue:`10286`).
|
||||||
- The cursor position after pasting (:kbd:`p`) has been corrected.
|
- The cursor position after pasting (:kbd:`p`) has been corrected.
|
||||||
|
- Added an additional binding, :kbd:`_`, for moving to the beginning of the line (:issue:`10720`).
|
||||||
- When the cursor is at the start of a line, escaping from insert mode no longer moves the cursor to the previous line.
|
- When the cursor is at the start of a line, escaping from insert mode no longer moves the cursor to the previous line.
|
||||||
- Added bindings for clipboard interaction, like :kbd:`",+,p` and :kbd:`",+,y,y`.
|
- Added bindings for clipboard interaction, like :kbd:`",+,p` and :kbd:`",+,y,y`.
|
||||||
- Deleting in visual mode now moves the cursor back, matching vi (:issue:`10394`).
|
- Deleting in visual mode now moves the cursor back, matching vi (:issue:`10394`).
|
||||||
|
- The :kbd:`;`, :kbd:`,`, :kbd:`v`, :kbd:`V`, :kbd:`I`, and :kbd:`gU` bindings work in visual mode (:issue:`10601`, :issue:`10648`).
|
||||||
- Support :kbd:`%` motion (:issue:`10593`).
|
- Support :kbd:`%` motion (:issue:`10593`).
|
||||||
|
- :kbd:`ctrl-k` to remove the contents of the line beyond the cursor in all modes (:issue:`10648`).
|
||||||
- Support `ab` and `ib` vi text objects. New input functions are introduced ``jump-{to,till}-matching-bracket`` (:issue:`1842`).
|
- Support `ab` and `ib` vi text objects. New input functions are introduced ``jump-{to,till}-matching-bracket`` (:issue:`1842`).
|
||||||
- The :kbd:`E` binding now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
|
- The :kbd:`E` binding now correctly handles the last character of the word, by jumping to the next word (:issue:`9700`).
|
||||||
|
|
||||||
@@ -231,13 +344,16 @@ Completions
|
|||||||
- Option completion now uses fuzzy subsequence filtering, just like non-option completion (:issue:`830`).
|
- Option completion now uses fuzzy subsequence filtering, just like non-option completion (:issue:`830`).
|
||||||
This means that ``--fb`` may be completed to ``--foobar`` if there is no better match.
|
This means that ``--fb`` may be completed to ``--foobar`` if there is no better match.
|
||||||
- Completions that insert an entire token now use quotes instead of backslashes to escape special characters (:issue:`5433`).
|
- Completions that insert an entire token now use quotes instead of backslashes to escape special characters (:issue:`5433`).
|
||||||
- Historically, file name completions are provided after the last ``:`` or ``=`` within a token.
|
- Normally, file name completions start after the last ``:`` or ``=`` in a token.
|
||||||
This helps commands like ``rsync --files-from=``.
|
This helps commands like ``rsync --files-from=``.
|
||||||
If the ``=`` or ``:`` is actually part of the filename, it will be escaped as ``\:`` and ``\=``,
|
This special meaning can now disabled by escaping these separators as ``\:`` and ``\=``.
|
||||||
and no longer get this special treatment.
|
|
||||||
This matches Bash's behavior.
|
This matches Bash's behavior.
|
||||||
|
Note that this escaping is usually not necessary since the completion engine already tries
|
||||||
|
to guess whether the separator is actually part of a file name.
|
||||||
- Various new completion scripts and numerous updates to existing ones.
|
- Various new completion scripts and numerous updates to existing ones.
|
||||||
|
- Completions could hang if the ``PAGER`` environment variable was sent to certain editors on macOS, FreeBSD and some other platforms. This has been fixed (:issue:`10820`).
|
||||||
- Generated completions are now stored in ``$XDG_CACHE_HOME/fish`` or ``~/.cache/fish`` by default (:issue:`10369`)
|
- Generated completions are now stored in ``$XDG_CACHE_HOME/fish`` or ``~/.cache/fish`` by default (:issue:`10369`)
|
||||||
|
- A regression in fish 3.1, where completing a command line could change it completely, has been fixed (:issue:`10904`).
|
||||||
|
|
||||||
Improved terminal support
|
Improved terminal support
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -253,10 +369,14 @@ Improved terminal support
|
|||||||
|
|
||||||
Other improvements
|
Other improvements
|
||||||
------------------
|
------------------
|
||||||
|
- ``status`` gained a ``buildinfo`` subcommand, to print information on how fish was built, to help with debugging (:issue:`10896`).
|
||||||
- ``fish_indent`` will now collapse multiple empty lines into one (:issue:`10325`).
|
- ``fish_indent`` will now collapse multiple empty lines into one (:issue:`10325`).
|
||||||
- ``fish_indent`` now preserves the modification time of files if there were no changes (:issue:`10624`).
|
- ``fish_indent`` now preserves the modification time of files if there were no changes (:issue:`10624`).
|
||||||
|
- Performance in launching external processes has been improved for many cases (:issue:`10869`).
|
||||||
- Performance and interactivity under Windows Subsystem for Linux has been improved, with a workaround for Windows-specific locations being appended to ``$PATH`` by default (:issue:`10506`).
|
- Performance and interactivity under Windows Subsystem for Linux has been improved, with a workaround for Windows-specific locations being appended to ``$PATH`` by default (:issue:`10506`).
|
||||||
|
- On macOS, paths from ``/etc/paths`` and ``/etc/manpaths`` containing colons are handled correctly (:issue:`10684`).
|
||||||
- Additional filesystems such as AFS are properly detected as remote, which avoids certain hangs due to expensive filesystem locks (:issue:`10818`).
|
- Additional filesystems such as AFS are properly detected as remote, which avoids certain hangs due to expensive filesystem locks (:issue:`10818`).
|
||||||
|
- A spurious error when launching multiple instances of fish for the first time has been removed (:issue:`10813`).
|
||||||
|
|
||||||
.. _rust-packaging:
|
.. _rust-packaging:
|
||||||
|
|
||||||
@@ -265,10 +385,23 @@ For distributors
|
|||||||
|
|
||||||
fish has been ported to Rust. This means a significant change in dependencies, which are listed in the README. In short, Rust 1.70 or greater is required, and a C++ compiler is no longer needed (although a C compiler is still required, for some C glue code and the tests).
|
fish has been ported to Rust. This means a significant change in dependencies, which are listed in the README. In short, Rust 1.70 or greater is required, and a C++ compiler is no longer needed (although a C compiler is still required, for some C glue code and the tests).
|
||||||
|
|
||||||
CMake remains the recommended build system, because of cargo's limited support for installing support files. Version 3.5 remains the minimum supported version. The Xcode generator for CMake is not supported any longer (:issue:`9924`)
|
CMake remains the recommended build system, because of cargo's limited support for installing support files. Version 3.5 remains the minimum supported version. The Xcode generator for CMake is not supported any longer (:issue:`9924`). CMake builds default to optimized release builds (:issue:`10799`).
|
||||||
|
|
||||||
fish no longer depends on the ncurses library, but still uses a terminfo database. When packaging fish, please add a dependency on the package containing your terminfo database instead of curses.
|
fish no longer depends on the ncurses library, but still uses a terminfo database. When packaging fish, please add a dependency on the package containing your terminfo database instead of curses.
|
||||||
|
|
||||||
|
The ``test`` target was removed as it can no longer be defined in new CMake versions. Use ``make fish_run_tests``. Any existing test target will not print output if it fails (:issue:`11116`).
|
||||||
|
|
||||||
|
The Web-based configuration has been rewritten to use Alpine.js (:issue:`9554`).
|
||||||
|
|
||||||
|
--------------
|
||||||
|
|
||||||
|
fish 4.0b1 (released December 17, 2024)
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
A number of improvements were included in fish 4.0.0 following the beta release of 4.0b1. These include fixes for regressions, improvements to completions and documentation, and the removal of a small number of problematic changes.
|
||||||
|
|
||||||
|
The full list of fixed issues can be found on the `GitHub milestone page for 4.0-final <https://github.com/fish-shell/fish-shell/milestone/43>`_.
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
fish 3.7.1 (released March 19, 2024)
|
fish 3.7.1 (released March 19, 2024)
|
||||||
@@ -527,7 +660,7 @@ fish 3.6.0 (released January 7, 2023)
|
|||||||
Notable improvements and fixes
|
Notable improvements and fixes
|
||||||
------------------------------
|
------------------------------
|
||||||
- By default, :kbd:`ctrl-r` now opens the command history in the pager (:issue:`602`). This is fully searchable and syntax-highlighted, as an alternative to the incremental search seen in other shells. The new special input function ``history-pager`` has been added for custom bindings.
|
- By default, :kbd:`ctrl-r` now opens the command history in the pager (:issue:`602`). This is fully searchable and syntax-highlighted, as an alternative to the incremental search seen in other shells. The new special input function ``history-pager`` has been added for custom bindings.
|
||||||
- Abbrevations are more flexible (:issue:`9313`, :issue:`5003`, :issue:`2287`):
|
- Abbreviations are more flexible (:issue:`9313`, :issue:`5003`, :issue:`2287`):
|
||||||
|
|
||||||
- They may optionally replace tokens anywhere on the command line, instead of only commands
|
- They may optionally replace tokens anywhere on the command line, instead of only commands
|
||||||
- Matching tokens may be described using a regular expression instead of a literal word
|
- Matching tokens may be described using a regular expression instead of a literal word
|
||||||
@@ -623,7 +756,7 @@ Interactive improvements
|
|||||||
- A new variable, :envvar:`fish_cursor_selection_mode`, can be used to configure whether the command line selection includes the character under the cursor (``inclusive``) or not (``exclusive``). The new default is ``exclusive``; use ``set fish_cursor_selection_mode inclusive`` to get the previous behavior back (:issue:`7762`).
|
- A new variable, :envvar:`fish_cursor_selection_mode`, can be used to configure whether the command line selection includes the character under the cursor (``inclusive``) or not (``exclusive``). The new default is ``exclusive``; use ``set fish_cursor_selection_mode inclusive`` to get the previous behavior back (:issue:`7762`).
|
||||||
- fish's completion pager now fills half the terminal on first tab press instead of only 4 rows, which should make results visible more often and save key presses, without constantly snapping fish to the top of the terminal (:issue:`9105`, :issue:`2698`).
|
- fish's completion pager now fills half the terminal on first tab press instead of only 4 rows, which should make results visible more often and save key presses, without constantly snapping fish to the top of the terminal (:issue:`9105`, :issue:`2698`).
|
||||||
- The ``complete-and-search`` binding, used with :kbd:`shift-tab` by default, selects the first item in the results immediately (:issue:`9080`).
|
- The ``complete-and-search`` binding, used with :kbd:`shift-tab` by default, selects the first item in the results immediately (:issue:`9080`).
|
||||||
- ``bind`` output is now syntax-highlighted when used interacively.
|
- ``bind`` output is now syntax-highlighted when used interactively.
|
||||||
- :kbd:`alt-h` (the default ``__fish_man_page`` binding) does a better job of showing the manual page of the command under cursor (:issue:`9020`).
|
- :kbd:`alt-h` (the default ``__fish_man_page`` binding) does a better job of showing the manual page of the command under cursor (:issue:`9020`).
|
||||||
- If :envvar:`fish_color_valid_path` contains an actual color instead of just modifiers, those will be used for valid paths even if the underlying color isn't "normal" (:issue:`9159`).
|
- If :envvar:`fish_color_valid_path` contains an actual color instead of just modifiers, those will be used for valid paths even if the underlying color isn't "normal" (:issue:`9159`).
|
||||||
- The key combination for the QUIT terminal sequence, often :kbd:`ctrl-\\` (``\x1c``), can now be used as a binding (:issue:`9234`).
|
- The key combination for the QUIT terminal sequence, often :kbd:`ctrl-\\` (``\x1c``), can now be used as a binding (:issue:`9234`).
|
||||||
@@ -852,7 +985,7 @@ Interactive improvements
|
|||||||
New or improved bindings
|
New or improved bindings
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
- The :kbd:`alt-s` binding will now insert ``doas`` instead of ``sudo`` if necessary (:issue:`8942`).
|
- The :kbd:`alt-s` binding will now insert ``doas`` instead of ``sudo`` if necessary (:issue:`8942`).
|
||||||
- The ``kill-whole-line`` special input function now kills the newline preceeding the last line. This makes ``dd`` in vi-mode clear the last line properly.
|
- The ``kill-whole-line`` special input function now kills the newline preceding the last line. This makes ``dd`` in vi-mode clear the last line properly.
|
||||||
- The new ``kill-inner-line`` special input function kills the line without any newlines, allowing ``cc`` in vi-mode to clear the line while preserving newlines (:issue:`8983`).
|
- The new ``kill-inner-line`` special input function kills the line without any newlines, allowing ``cc`` in vi-mode to clear the line while preserving newlines (:issue:`8983`).
|
||||||
- On terminals that emit special sequences for these combinations, :kbd:`shift-space` is bound like :kbd:`space`, and :kbd:`ctrl-enter` is bound like :kbd:`return` (:issue:`8874`).
|
- On terminals that emit special sequences for these combinations, :kbd:`shift-space` is bound like :kbd:`space`, and :kbd:`ctrl-enter` is bound like :kbd:`return` (:issue:`8874`).
|
||||||
|
|
||||||
@@ -961,7 +1094,7 @@ Deprecations and removed features
|
|||||||
> set -Ua fish_features ampersand-nobg-in-token
|
> set -Ua fish_features ampersand-nobg-in-token
|
||||||
|
|
||||||
- ``$status`` is now forbidden as a command, to prevent a surprisingly common error among new users: Running ``if $status`` (:issue:`8171`). This applies *only* to ``$status``, other variables are still allowed.
|
- ``$status`` is now forbidden as a command, to prevent a surprisingly common error among new users: Running ``if $status`` (:issue:`8171`). This applies *only* to ``$status``, other variables are still allowed.
|
||||||
- ``set --query`` now returns an exit status of 255 if given no variable names. This means ``if set -q $foo`` will not enter the if-block if ``$foo`` is empty or unset. To restore the previous behavior, use ``if not set -q foo; or set -q $foo`` - but this is unlikely to be desireable (:issue:`8214`).
|
- ``set --query`` now returns an exit status of 255 if given no variable names. This means ``if set -q $foo`` will not enter the if-block if ``$foo`` is empty or unset. To restore the previous behavior, use ``if not set -q foo; or set -q $foo`` - but this is unlikely to be desirable (:issue:`8214`).
|
||||||
- ``_`` is now a reserved keyword (:issue:`8342`).
|
- ``_`` is now a reserved keyword (:issue:`8342`).
|
||||||
- The special input functions ``delete-or-exit``, ``nextd-or-forward-word`` and ``prevd-or-backward-word`` replace fish functions of the same names (:issue:`8538`).
|
- The special input functions ``delete-or-exit``, ``nextd-or-forward-word`` and ``prevd-or-backward-word`` replace fish functions of the same names (:issue:`8538`).
|
||||||
- Mac OS X 10.9 is no longer supported. The minimum Mac version is now 10.10 "Yosemite."
|
- Mac OS X 10.9 is no longer supported. The minimum Mac version is now 10.10 "Yosemite."
|
||||||
@@ -984,7 +1117,7 @@ Scripting improvements
|
|||||||
- ``commandline`` gained a ``--paging-full-mode`` option to check if the pager is showing all the possible lines (no "7 more rows" message) (:issue:`8485`).
|
- ``commandline`` gained a ``--paging-full-mode`` option to check if the pager is showing all the possible lines (no "7 more rows" message) (:issue:`8485`).
|
||||||
- List expansion correctly reports an error when used with all zero indexes (:issue:`8213`).
|
- List expansion correctly reports an error when used with all zero indexes (:issue:`8213`).
|
||||||
- Running ``fish`` with a directory instead of a script as argument (eg ``fish .``) no longer leads to an infinite loop. Instead it errors out immediately (:issue:`8258`)
|
- Running ``fish`` with a directory instead of a script as argument (eg ``fish .``) no longer leads to an infinite loop. Instead it errors out immediately (:issue:`8258`)
|
||||||
- Some error messages occuring after fork, like "text file busy" have been replaced by bespoke error messages for fish (like "File is currently open for writing"). This also restores error messages with current glibc versions that removed sys_errlist (:issue:`8234`, :issue:`4183`).
|
- Some error messages occurring after fork, like "text file busy" have been replaced by bespoke error messages for fish (like "File is currently open for writing"). This also restores error messages with current glibc versions that removed sys_errlist (:issue:`8234`, :issue:`4183`).
|
||||||
- The ``realpath`` builtin now also squashes leading slashes with the ``--no-symlinks`` option (:issue:`8281`).
|
- The ``realpath`` builtin now also squashes leading slashes with the ``--no-symlinks`` option (:issue:`8281`).
|
||||||
- When trying to ``cd`` to a dangling (broken) symbolic link, fish will print an error noting that the target is a broken link (:issue:`8264`).
|
- When trying to ``cd`` to a dangling (broken) symbolic link, fish will print an error noting that the target is a broken link (:issue:`8264`).
|
||||||
- On MacOS terminals that are not granted permissions to access a folder, ``cd`` would print a spurious "rotten symlink" error, which has been corrected to "permission denied" (:issue:`8264`).
|
- On MacOS terminals that are not granted permissions to access a folder, ``cd`` would print a spurious "rotten symlink" error, which has been corrected to "permission denied" (:issue:`8264`).
|
||||||
@@ -1490,7 +1623,7 @@ Interactive improvements
|
|||||||
- :kbd:`ctrl-c` handling has been reimplemented in C++ and is therefore quicker (:issue:`5259`), no longer occasionally prints an "unknown command" error (:issue:`7145`) or overwrites multiline prompts (:issue:`3537`).
|
- :kbd:`ctrl-c` handling has been reimplemented in C++ and is therefore quicker (:issue:`5259`), no longer occasionally prints an "unknown command" error (:issue:`7145`) or overwrites multiline prompts (:issue:`3537`).
|
||||||
- :kbd:`ctrl-c` no longer kills background jobs for which job control is
|
- :kbd:`ctrl-c` no longer kills background jobs for which job control is
|
||||||
disabled, matching POSIX semantics (:issue:`6828`, :issue:`6861`).
|
disabled, matching POSIX semantics (:issue:`6828`, :issue:`6861`).
|
||||||
- Autosuggestions work properly after :kbd:`ctrl-c` cancels the current commmand line (:issue:`6937`).
|
- Autosuggestions work properly after :kbd:`ctrl-c` cancels the current command line (:issue:`6937`).
|
||||||
- History search is now case-insensitive unless the search string contains an uppercase character (:issue:`7273`).
|
- History search is now case-insensitive unless the search string contains an uppercase character (:issue:`7273`).
|
||||||
- ``fish_update_completions`` gained a new ``--keep`` option, which improves speed by skipping completions that already exist (:issue:`6775`, :issue:`6796`).
|
- ``fish_update_completions`` gained a new ``--keep`` option, which improves speed by skipping completions that already exist (:issue:`6775`, :issue:`6796`).
|
||||||
- Aliases containing an embedded backslash appear properly in the output of ``alias`` (:issue:`6910`).
|
- Aliases containing an embedded backslash appear properly in the output of ``alias`` (:issue:`6910`).
|
||||||
@@ -2044,7 +2177,7 @@ Interactive improvements
|
|||||||
argument.
|
argument.
|
||||||
- Syntax highlighting works correctly with variables as commands
|
- Syntax highlighting works correctly with variables as commands
|
||||||
(:issue:`5658`) and redirections to close file descriptors (:issue:`6092`).
|
(:issue:`5658`) and redirections to close file descriptors (:issue:`6092`).
|
||||||
- ``help`` works properly on Windows Subsytem for Linux (:issue:`5759`, :issue:`6338`).
|
- ``help`` works properly on Windows Subsystem for Linux (:issue:`5759`, :issue:`6338`).
|
||||||
- A bug where ``disown`` could crash the shell has been fixed (:issue:`5720`).
|
- A bug where ``disown`` could crash the shell has been fixed (:issue:`5720`).
|
||||||
- fish will not autosuggest files ending with ``~`` unless there are no
|
- fish will not autosuggest files ending with ``~`` unless there are no
|
||||||
other candidates, as these are generally backup files (:issue:`985`).
|
other candidates, as these are generally backup files (:issue:`985`).
|
||||||
@@ -2986,7 +3119,7 @@ Other significant changes
|
|||||||
- Some systems’ ``su`` implementations do not set the ``USER``
|
- Some systems’ ``su`` implementations do not set the ``USER``
|
||||||
environment variable; it is now reset for root users (:issue:`3916`).
|
environment variable; it is now reset for root users (:issue:`3916`).
|
||||||
- Under terminals which support it, bracketed paste is enabled,
|
- Under terminals which support it, bracketed paste is enabled,
|
||||||
escaping problematic characters for security and convience (:issue:`3871`).
|
escaping problematic characters for security and convenience (:issue:`3871`).
|
||||||
Inside single quotes (``'``), single quotes and backslashes in pasted
|
Inside single quotes (``'``), single quotes and backslashes in pasted
|
||||||
text are escaped (:issue:`967`). The ``fish_clipboard_paste`` function (bound
|
text are escaped (:issue:`967`). The ``fish_clipboard_paste`` function (bound
|
||||||
to ``C-v`` by default) is still the recommended pasting method where
|
to ``C-v`` by default) is still the recommended pasting method where
|
||||||
@@ -3115,9 +3248,9 @@ Other significant changes
|
|||||||
- fish no longer prints a warning when it identifies a running instance
|
- fish no longer prints a warning when it identifies a running instance
|
||||||
of an old version (2.1.0 and earlier). Changes to universal variables
|
of an old version (2.1.0 and earlier). Changes to universal variables
|
||||||
may not propagate between these old versions and 2.5b1.
|
may not propagate between these old versions and 2.5b1.
|
||||||
- Improved compatiblity with Android (:issue:`3585`), MSYS/mingw (:issue:`2360`), and
|
- Improved compatibility with Android (:issue:`3585`), MSYS/mingw (:issue:`2360`), and
|
||||||
Solaris (:issue:`3456`, :issue:`3340`).
|
Solaris (:issue:`3456`, :issue:`3340`).
|
||||||
- Like other shells, the ``test`` builting now returns an error for
|
- Like other shells, the ``test`` built-in now returns an error for
|
||||||
numeric operations on invalid integers (:issue:`3346`, :issue:`3581`).
|
numeric operations on invalid integers (:issue:`3346`, :issue:`3581`).
|
||||||
- ``complete`` no longer recognises ``--authoritative`` and
|
- ``complete`` no longer recognises ``--authoritative`` and
|
||||||
``--unauthoritative`` options, and they are marked as obsolete.
|
``--unauthoritative`` options, and they are marked as obsolete.
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||||||
|
|
||||||
set(DEFAULT_BUILD_TYPE "RelWithDebInfo")
|
set(DEFAULT_BUILD_TYPE "RelWithDebInfo")
|
||||||
|
|
||||||
# Generate Xcode schemas (but not for tests).
|
|
||||||
set(CMAKE_XCODE_GENERATE_SCHEME 1)
|
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
message(STATUS "Setting build type to default '${DEFAULT_BUILD_TYPE}'")
|
message(STATUS "Setting build type to default '${DEFAULT_BUILD_TYPE}'")
|
||||||
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}")
|
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}")
|
||||||
@@ -17,7 +14,6 @@ endif()
|
|||||||
|
|
||||||
# Set up standard directories.
|
# Set up standard directories.
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
add_definitions(-D_UNICODE=1)
|
|
||||||
|
|
||||||
include(cmake/gettext.cmake)
|
include(cmake/gettext.cmake)
|
||||||
|
|
||||||
@@ -30,12 +26,6 @@ include(cmake/Rust.cmake)
|
|||||||
# Work around issue where archive-built libs go in the wrong place.
|
# Work around issue where archive-built libs go in the wrong place.
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||||
|
|
||||||
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
|
||||||
set(FISH_IN_TREE_BUILD TRUE)
|
|
||||||
else()
|
|
||||||
set(FISH_IN_TREE_BUILD FALSE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Set up the machinery around FISH-BUILD-VERSION-FILE
|
# Set up the machinery around FISH-BUILD-VERSION-FILE
|
||||||
# This defines the FBVF variable.
|
# This defines the FBVF variable.
|
||||||
include(Version)
|
include(Version)
|
||||||
@@ -46,6 +36,11 @@ get_filename_component(REAL_CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}" REALPATH)
|
|||||||
add_definitions(-DCMAKE_BINARY_DIR="${REAL_CMAKE_BINARY_DIR}")
|
add_definitions(-DCMAKE_BINARY_DIR="${REAL_CMAKE_BINARY_DIR}")
|
||||||
add_definitions(-DCMAKE_SOURCE_DIR="${REAL_CMAKE_SOURCE_DIR}")
|
add_definitions(-DCMAKE_SOURCE_DIR="${REAL_CMAKE_SOURCE_DIR}")
|
||||||
|
|
||||||
|
set(build_types Release RelWithDebInfo Debug "")
|
||||||
|
if(NOT "${CMAKE_BUILD_TYPE}" IN_LIST build_types)
|
||||||
|
message(WARNING "Unsupported build type ${CMAKE_BUILD_TYPE}. If this doesn't build, try one of Release, RelWithDebInfo or Debug")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Define a function to build and link dependencies.
|
# Define a function to build and link dependencies.
|
||||||
function(CREATE_TARGET target)
|
function(CREATE_TARGET target)
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ Guidelines
|
|||||||
In short:
|
In short:
|
||||||
|
|
||||||
- Be conservative in what you need (keep to the agreed minimum supported Rust version, limit new dependencies)
|
- Be conservative in what you need (keep to the agreed minimum supported Rust version, limit new dependencies)
|
||||||
- Use automated tools to help you (including ``make test`` and ``build_tools/style.fish``)
|
- Use automated tools to help you (including ``make fish_run_tests`` and ``build_tools/style.fish``)
|
||||||
|
|
||||||
Contributing completions
|
Contributing completions
|
||||||
========================
|
========================
|
||||||
|
|
||||||
Completion scripts are the most common contribution to fish, and they are very welcome.
|
Completion scripts are the most common contribution to fish, and they are very welcome.
|
||||||
|
|
||||||
In general, we'll take all well-written completion scripts for a command that is publically available.
|
In general, we'll take all well-written completion scripts for a command that is publicly available.
|
||||||
This means no private tools or personal scripts, and we do reserve the right to reject for other reasons.
|
This means no private tools or personal scripts, and we do reserve the right to reject for other reasons.
|
||||||
|
|
||||||
Before you try to contribute them to fish, consider if the authors of the tool you are completing want to maintain the script instead.
|
Before you try to contribute them to fish, consider if the authors of the tool you are completing want to maintain the script instead.
|
||||||
@@ -198,10 +198,11 @@ The tests can be found in three places:
|
|||||||
When in doubt, the bulk of the tests should be added as a littlecheck test in tests/checks, as they are the easiest to modify and run, and much faster and more dependable than pexpect tests. The syntax is fairly self-explanatory. It's a fish script with the expected output in ``# CHECK:`` or ``# CHECKERR:`` (for stderr) comments.
|
When in doubt, the bulk of the tests should be added as a littlecheck test in tests/checks, as they are the easiest to modify and run, and much faster and more dependable than pexpect tests. The syntax is fairly self-explanatory. It's a fish script with the expected output in ``# CHECK:`` or ``# CHECKERR:`` (for stderr) comments.
|
||||||
If your littlecheck test has a specific dependency, use ``# REQUIRE: ...`` with a posix sh script.
|
If your littlecheck test has a specific dependency, use ``# REQUIRE: ...`` with a posix sh script.
|
||||||
|
|
||||||
Tests are run in a temporary $HOME, but that is shared among the tests by default. If you need a temporary directory for your test, you should create one (e.g. with ``mktemp``).
|
|
||||||
|
|
||||||
The pexpects are written in python and can simulate input and output to/from a terminal, so they are needed for anything that needs actual interactivity. The runner is in tests/pexpect_helper.py, in case you need to modify something there.
|
The pexpects are written in python and can simulate input and output to/from a terminal, so they are needed for anything that needs actual interactivity. The runner is in tests/pexpect_helper.py, in case you need to modify something there.
|
||||||
|
|
||||||
|
These tests can be run via the tests/test_driver.py python script, which will set up the environment.
|
||||||
|
It sets up a temporary $HOME and also uses it as the current directory, so you do not need to create a temporary directory in them.
|
||||||
|
|
||||||
If you need a command to do something weird to test something, maybe add it to the ``fish_test_helper`` binary (in tests/fish_test_helper.c), or see if it can already do it.
|
If you need a command to do something weird to test something, maybe add it to the ``fish_test_helper`` binary (in tests/fish_test_helper.c), or see if it can already do it.
|
||||||
|
|
||||||
Local testing
|
Local testing
|
||||||
@@ -212,16 +213,18 @@ The tests can be run on your local computer on all operating systems.
|
|||||||
::
|
::
|
||||||
|
|
||||||
cmake path/to/fish-shell
|
cmake path/to/fish-shell
|
||||||
make test
|
make fish_run_tests
|
||||||
|
|
||||||
Or you can run them on a fish, without involving cmake::
|
Or you can run them on a fish, without involving cmake::
|
||||||
|
|
||||||
cargo build
|
cargo build
|
||||||
FISHDIR=target/debug tests/test_driver.sh tests/test.fish # script tests, the checks
|
cargo test # for the unit tests
|
||||||
FISHDIR=target/debug tests/test_driver.sh tests/interactive.fish # interactive tests, the pexpects
|
tests/test_driver.py --cachedir=/tmp target/debug # for the script and interactive tests
|
||||||
|
|
||||||
Here, ``FISHDIR`` refers to a directory with ``fish``, ``fish_indent`` and ``fish_key_reader`` in it.
|
Here, the first argument to test_driver.py refers to a directory with ``fish``, ``fish_indent`` and ``fish_key_reader`` in it.
|
||||||
In this example we're in the root of the git repo and have run ``cargo build`` without ``--release``, so it's a debug build.
|
In this example we're in the root of the git repo and have run ``cargo build`` without ``--release``, so it's a debug build.
|
||||||
|
The ``--cachedir /tmp`` argument means it will keep the fish_test_helper binary in /tmp instead of recompiling it for every test.
|
||||||
|
This saves some time, but isn't strictly necessary.
|
||||||
|
|
||||||
Git hooks
|
Git hooks
|
||||||
---------
|
---------
|
||||||
@@ -249,7 +252,7 @@ One possibility is a pre-push hook script like this one:
|
|||||||
done
|
done
|
||||||
if [ "x$isprotected" = x1 ]; then
|
if [ "x$isprotected" = x1 ]; then
|
||||||
echo "Running tests before push to master"
|
echo "Running tests before push to master"
|
||||||
make test
|
make fish_run_tests
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
if [ $RESULT -ne 0 ]; then
|
if [ $RESULT -ne 0 ]; then
|
||||||
echo "Tests failed for a push to master, we can't let you do that" >&2
|
echo "Tests failed for a push to master, we can't let you do that" >&2
|
||||||
@@ -259,7 +262,7 @@ One possibility is a pre-push hook script like this one:
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
This will check if the push is to the master branch and, if it is, only
|
This will check if the push is to the master branch and, if it is, only
|
||||||
allow the push if running ``make test`` succeeds. In some circumstances
|
allow the push if running ``make fish_run_tests`` succeeds. In some circumstances
|
||||||
it may be advisable to circumvent this check with
|
it may be advisable to circumvent this check with
|
||||||
``git push --no-verify``, but usually that isn’t necessary.
|
``git push --no-verify``, but usually that isn’t necessary.
|
||||||
|
|
||||||
|
|||||||
54
Cargo.lock
generated
54
Cargo.lock
generated
@@ -31,9 +31,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.2.6"
|
version = "1.2.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333"
|
checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jobserver",
|
"jobserver",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -99,7 +99,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fish"
|
name = "fish"
|
||||||
version = "4.0.0-beta.1"
|
version = "4.1.0-alpha0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cc",
|
"cc",
|
||||||
@@ -117,6 +117,7 @@ dependencies = [
|
|||||||
"rust-embed",
|
"rust-embed",
|
||||||
"serial_test",
|
"serial_test",
|
||||||
"terminfo",
|
"terminfo",
|
||||||
|
"unix_path",
|
||||||
"widestring",
|
"widestring",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -194,9 +195,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lru"
|
name = "lru"
|
||||||
version = "0.12.5"
|
version = "0.13.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
|
checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
]
|
]
|
||||||
@@ -295,18 +296,18 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "phf"
|
name = "phf"
|
||||||
version = "0.11.2"
|
version = "0.11.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
|
checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"phf_shared",
|
"phf_shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "phf_codegen"
|
name = "phf_codegen"
|
||||||
version = "0.11.2"
|
version = "0.11.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a"
|
checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"phf_generator",
|
"phf_generator",
|
||||||
"phf_shared",
|
"phf_shared",
|
||||||
@@ -314,9 +315,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "phf_generator"
|
name = "phf_generator"
|
||||||
version = "0.11.2"
|
version = "0.11.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
|
checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"phf_shared",
|
"phf_shared",
|
||||||
"rand",
|
"rand",
|
||||||
@@ -324,9 +325,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "phf_shared"
|
name = "phf_shared"
|
||||||
version = "0.11.2"
|
version = "0.11.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
|
checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"siphasher",
|
"siphasher",
|
||||||
]
|
]
|
||||||
@@ -500,9 +501,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
version = "0.3.11"
|
version = "1.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
|
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smallvec"
|
name = "smallvec"
|
||||||
@@ -512,9 +513,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.94"
|
version = "2.0.95"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3"
|
checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -545,6 +546,21 @@ version = "1.0.14"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unix_path"
|
||||||
|
version = "1.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "af8e291873ae77c4c8d9c9b34d0bee68a35b048fb39c263a5155e0e353783eaf"
|
||||||
|
dependencies = [
|
||||||
|
"unix_str",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unix_str"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2ace0b4755d0a2959962769239d56267f8a024fef2d9b32666b3dcd0946b0906"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "version_check"
|
name = "version_check"
|
||||||
version = "0.9.5"
|
version = "0.9.5"
|
||||||
@@ -563,9 +579,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "widestring"
|
name = "widestring"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
|
checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi-util"
|
name = "winapi-util"
|
||||||
|
|||||||
21
Cargo.toml
21
Cargo.toml
@@ -3,7 +3,7 @@ resolver = "2"
|
|||||||
members = ["printf"]
|
members = ["printf"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
# To build revisions that use Corrosion (those before 2024-01), CMake 3.19 and Rustc 1.78 seem to work.
|
# To build revisions that use Corrosion (those before 2024-01), use CMake 3.19, Rustc 1.78 and Rustup 1.27.
|
||||||
rust-version = "1.70"
|
rust-version = "1.70"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ debug = true
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "fish"
|
name = "fish"
|
||||||
version = "4.0.0-beta.1"
|
version = "4.1.0-alpha0"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
default-run = "fish"
|
default-run = "fish"
|
||||||
@@ -39,7 +39,7 @@ libc = "0.2"
|
|||||||
# lru pulls in hashbrown by default, which uses a faster (though less DoS resistant) hashing algo.
|
# lru pulls in hashbrown by default, which uses a faster (though less DoS resistant) hashing algo.
|
||||||
# disabling default features uses the stdlib instead, but it doubles the time to rewrite the history
|
# disabling default features uses the stdlib instead, but it doubles the time to rewrite the history
|
||||||
# files as of 22 April 2024.
|
# files as of 22 April 2024.
|
||||||
lru = "0.12.3"
|
lru = "0.13.0"
|
||||||
nix = { version = "0.29.0", default-features = false, features = [
|
nix = { version = "0.29.0", default-features = false, features = [
|
||||||
"event",
|
"event",
|
||||||
"inotify",
|
"inotify",
|
||||||
@@ -54,7 +54,7 @@ fish-printf = { path = "./printf", features = ["widestring"] }
|
|||||||
# available on macOS < 10.12. We can enable "getrandom" when we raise the
|
# available on macOS < 10.12. We can enable "getrandom" when we raise the
|
||||||
# minimum supported version to 10.12.
|
# minimum supported version to 10.12.
|
||||||
rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
|
rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
|
||||||
widestring = "1.1.0"
|
widestring = "1.2.0"
|
||||||
# We need 0.9.0 specifically for some crash fixes.
|
# We need 0.9.0 specifically for some crash fixes.
|
||||||
terminfo = "0.9.0"
|
terminfo = "0.9.0"
|
||||||
rust-embed = { version = "8.2.0", optional = true }
|
rust-embed = { version = "8.2.0", optional = true }
|
||||||
@@ -71,6 +71,9 @@ serial_test = { version = "3", default-features = false }
|
|||||||
cc = "1.0.94"
|
cc = "1.0.94"
|
||||||
rsconf = "0.2.2"
|
rsconf = "0.2.2"
|
||||||
|
|
||||||
|
[target.'cfg(windows)'.build-dependencies]
|
||||||
|
unix_path = "1.0.1"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["rlib"]
|
crate-type = ["rlib"]
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
@@ -88,9 +91,9 @@ name = "fish_key_reader"
|
|||||||
path = "src/bin/fish_key_reader.rs"
|
path = "src/bin/fish_key_reader.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["installable"]
|
default = ["embed-data"]
|
||||||
benchmark = []
|
benchmark = []
|
||||||
installable = ["dep:rust-embed"]
|
embed-data = ["dep:rust-embed"]
|
||||||
|
|
||||||
# The following features are auto-detected by the build-script and should not be enabled manually.
|
# The following features are auto-detected by the build-script and should not be enabled manually.
|
||||||
asan = []
|
asan = []
|
||||||
@@ -104,3 +107,9 @@ rust.unstable_name_collisions = "allow"
|
|||||||
clippy.manual_range_contains = "allow"
|
clippy.manual_range_contains = "allow"
|
||||||
clippy.needless_return = "allow"
|
clippy.needless_return = "allow"
|
||||||
clippy.needless_lifetimes = "allow"
|
clippy.needless_lifetimes = "allow"
|
||||||
|
|
||||||
|
# We do not want to use the e?print(ln)?! macros.
|
||||||
|
# These lints flag their use.
|
||||||
|
# In the future, they might change to flag other methods of printing.
|
||||||
|
clippy.print_stdout = "deny"
|
||||||
|
clippy.print_stderr = "deny"
|
||||||
|
|||||||
@@ -55,7 +55,11 @@ clean:
|
|||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: build/fish
|
test: build/fish
|
||||||
$(CMAKE) --build build --target test
|
$(CMAKE) --build build --target fish_run_tests
|
||||||
|
|
||||||
|
.PHONY: fish_run_tests
|
||||||
|
fish_run_tests: build/fish
|
||||||
|
$(CMAKE) --build build --target fish_run_tests
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: build/fish
|
install: build/fish
|
||||||
|
|||||||
23
README.rst
23
README.rst
@@ -47,12 +47,12 @@ Linux/CentOS are available from the `openSUSE Build
|
|||||||
Service <https://software.opensuse.org/download.html?project=shells%3Afish&package=fish>`__.
|
Service <https://software.opensuse.org/download.html?project=shells%3Afish&package=fish>`__.
|
||||||
|
|
||||||
Packages for Ubuntu are available from the `fish
|
Packages for Ubuntu are available from the `fish
|
||||||
PPA <https://launchpad.net/~fish-shell/+archive/ubuntu/release-3>`__,
|
PPA <https://launchpad.net/~fish-shell/+archive/ubuntu/release-4>`__,
|
||||||
and can be installed using the following commands:
|
and can be installed using the following commands:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
sudo apt-add-repository ppa:fish-shell/release-3
|
sudo apt-add-repository ppa:fish-shell/release-4
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install fish
|
sudo apt install fish
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ If packages are not available for your platform, GPG-signed tarballs are
|
|||||||
available from `fishshell.com <https://fishshell.com/>`__ and
|
available from `fishshell.com <https://fishshell.com/>`__ and
|
||||||
`fish-shell on
|
`fish-shell on
|
||||||
GitHub <https://github.com/fish-shell/fish-shell/releases>`__. See the
|
GitHub <https://github.com/fish-shell/fish-shell/releases>`__. See the
|
||||||
`Building <#building>`__ section for instructions.
|
`Building <#building>`_ section for instructions.
|
||||||
|
|
||||||
Running fish
|
Running fish
|
||||||
------------
|
------------
|
||||||
@@ -87,8 +87,6 @@ Dependencies
|
|||||||
|
|
||||||
Running fish requires:
|
Running fish requires:
|
||||||
|
|
||||||
- A terminfo database, typically from curses or ncurses (preinstalled on most \*nix systems) - this needs to be the directory tree format, not the "hashed" database.
|
|
||||||
If this is unavailable, fish uses an included xterm-256color definition.
|
|
||||||
- some common \*nix system utilities (currently ``mktemp``), in
|
- some common \*nix system utilities (currently ``mktemp``), in
|
||||||
addition to the basic POSIX utilities (``cat``, ``cut``, ``dirname``,
|
addition to the basic POSIX utilities (``cat``, ``cut``, ``dirname``,
|
||||||
``file``, ``ls``, ``mkdir``, ``mkfifo``, ``rm``, ``sort``, ``tee``, ``tr``,
|
``file``, ``ls``, ``mkdir``, ``mkfifo``, ``rm``, ``sort``, ``tee``, ``tr``,
|
||||||
@@ -159,6 +157,9 @@ CMake Build options
|
|||||||
|
|
||||||
In addition to the normal CMake build options (like ``CMAKE_INSTALL_PREFIX``), fish's CMake build has some other options available to customize it.
|
In addition to the normal CMake build options (like ``CMAKE_INSTALL_PREFIX``), fish's CMake build has some other options available to customize it.
|
||||||
|
|
||||||
|
- Rust_COMPILER=path - the path to rustc. If not set, cmake will check $PATH and ~/.cargo/bin
|
||||||
|
- Rust_CARGO=path - the path to cargo. If not set, cmake will check $PATH and ~/.cargo/bin
|
||||||
|
- Rust_CARGO_TARGET=target - the target to pass to cargo. Set this for cross-compilation.
|
||||||
- BUILD_DOCS=ON|OFF - whether to build the documentation. This is automatically set to OFF when Sphinx isn't installed.
|
- BUILD_DOCS=ON|OFF - whether to build the documentation. This is automatically set to OFF when Sphinx isn't installed.
|
||||||
- INSTALL_DOCS=ON|OFF - whether to install the docs. This is automatically set to on when BUILD_DOCS is or prebuilt documentation is available (like when building in-tree from a tarball).
|
- INSTALL_DOCS=ON|OFF - whether to install the docs. This is automatically set to on when BUILD_DOCS is or prebuilt documentation is available (like when building in-tree from a tarball).
|
||||||
- FISH_USE_SYSTEM_PCRE2=ON|OFF - whether to use an installed pcre2. This is normally autodetected.
|
- FISH_USE_SYSTEM_PCRE2=ON|OFF - whether to use an installed pcre2. This is normally autodetected.
|
||||||
@@ -166,19 +167,19 @@ In addition to the normal CMake build options (like ``CMAKE_INSTALL_PREFIX``), f
|
|||||||
- WITH_GETTEXT=ON|OFF - whether to build with gettext support for translations.
|
- WITH_GETTEXT=ON|OFF - whether to build with gettext support for translations.
|
||||||
- extra_functionsdir, extra_completionsdir and extra_confdir - to compile in an additional directory to be searched for functions, completions and configuration snippets
|
- extra_functionsdir, extra_completionsdir and extra_confdir - to compile in an additional directory to be searched for functions, completions and configuration snippets
|
||||||
|
|
||||||
Building fish as self-installable (experimental)
|
Building fish with embedded data (experimental)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
You can also build fish as a self-installing binary.
|
You can also build fish with the data files embedded.
|
||||||
|
|
||||||
This will include all the datafiles like the included functions or web configuration tool in the main ``fish`` binary.
|
This will include all the datafiles like the included functions or web configuration tool in the main ``fish`` binary.
|
||||||
|
|
||||||
On the first interactive run, and whenever it notices they are out of date, it will extract the datafiles to ~/.local/share/fish/install/ (currently, subject to change). You can do this manually by running ``fish --install``.
|
Fish will then read these right from its own binary, and print them out when needed. Some files, like the webconfig tool and the manpage completion generator, will be extracted to a temporary directory on-demand. You can list the files with ``status list-files`` and print one with ``status get-file path/to/file`` (e.g. ``status get-file functions/fish_prompt.fish`` to get the default prompt).
|
||||||
|
|
||||||
To install fish as self-installable, just use ``cargo``, like::
|
To install fish with embedded files, just use ``cargo``, like::
|
||||||
|
|
||||||
cargo install --path /path/to/fish # if you have a git clone
|
cargo install --path /path/to/fish # if you have a git clone
|
||||||
cargo install --git https://github.com/fish-shell/fish-shell --tag 4.0 # to build from git once 4.0 is released
|
cargo install --git https://github.com/fish-shell/fish-shell --tag 4.0.0 # to build from git with a specific version
|
||||||
cargo install --git https://github.com/fish-shell/fish-shell # to build the current development snapshot without cloning
|
cargo install --git https://github.com/fish-shell/fish-shell # to build the current development snapshot without cloning
|
||||||
|
|
||||||
This will place the binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
|
This will place the binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$#" -gt 2 -o "$#" -eq 0 ]; then
|
if [ "$#" -gt 2 ] || [ "$#" -eq 0 ]; then
|
||||||
echo "Usage: driver.sh /path/to/fish [/path/to/other/fish]"
|
echo "Usage: driver.sh /path/to/fish [/path/to/other/fish]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
48
build.rs
48
build.rs
@@ -3,7 +3,7 @@
|
|||||||
use rsconf::{LinkType, Target};
|
use rsconf::{LinkType, Target};
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::Path;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
setup_paths();
|
setup_paths();
|
||||||
@@ -41,14 +41,28 @@ fn main() {
|
|||||||
|
|
||||||
std::env::set_var("FISH_BUILD_VERSION", version);
|
std::env::set_var("FISH_BUILD_VERSION", version);
|
||||||
|
|
||||||
#[cfg(feature = "installable")]
|
let cman = std::fs::canonicalize(env!("CARGO_MANIFEST_DIR")).unwrap();
|
||||||
|
let targetman = cman.as_path().join("target").join("man");
|
||||||
|
|
||||||
|
#[cfg(feature = "embed-data")]
|
||||||
#[cfg(not(clippy))]
|
#[cfg(not(clippy))]
|
||||||
{
|
{
|
||||||
let cman = std::fs::canonicalize(env!("CARGO_MANIFEST_DIR")).unwrap();
|
|
||||||
let targetman = cman.as_path().join("target").join("man");
|
|
||||||
build_man(&targetman);
|
build_man(&targetman);
|
||||||
}
|
}
|
||||||
rsconf::rebuild_if_path_changed("src/libc.c");
|
#[cfg(any(not(feature = "embed-data"), clippy))]
|
||||||
|
{
|
||||||
|
let sec1dir = targetman.join("man1");
|
||||||
|
let _ = std::fs::create_dir_all(sec1dir.to_str().unwrap());
|
||||||
|
}
|
||||||
|
|
||||||
|
rsconf::rebuild_if_paths_changed(&["src", "printf", "Cargo.toml", "Cargo.lock", "build.rs"]);
|
||||||
|
|
||||||
|
// These are necessary if built with embedded functions,
|
||||||
|
// but only in release builds (because rust-embed in debug builds reads from the filesystem).
|
||||||
|
#[cfg(feature = "embed-data")]
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
|
rsconf::rebuild_if_paths_changed(&["doc_src", "share"]);
|
||||||
|
|
||||||
cc::Build::new()
|
cc::Build::new()
|
||||||
.file("src/libc.c")
|
.file("src/libc.c")
|
||||||
.include(build_dir)
|
.include(build_dir)
|
||||||
@@ -88,7 +102,9 @@ fn detect_cfgs(target: &mut Target) {
|
|||||||
"",
|
"",
|
||||||
&(|_: &Target| Ok(false)) as &dyn Fn(&Target) -> Result<bool, Box<dyn Error>>,
|
&(|_: &Target| Ok(false)) as &dyn Fn(&Target) -> Result<bool, Box<dyn Error>>,
|
||||||
),
|
),
|
||||||
|
("apple", &detect_apple),
|
||||||
("bsd", &detect_bsd),
|
("bsd", &detect_bsd),
|
||||||
|
("cygwin", &detect_cygwin),
|
||||||
("gettext", &have_gettext),
|
("gettext", &have_gettext),
|
||||||
("small_main_stack", &has_small_stack),
|
("small_main_stack", &has_small_stack),
|
||||||
// See if libc supports the thread-safe localeconv_l(3) alternative to localeconv(3).
|
// See if libc supports the thread-safe localeconv_l(3) alternative to localeconv(3).
|
||||||
@@ -123,6 +139,15 @@ fn detect_cfgs(target: &mut Target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn detect_apple(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||||
|
Ok(cfg!(any(target_os = "ios", target_os = "macos")))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unexpected_cfgs)]
|
||||||
|
fn detect_cygwin(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||||
|
Ok(cfg!(target_os = "cygwin"))
|
||||||
|
}
|
||||||
|
|
||||||
/// Detect if we're being compiled for a BSD-derived OS, allowing targeting code conditionally with
|
/// Detect if we're being compiled for a BSD-derived OS, allowing targeting code conditionally with
|
||||||
/// `#[cfg(bsd)]`.
|
/// `#[cfg(bsd)]`.
|
||||||
///
|
///
|
||||||
@@ -199,14 +224,14 @@ fn have_gettext(target: &Target) -> Result<bool, Box<dyn Error>> {
|
|||||||
/// 0.5 MiB is small enough that we'd have to drastically reduce MAX_STACK_DEPTH to less than 10, so
|
/// 0.5 MiB is small enough that we'd have to drastically reduce MAX_STACK_DEPTH to less than 10, so
|
||||||
/// we instead use a workaround to increase the main thread size.
|
/// we instead use a workaround to increase the main thread size.
|
||||||
fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
|
fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||||
#[cfg(not(any(target_os = "macos", target_os = "netbsd")))]
|
#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "netbsd")))]
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
|
|
||||||
// NetBSD 10 also needs this but can't find pthread_get_stacksize_np.
|
// NetBSD 10 also needs this but can't find pthread_get_stacksize_np.
|
||||||
#[cfg(target_os = "netbsd")]
|
#[cfg(target_os = "netbsd")]
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||||
{
|
{
|
||||||
use core::ffi;
|
use core::ffi;
|
||||||
|
|
||||||
@@ -227,6 +252,11 @@ fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn setup_paths() {
|
fn setup_paths() {
|
||||||
|
#[cfg(unix)]
|
||||||
|
use std::path::PathBuf;
|
||||||
|
#[cfg(windows)]
|
||||||
|
use unix_path::{Path, PathBuf};
|
||||||
|
|
||||||
fn get_path(name: &str, default: &str, onvar: &Path) -> PathBuf {
|
fn get_path(name: &str, default: &str, onvar: &Path) -> PathBuf {
|
||||||
let mut var = PathBuf::from(env::var(name).unwrap_or(default.to_string()));
|
let mut var = PathBuf::from(env::var(name).unwrap_or(default.to_string()));
|
||||||
if var.is_relative() {
|
if var.is_relative() {
|
||||||
@@ -327,7 +357,7 @@ fn get_git_hash() -> Result<String, Box<dyn std::error::Error>> {
|
|||||||
// .git/HEAD contains ref: refs/heads/branch
|
// .git/HEAD contains ref: refs/heads/branch
|
||||||
let headpath = gitdir.join("HEAD");
|
let headpath = gitdir.join("HEAD");
|
||||||
let headstr = read_to_string(headpath)?;
|
let headstr = read_to_string(headpath)?;
|
||||||
let headref = headstr.split(' ').collect::<Vec<_>>()[1].trim();
|
let headref = headstr.split(' ').nth(1).unwrap().trim();
|
||||||
|
|
||||||
// .git/refs/heads/branch contains the SHA
|
// .git/refs/heads/branch contains the SHA
|
||||||
let refpath = gitdir.join(headref);
|
let refpath = gitdir.join(headref);
|
||||||
@@ -360,7 +390,7 @@ fn get_git_hash() -> Result<String, Box<dyn std::error::Error>> {
|
|||||||
get_git_hash().expect("Could not get a version. Either set $FISH_BUILD_VERSION or install git.")
|
get_git_hash().expect("Could not get a version. Either set $FISH_BUILD_VERSION or install git.")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "installable")]
|
#[cfg(feature = "embed-data")]
|
||||||
// disable clippy because otherwise it would panic without sphinx
|
// disable clippy because otherwise it would panic without sphinx
|
||||||
#[cfg(not(clippy))]
|
#[cfg(not(clippy))]
|
||||||
fn build_man(build_dir: &Path) {
|
fn build_man(build_dir: &Path) {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ then
|
|||||||
# HACK: Git failed, so we keep the current version file.
|
# HACK: Git failed, so we keep the current version file.
|
||||||
# This helps in case you built fish as a normal user
|
# This helps in case you built fish as a normal user
|
||||||
# and then try to `sudo make install` it.
|
# and then try to `sudo make install` it.
|
||||||
date +%s > ${OUTPUT_DIR}fish-build-version-witness.txt
|
date +%s > "${OUTPUT_DIR}"fish-build-version-witness.txt
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -67,4 +67,4 @@ test "$VN" = "$VC" || {
|
|||||||
|
|
||||||
# Output the fish-build-version-witness.txt
|
# Output the fish-build-version-witness.txt
|
||||||
# See https://cmake.org/cmake/help/v3.4/policy/CMP0058.html
|
# See https://cmake.org/cmake/help/v3.4/policy/CMP0058.html
|
||||||
date +%s > ${OUTPUT_DIR}fish-build-version-witness.txt
|
date +%s > "${OUTPUT_DIR}"fish-build-version-witness.txt
|
||||||
|
|||||||
392
build_tools/ios_entitlements.xml
Normal file
392
build_tools/ios_entitlements.xml
Normal file
@@ -0,0 +1,392 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>platform-application</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.no-container</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.container-manager</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.skip-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.MobileContainerManager.allowed</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.adprivacyd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.amfid</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.AppBundles</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.AppDataContainers</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.automation-mode</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Biome</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Calendar</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.CallHistory</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.CarrierBundles</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.chronod</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.CloudDocsDB</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.CloudKit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.containers</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.CoreFollowUp</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.CoreKnowledge</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Cryptex</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.demo_backup</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.DocumentRevisions</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.DumpPanic</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.ExposureNotification</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.FaceTime</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.familycircled</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.FindMy</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.fpsd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Health</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.HomeAI</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.HomeKit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.iCloudDrive</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.idcredd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.IdentityServices</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.kbd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Keychains</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Lockdown</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Mail</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Messages</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.MessagesMetaData</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.MobileContainerManager</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.MobileDocuments</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.MobileIdentityService</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.mobilesync</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.multimodalsearchd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.NanoTimeKit.FaceSupport</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.News</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Notes</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Photos</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.PhotosLibraries</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.pipelined</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.preferences</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.PrivacyAccounting</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Safari</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SearchParty</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SecureElementService</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SensorKit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SFAnalytics</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SiriInference</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SiriReferenceResolution</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SiriVocabulary</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SoC</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SpeechPersonalizedLM</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Spotlight</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.StatusKit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Stocks</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Suggestions</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SymptomFramework</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.sysdagnose.ScreenshotServicesService</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.TCC</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.TimeMachine</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.triald</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.trustd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.trustd-private</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.universalaccess</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Voicemail</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Wireless</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.disk-device-access</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.ane_model_cache</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.apfs_boot_mount</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.clientScripter</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.mediaanalysisd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.CarPlayAppBlacklist</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.DeviceCheck</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.DictionaryServices.dictionary2</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.DuetExpertCenterAsset</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.EmbeddedNL</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Font5</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Font6</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.HealthKt.FeatureAvailability</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.HomeKit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.MacinTalkVoiceAssets</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.MailDynamicData</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.MXLongFormVideoApps</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.network.networknomicon</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.PKITrustSupplementals</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.SharingDeviceAssets</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.SiriShortcutsMobileAsset</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.TimeZoneUpdate</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.VoiceServices.CombinedVocalizerVoices</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.VoiceServices.CustomVoice</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.VoiceServices.GryphonVoice</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.VoiceServicesVocalizerVoice</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.VoiceServices.VoiceResources</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.VoiceTriggerAssets</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.CoreAnalytics</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.coreduet_knowledge_store</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.coreidvd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.coreknowledge</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.CoreRoutine</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.CoreSpeech</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.dmd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.dprivacyd_storage</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.ExtensibleSSO</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.facekit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.fpsd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.MobileStorageMounter</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.MusicApp</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.nsurlsessiond</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.pearl-field-diagnostics</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.proactivepredictions</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.QLThumbnailCache</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.remotemanagementd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.RoleAccountStaging</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.sensorkit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.shortcuts</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.siriremembers</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.timezone</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.triald</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.voiceshortcuts</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage-exempt.heritable</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.AppleMediaServices</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.ContactlessReader</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.CoreRoutine</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.DiagnosticReports</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.DiagnosticReports.read-write</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.DoNotDisturb</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Home</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.IntelligencePlatform</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Location</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.ManagedConfiguration</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.MapsSync</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.MobileBackup</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.MobileStorageMounter</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.PassKit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SiriFeatureStore</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SiriSELF</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.SoundProfileAsset</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.TextUnderstanding</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.Weather</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.appleaccountd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.ciconia</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.clipserviced</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.coreduet_knowledge_store</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.driverkitd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.geoanalyticsd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.geod</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.launchd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.sessionkitd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.sysdiagnose.ScreenshotServicesService</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.sysdiagnose.sysdiagnose</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.private.security.storage.tmp</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.critical</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.datavault.metadata</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.install</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.install.heritable</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.restricted-block-devices</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.MobileAssetDownload</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.amsengagementd</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.HealthKit.FeatureAvailability</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriDialogAssets</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriExperienceCam</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriFindMyConfigurationFiles</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriInferredHelpfulness</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriTextToSpeech</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriUnderstandingAsrAssistant</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriUnderstandingAsrHammer</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriUnderstandingAsrUaap</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriUnderstandingAttentionAssets</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriUnderstandingMorphun</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriUnderstandingNL</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.com.apple.MobileAsset.Trial.Siri.SiriUnderstandingNLOverrides</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.coreparsec_feedbacks</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.coreparsec_uploadables</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.early_boot_mount</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.storage.screentime</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.volume.ISCRecovery</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.volume.Preboot</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.volume.Recovery</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.volume.Update</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.volume.VM</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.rootless.volume.iSCPreboot</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Helper to notarize an .app.zip or .pkg file.
|
# Helper to notarize an .app.zip or .pkg file.
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ for INPUT in "$@"; do
|
|||||||
echo "Processing $INPUT"
|
echo "Processing $INPUT"
|
||||||
test -f "$INPUT" || die "Not a file: $INPUT"
|
test -f "$INPUT" || die "Not a file: $INPUT"
|
||||||
ext="${INPUT##*.}"
|
ext="${INPUT##*.}"
|
||||||
(test "$ext" = "zip" || test "$ext" = "pkg") || die "Unrecognized extension: $ext"
|
{ test "$ext" = "zip" || test "$ext" = "pkg"; } || die "Unrecognized extension: $ext"
|
||||||
|
|
||||||
xcrun notarytool submit "$INPUT" --keychain-profile AC_PASSWORD --wait
|
xcrun notarytool submit "$INPUT" --keychain-profile AC_PASSWORD --wait
|
||||||
|
|
||||||
@@ -21,9 +21,7 @@ for INPUT in "$@"; do
|
|||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
echo "Extracting to $TMPDIR"
|
echo "Extracting to $TMPDIR"
|
||||||
unzip -q "$INPUT" -d "$TMPDIR"
|
unzip -q "$INPUT" -d "$TMPDIR"
|
||||||
# Force glob expansion.
|
STAPLE_TARGET=$(echo "$TMPDIR"/*)
|
||||||
STAPLE_TARGET="$TMPDIR"/*
|
|
||||||
STAPLE_TARGET=$(echo $STAPLE_TARGET)
|
|
||||||
else
|
else
|
||||||
STAPLE_TARGET="$INPUT"
|
STAPLE_TARGET="$INPUT"
|
||||||
fi
|
fi
|
||||||
@@ -35,7 +33,7 @@ for INPUT in "$@"; do
|
|||||||
INPUT_FULL=$(realpath "$INPUT")
|
INPUT_FULL=$(realpath "$INPUT")
|
||||||
rm -f "$INPUT"
|
rm -f "$INPUT"
|
||||||
cd "$(dirname "$STAPLE_TARGET")"
|
cd "$(dirname "$STAPLE_TARGET")"
|
||||||
zip -r -q "$INPUT_FULL" $(basename "$STAPLE_TARGET")
|
zip -r -q "$INPUT_FULL" "$(basename "$STAPLE_TARGET")"
|
||||||
fi
|
fi
|
||||||
echo "Processed $INPUT"
|
echo "Processed $INPUT"
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ usage() {
|
|||||||
echo " -p <PASSWORD> Password for the .p12 files (necessary to access the certificates)"
|
echo " -p <PASSWORD> Password for the .p12 files (necessary to access the certificates)"
|
||||||
echo " -e <entitlements file> (Optional) Path to an entitlements XML file"
|
echo " -e <entitlements file> (Optional) Path to an entitlements XML file"
|
||||||
echo " -n Enables notarization. This will fail if code signing is not also enabled."
|
echo " -n Enables notarization. This will fail if code signing is not also enabled."
|
||||||
echo " -j <API_KEY.JSON> Path to JSON file generated with `rcodesign encode-app-store-connect-api-key` (required for notarization)"
|
echo " -j <API_KEY.JSON> Path to JSON file generated with \`rcodesign encode-app-store-connect-api-key\` (required for notarization)"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ while getopts "sf:i:p:e:nj:" opt; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$SIGN" ] && ([ -z "$P12_APP_FILE" ] || [-z "$P12_INSTALL_FILE"] || [ -z "$P12_PASSWORD" ]); then
|
if [ -n "$SIGN" ] && { [ -z "$P12_APP_FILE" ] || [ -z "$P12_INSTALL_FILE" ] || [ -z "$P12_PASSWORD" ]; }; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ mkdir -p "$PKGDIR/build_x86_64" "$PKGDIR/build_arm64" "$PKGDIR/root" "$PKGDIR/in
|
|||||||
|
|
||||||
# Fatten them up.
|
# Fatten them up.
|
||||||
for FILE in "$PKGDIR"/root/usr/local/bin/*; do
|
for FILE in "$PKGDIR"/root/usr/local/bin/*; do
|
||||||
X86_FILE="$PKGDIR/build_x86_64/$(basename $FILE)"
|
X86_FILE="$PKGDIR/build_x86_64/$(basename "$FILE")"
|
||||||
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
||||||
chmod 755 "$FILE"
|
chmod 755 "$FILE"
|
||||||
done
|
done
|
||||||
@@ -145,7 +145,7 @@ fi
|
|||||||
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtesy of CMake.
|
# Make the app's /usr/local/bin binaries universal. Note fish.app/Contents/MacOS/fish already is, courtesy of CMake.
|
||||||
cd "$PKGDIR/build_arm64"
|
cd "$PKGDIR/build_arm64"
|
||||||
for FILE in fish.app/Contents/Resources/base/usr/local/bin/*; do
|
for FILE in fish.app/Contents/Resources/base/usr/local/bin/*; do
|
||||||
X86_FILE="$PKGDIR/build_x86_64/fish.app/Contents/Resources/base/usr/local/bin/$(basename $FILE)"
|
X86_FILE="$PKGDIR/build_x86_64/fish.app/Contents/Resources/base/usr/local/bin/$(basename "$FILE")"
|
||||||
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
rcodesign macho-universal-create --output "$FILE" "$FILE" "$X86_FILE"
|
||||||
|
|
||||||
# macho-universal-create screws up the permissions.
|
# macho-universal-create screws up the permissions.
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ git archive --format=tar --prefix="$prefix"/ HEAD > "$path"
|
|||||||
PREFIX_TMPDIR=$(mktemp -d)
|
PREFIX_TMPDIR=$(mktemp -d)
|
||||||
cd "$PREFIX_TMPDIR"
|
cd "$PREFIX_TMPDIR"
|
||||||
echo "$VERSION" > version
|
echo "$VERSION" > version
|
||||||
cmake -G "$BUILD_GENERATOR" "$wd"
|
cmake -G "$BUILD_GENERATOR" -DCMAKE_BUILD_TYPE=Debug "$wd"
|
||||||
$BUILD_TOOL doc
|
$BUILD_TOOL doc
|
||||||
|
|
||||||
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 \
|
TAR_APPEND="$TAR --append --file=$path --mtime=now --owner=0 --group=0 \
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ cd "$PREFIX_TMPDIR"
|
|||||||
mkdir .cargo
|
mkdir .cargo
|
||||||
cargo vendor --manifest-path "$wd/Cargo.toml" > .cargo/config.toml
|
cargo vendor --manifest-path "$wd/Cargo.toml" > .cargo/config.toml
|
||||||
|
|
||||||
tar cfvJ $path.xz vendor .cargo
|
tar cfvJ "$path".xz vendor .cargo
|
||||||
|
|
||||||
cd -
|
cd -
|
||||||
rm -r "$PREFIX_TMPDIR"
|
rm -r "$PREFIX_TMPDIR"
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
if test $# -eq 0
|
if test $# -eq 0
|
||||||
then
|
then
|
||||||
echo usage: $0 shellname [shellname ...]
|
echo "usage: $0 shellname [shellname ...]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
scriptname=`basename "$0"`
|
scriptname=$(basename "$0")
|
||||||
if [[ $UID -ne 0 ]]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo "${scriptname} must be run as root"
|
echo "${scriptname} must be run as root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -20,6 +20,7 @@ tmpfile=${file}.tmp
|
|||||||
|
|
||||||
set -o noclobber
|
set -o noclobber
|
||||||
|
|
||||||
|
# shellcheck disable=SC2064
|
||||||
trap "rm -f $tmpfile" EXIT
|
trap "rm -f $tmpfile" EXIT
|
||||||
|
|
||||||
if ! cat $file > $tmpfile
|
if ! cat $file > $tmpfile
|
||||||
@@ -32,15 +33,13 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Append a newline if it doesn't exist
|
# Append a newline if it doesn't exist
|
||||||
if [ "$(tail -c1 "$tmpfile"; echo x)" != $'\nx' ]; then
|
[ -z "$(tail -c1 "$tmpfile")" ] || echo "" >> "$tmpfile"
|
||||||
echo "" >> "$tmpfile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if ! grep -q "^${i}$" "$tmpfile"
|
if ! grep -q "^${i}$" "$tmpfile"
|
||||||
then
|
then
|
||||||
echo $i >> "$tmpfile"
|
echo "$i" >> "$tmpfile"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh -x
|
#!/bin/sh -x
|
||||||
|
|
||||||
./add-shell ${DSTVOLUME}usr/local/bin/fish
|
./add-shell "${DSTVOLUME}"usr/local/bin/fish
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh -x
|
#!/bin/sh -x
|
||||||
|
|
||||||
echo "Removing any previous installation"
|
echo "Removing any previous installation"
|
||||||
pkgutil --pkg-info ${INSTALL_PKG_SESSION_ID} && pkgutil --only-files --files ${INSTALL_PKG_SESSION_ID} | while read installed
|
pkgutil --pkg-info "${INSTALL_PKG_SESSION_ID}" && pkgutil --only-files --files "${INSTALL_PKG_SESSION_ID}" | while read -r installed
|
||||||
do rm -v ${DSTVOLUME}${installed}
|
do rm -v "${DSTVOLUME}${installed}"
|
||||||
done
|
done
|
||||||
echo "... removed"
|
echo "... removed"
|
||||||
|
|||||||
@@ -1,286 +1,18 @@
|
|||||||
#[=======================================================================[.rst:
|
#[=======================================================================[.rst:
|
||||||
FindRust
|
|
||||||
--------
|
|
||||||
|
|
||||||
Find Rust
|
|
||||||
|
|
||||||
This module finds an installed rustc compiler and the cargo build tool. If Rust
|
|
||||||
is managed by rustup it determines the available toolchains and returns a
|
|
||||||
concrete Rust version, not a rustup proxy.
|
|
||||||
|
|
||||||
Imported from Corrosion https://github.com/corrosion-rs/corrosion/
|
Imported from Corrosion https://github.com/corrosion-rs/corrosion/
|
||||||
|
|
||||||
Copyright (c) 2018 Andrew Gaspar
|
Copyright (c) 2018 Andrew Gaspar
|
||||||
|
|
||||||
Licensed under the MIT license
|
Licensed under the MIT license
|
||||||
|
|
||||||
|
However this is absolutely gutted and reduced to the bare minimum.
|
||||||
#]=======================================================================]
|
#]=======================================================================]
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
|
||||||
# search for Cargo here and set up a bunch of cool flags and stuff
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MESSAGE_CONTEXT "FindRust")
|
|
||||||
|
|
||||||
# Print error message and return.
|
|
||||||
macro(_findrust_failed)
|
|
||||||
if("${Rust_FIND_REQUIRED}")
|
|
||||||
message(FATAL_ERROR ${ARGN})
|
|
||||||
elseif(NOT "${Rust_FIND_QUIETLY}")
|
|
||||||
message(WARNING ${ARGN})
|
|
||||||
endif()
|
|
||||||
# Note: PARENT_SCOPE is the scope of the caller of the caller of this macro.
|
|
||||||
set(Rust_FOUND "" PARENT_SCOPE)
|
|
||||||
return()
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
# Checks if the actual version of a Rust toolchain matches the VERSION requirements specified in find_package.
|
|
||||||
function(_findrust_version_ok ACTUAL_VERSION OUT_IS_OK)
|
|
||||||
if(DEFINED Rust_FIND_VERSION_RANGE)
|
|
||||||
if(Rust_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE")
|
|
||||||
set(COMPARSION_OPERATOR "VERSION_LESS_EQUAL")
|
|
||||||
elseif(Rust_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE")
|
|
||||||
set(COMPARSION_OPERATOR "VERSION_LESS")
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "Unexpected value in `<PackageName>_FIND_VERSION_RANGE_MAX`: "
|
|
||||||
"`${Rust_FIND_VERSION_RANGE_MAX}`.")
|
|
||||||
endif()
|
|
||||||
if(("${ACTUAL_VERSION}" VERSION_GREATER_EQUAL "${Rust_FIND_VERSION_RANGE_MIN}")
|
|
||||||
AND
|
|
||||||
( "${ACTUAL_VERSION}" ${COMPARSION_OPERATOR} "${Rust_FIND_VERSION_RANGE_MAX}" )
|
|
||||||
)
|
|
||||||
set("${OUT_IS_OK}" TRUE PARENT_SCOPE)
|
|
||||||
else()
|
|
||||||
set("${OUT_IS_OK}" FALSE PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
elseif(DEFINED Rust_FIND_VERSION)
|
|
||||||
if(Rust_VERSION_EXACT)
|
|
||||||
set(COMPARISON_OPERATOR VERSION_EQUAL)
|
|
||||||
else()
|
|
||||||
set(COMPARISON_OPERATOR VERSION_GREATER_EQUAL)
|
|
||||||
endif()
|
|
||||||
if(_TOOLCHAIN_${_TOOLCHAIN_SELECTED}_VERSION "${COMPARISON_OPERATOR}" Rust_FIND_VERSION)
|
|
||||||
set("${OUT_IS_OK}" TRUE PARENT_SCOPE)
|
|
||||||
else()
|
|
||||||
set("${OUT_IS_OK}" FALSE PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
# if no VERSION requirement was specified, the version is always okay.
|
|
||||||
set("${OUT_IS_OK}" TRUE PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(_corrosion_strip_target_triple input_triple_or_path output_triple)
|
|
||||||
# If the target_triple is a path to a custom target specification file, then strip everything
|
|
||||||
# except the filename from `target_triple`.
|
|
||||||
get_filename_component(target_triple_ext "${input_triple_or_path}" EXT)
|
|
||||||
set(target_triple "${input_triple_or_path}")
|
|
||||||
if(target_triple_ext)
|
|
||||||
if(target_triple_ext STREQUAL ".json")
|
|
||||||
get_filename_component(target_triple "${input_triple_or_path}" NAME_WE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
set(${output_triple} "${target_triple}" PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(_corrosion_parse_target_triple target_triple out_arch out_vendor out_os out_env)
|
|
||||||
_corrosion_strip_target_triple(${target_triple} target_triple)
|
|
||||||
|
|
||||||
# The vendor part may be left out from the target triple, and since `env` is also optional,
|
|
||||||
# we determine if vendor is present by matching against a list of known vendors.
|
|
||||||
set(known_vendors
|
|
||||||
"apple"
|
|
||||||
"esp[a-z0-9]*" # espressif, e.g. riscv32imc-esp-espidf or xtensa-esp32s3-none-elf
|
|
||||||
"fortanix"
|
|
||||||
"kmc"
|
|
||||||
"pc"
|
|
||||||
"nintendo"
|
|
||||||
"nvidia"
|
|
||||||
"openwrt"
|
|
||||||
"alpine"
|
|
||||||
"chimera"
|
|
||||||
"unikraft"
|
|
||||||
"unknown"
|
|
||||||
"uwp" # aarch64-uwp-windows-msvc
|
|
||||||
"wrs" # e.g. aarch64-wrs-vxworks
|
|
||||||
"sony"
|
|
||||||
"sun"
|
|
||||||
)
|
|
||||||
# todo: allow users to add additional vendors to the list via a cmake variable.
|
|
||||||
list(JOIN known_vendors "|" known_vendors_joined)
|
|
||||||
# vendor is optional - We detect if vendor is present by matching against a known list of
|
|
||||||
# vendors. The next field is the OS, which we assume to always be present, while the last field
|
|
||||||
# is again optional and contains the environment.
|
|
||||||
string(REGEX MATCH
|
|
||||||
"^([a-z0-9_\.]+)-((${known_vendors_joined})-)?([a-z0-9_]+)(-([a-z0-9_]+))?$"
|
|
||||||
whole_match
|
|
||||||
"${target_triple}"
|
|
||||||
)
|
|
||||||
if((NOT whole_match) AND (NOT CORROSION_NO_WARN_PARSE_TARGET_TRIPLE_FAILED))
|
|
||||||
message(WARNING "Failed to parse target-triple `${target_triple}`."
|
|
||||||
"Corrosion determines some information about the output artifacts based on OS "
|
|
||||||
"specified in the Rust target-triple.\n"
|
|
||||||
"Currently this is relevant for windows and darwin (mac) targets, since file "
|
|
||||||
"extensions differ.\n"
|
|
||||||
"Note: If you are targeting a different OS you can suppress this warning by"
|
|
||||||
" setting the CMake cache variable "
|
|
||||||
"`CORROSION_NO_WARN_PARSE_TARGET_TRIPLE_FAILED`."
|
|
||||||
"Please consider opening an issue on github if you you need to add a new vendor to the list."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(DEBUG "Parsed Target triple: arch: ${CMAKE_MATCH_1}, vendor: ${CMAKE_MATCH_3}, "
|
|
||||||
"OS: ${CMAKE_MATCH_4}, env: ${CMAKE_MATCH_6}")
|
|
||||||
|
|
||||||
set("${out_arch}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
|
|
||||||
set("${out_vendor}" "${CMAKE_MATCH_3}" PARENT_SCOPE)
|
|
||||||
set("${out_os}" "${CMAKE_MATCH_4}" PARENT_SCOPE)
|
|
||||||
set("${out_env}" "${CMAKE_MATCH_6}" PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(_corrosion_determine_libs_new target_triple out_libs)
|
|
||||||
set(package_dir "${CMAKE_BINARY_DIR}/corrosion/required_libs")
|
|
||||||
# Cleanup on reconfigure to get a cleans state (in case we change something in the future)
|
|
||||||
file(REMOVE_RECURSE "${package_dir}")
|
|
||||||
file(MAKE_DIRECTORY "${package_dir}")
|
|
||||||
set(manifest "[package]\nname = \"required_libs\"\nedition = \"2018\"\nversion = \"0.1.0\"\n")
|
|
||||||
string(APPEND manifest "\n[lib]\ncrate-type=[\"staticlib\"]\npath = \"lib.rs\"\n")
|
|
||||||
string(APPEND manifest "\n[workspace]\n")
|
|
||||||
file(WRITE "${package_dir}/Cargo.toml" "${manifest}")
|
|
||||||
file(WRITE "${package_dir}/lib.rs" "pub fn add(left: usize, right: usize) -> usize {left + right}\n")
|
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E env
|
|
||||||
"CARGO_BUILD_RUSTC=${Rust_COMPILER_CACHED}"
|
|
||||||
${Rust_CARGO_CACHED} rustc --verbose --color never --target=${target_triple} -- --print=native-static-libs
|
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/corrosion/required_libs"
|
|
||||||
RESULT_VARIABLE cargo_build_result
|
|
||||||
ERROR_VARIABLE cargo_build_error_message
|
|
||||||
)
|
|
||||||
if(cargo_build_result)
|
|
||||||
message(DEBUG "Determining required native libraries - failed: ${cargo_build_result}.")
|
|
||||||
message(TRACE "The cargo build error was: ${cargo_build_error_message}")
|
|
||||||
message(DEBUG "Note: This is expected for Rust targets without std support")
|
|
||||||
return()
|
|
||||||
else()
|
|
||||||
# The pattern starts with `native-static-libs:` and goes to the end of the line.
|
|
||||||
if(cargo_build_error_message MATCHES "native-static-libs: ([^\r\n]+)\r?\n")
|
|
||||||
string(REPLACE " " ";" "libs_list" "${CMAKE_MATCH_1}")
|
|
||||||
set(stripped_lib_list "")
|
|
||||||
|
|
||||||
set(was_last_framework OFF)
|
|
||||||
foreach(lib ${libs_list})
|
|
||||||
# merge -framework;lib -> "-framework lib" as CMake does de-duplication of link libraries, and -framework prefix is required
|
|
||||||
if (lib STREQUAL "-framework")
|
|
||||||
set(was_last_framework ON)
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
if (was_last_framework)
|
|
||||||
list(APPEND stripped_lib_list "-framework ${lib}")
|
|
||||||
set(was_last_framework OFF)
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
# Strip leading `-l` (unix) and potential .lib suffix (windows)
|
|
||||||
string(REGEX REPLACE "^-l" "" "stripped_lib" "${lib}")
|
|
||||||
string(REGEX REPLACE "\.lib$" "" "stripped_lib" "${stripped_lib}")
|
|
||||||
list(APPEND stripped_lib_list "${stripped_lib}")
|
|
||||||
endforeach()
|
|
||||||
set(libs_list "${stripped_lib_list}")
|
|
||||||
# Special case `msvcrt` to link with the debug version in Debug mode.
|
|
||||||
list(TRANSFORM libs_list REPLACE "^msvcrt$" "\$<\$<CONFIG:Debug>:msvcrtd>")
|
|
||||||
else()
|
|
||||||
message(DEBUG "Determining required native libraries - failed: Regex match failure.")
|
|
||||||
message(DEBUG "`native-static-libs` not found in: `${cargo_build_error_message}`")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
set("${out_libs}" "${libs_list}" PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
if (NOT "${Rust_TOOLCHAIN}" STREQUAL "$CACHE{Rust_TOOLCHAIN}")
|
|
||||||
# Promote Rust_TOOLCHAIN to a cache variable if it is not already a cache variable
|
|
||||||
set(Rust_TOOLCHAIN ${Rust_TOOLCHAIN} CACHE STRING "Requested rustup toolchain" FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(_RESOLVE_RUSTUP_TOOLCHAINS_DESC "Indicates whether to descend into the toolchain pointed to by rustup")
|
|
||||||
set(Rust_RESOLVE_RUSTUP_TOOLCHAINS ON CACHE BOOL ${_RESOLVE_RUSTUP_TOOLCHAINS_DESC})
|
|
||||||
|
|
||||||
# This block checks to see if we're prioritizing a rustup-managed toolchain.
|
|
||||||
if (DEFINED Rust_TOOLCHAIN)
|
|
||||||
# If the user specifies `Rust_TOOLCHAIN`, then look for `rustup` first, rather than `rustc`.
|
|
||||||
find_program(Rust_RUSTUP rustup PATHS "$ENV{HOME}/.cargo/bin")
|
|
||||||
if(NOT Rust_RUSTUP)
|
|
||||||
if(NOT "${Rust_FIND_QUIETLY}")
|
|
||||||
message(
|
|
||||||
WARNING "CMake variable `Rust_TOOLCHAIN` specified, but `rustup` was not found. "
|
|
||||||
"Ignoring toolchain and looking for a Rust toolchain not managed by rustup.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
# If we aren't definitely using a rustup toolchain, look for rustc first - the user may have
|
|
||||||
# a toolchain installed via a method other than rustup higher in the PATH, which should be
|
|
||||||
# preferred. However, if the first-found rustc is a rustup proxy, then we'll revert to
|
|
||||||
# finding the preferred toolchain via rustup.
|
|
||||||
|
|
||||||
# Uses `Rust_COMPILER` to let user-specified `rustc` win. But we will still "override" the
|
|
||||||
# user's setting if it is pointing to `rustup`. Default rustup install path is provided as a
|
|
||||||
# backup if a toolchain cannot be found in the user's PATH.
|
|
||||||
|
|
||||||
if (DEFINED Rust_COMPILER)
|
|
||||||
set(_Rust_COMPILER_TEST "${Rust_COMPILER}")
|
|
||||||
set(_USER_SPECIFIED_RUSTC ON)
|
|
||||||
if(NOT (EXISTS "${_Rust_COMPILER_TEST}" AND NOT IS_DIRECTORY "${_Rust_COMPILER_TEST}"))
|
|
||||||
set(_ERROR_MESSAGE "Rust_COMPILER was set to `${Rust_COMPILER}`, but this file does "
|
|
||||||
"not exist."
|
|
||||||
)
|
|
||||||
_findrust_failed(${_ERROR_MESSAGE})
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
find_program(_Rust_COMPILER_TEST rustc PATHS "$ENV{HOME}/.cargo/bin")
|
|
||||||
if(NOT EXISTS "${_Rust_COMPILER_TEST}")
|
|
||||||
set(_ERROR_MESSAGE "`rustc` not found in PATH or `$ENV{HOME}/.cargo/bin`.\n"
|
|
||||||
"Hint: Check if `rustc` is in PATH or manually specify the location "
|
|
||||||
"by setting `Rust_COMPILER` to the path to `rustc`.")
|
|
||||||
_findrust_failed(${_ERROR_MESSAGE})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check if the discovered rustc is actually a "rustup" proxy.
|
|
||||||
execute_process(
|
|
||||||
COMMAND
|
|
||||||
${CMAKE_COMMAND} -E env
|
|
||||||
RUSTUP_FORCE_ARG0=rustup
|
|
||||||
"${_Rust_COMPILER_TEST}" --version
|
|
||||||
OUTPUT_VARIABLE _RUSTC_VERSION_RAW
|
|
||||||
ERROR_VARIABLE _RUSTC_VERSION_STDERR
|
|
||||||
RESULT_VARIABLE _RUSTC_VERSION_RESULT
|
|
||||||
)
|
|
||||||
|
|
||||||
if(NOT (_RUSTC_VERSION_RESULT EQUAL "0"))
|
|
||||||
_findrust_failed("`${_Rust_COMPILER_TEST} --version` failed with ${_RUSTC_VERSION_RESULT}\n"
|
|
||||||
"rustc stderr:\n${_RUSTC_VERSION_STDERR}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (_RUSTC_VERSION_RAW MATCHES "rustup [0-9\\.]+")
|
|
||||||
# Get `rustup` next to the `rustc` proxy
|
|
||||||
get_filename_component(_RUST_PROXIES_PATH "${_Rust_COMPILER_TEST}" DIRECTORY)
|
|
||||||
find_program(Rust_RUSTUP rustup HINTS "${_RUST_PROXIES_PATH}" NO_DEFAULT_PATH)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
unset(_Rust_COMPILER_TEST CACHE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# At this point, the only thing we should have evaluated is a path to `rustup` _if that's what the
|
|
||||||
# best source for a Rust toolchain was determined to be_.
|
|
||||||
if (NOT Rust_RUSTUP)
|
|
||||||
set(Rust_RESOLVE_RUSTUP_TOOLCHAINS OFF CACHE BOOL ${_RESOLVE_RUSTUP_TOOLCHAINS_DESC} FORCE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# List of user variables that will override any toolchain-provided setting
|
# List of user variables that will override any toolchain-provided setting
|
||||||
set(_Rust_USER_VARS Rust_COMPILER Rust_CARGO Rust_CARGO_TARGET Rust_CARGO_HOST_TARGET)
|
set(_Rust_USER_VARS Rust_COMPILER Rust_CARGO Rust_CARGO_TARGET)
|
||||||
foreach(_VAR ${_Rust_USER_VARS})
|
foreach(_VAR ${_Rust_USER_VARS})
|
||||||
if (DEFINED "${_VAR}")
|
if (DEFINED "${_VAR}")
|
||||||
set(${_VAR}_CACHED "${${_VAR}}" CACHE INTERNAL "Internal cache of ${_VAR}")
|
set(${_VAR}_CACHED "${${_VAR}}" CACHE INTERNAL "Internal cache of ${_VAR}")
|
||||||
@@ -289,482 +21,55 @@ foreach(_VAR ${_Rust_USER_VARS})
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Discover what toolchains are installed by rustup, if the discovered `rustc` is a proxy from
|
if (NOT DEFINED Rust_CARGO_CACHED)
|
||||||
# `rustup` and the user hasn't explicitly requested to override this behavior, then select either
|
find_program(Rust_CARGO_CACHED cargo PATHS "$ENV{HOME}/.cargo/bin")
|
||||||
# the default toolchain, or the requested toolchain Rust_TOOLCHAIN
|
|
||||||
if (Rust_RESOLVE_RUSTUP_TOOLCHAINS)
|
|
||||||
execute_process(
|
|
||||||
COMMAND
|
|
||||||
"${Rust_RUSTUP}" toolchain list --verbose
|
|
||||||
OUTPUT_VARIABLE _TOOLCHAINS_RAW
|
|
||||||
)
|
|
||||||
|
|
||||||
string(REPLACE "\n" ";" _TOOLCHAINS_RAW "${_TOOLCHAINS_RAW}")
|
|
||||||
set(_DISCOVERED_TOOLCHAINS "")
|
|
||||||
set(_DISCOVERED_TOOLCHAINS_RUSTC_PATH "")
|
|
||||||
set(_DISCOVERED_TOOLCHAINS_CARGO_PATH "")
|
|
||||||
set(_DISCOVERED_TOOLCHAINS_VERSION "")
|
|
||||||
|
|
||||||
foreach(_TOOLCHAIN_RAW ${_TOOLCHAINS_RAW})
|
|
||||||
if (_TOOLCHAIN_RAW MATCHES "([a-zA-Z0-9\\._\\-]+)[ \t\r\n]?(\\(default\\) \\(override\\)|\\(default\\)|\\(override\\))?[ \t\r\n]+(.+)")
|
|
||||||
set(_TOOLCHAIN "${CMAKE_MATCH_1}")
|
|
||||||
set(_TOOLCHAIN_TYPE "${CMAKE_MATCH_2}")
|
|
||||||
|
|
||||||
set(_TOOLCHAIN_PATH "${CMAKE_MATCH_3}")
|
|
||||||
set(_TOOLCHAIN_${_TOOLCHAIN}_PATH "${CMAKE_MATCH_3}")
|
|
||||||
|
|
||||||
if (_TOOLCHAIN_TYPE MATCHES ".*\\(default\\).*")
|
|
||||||
set(_TOOLCHAIN_DEFAULT "${_TOOLCHAIN}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (_TOOLCHAIN_TYPE MATCHES ".*\\(override\\).*")
|
|
||||||
set(_TOOLCHAIN_OVERRIDE "${_TOOLCHAIN}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND
|
|
||||||
"${_TOOLCHAIN_PATH}/bin/rustc" --version
|
|
||||||
OUTPUT_VARIABLE _TOOLCHAIN_RAW_VERSION
|
|
||||||
)
|
|
||||||
if (_TOOLCHAIN_RAW_VERSION MATCHES "rustc ([0-9]+)\\.([0-9]+)\\.([0-9]+)(-nightly)?")
|
|
||||||
list(APPEND _DISCOVERED_TOOLCHAINS "${_TOOLCHAIN}")
|
|
||||||
list(APPEND _DISCOVERED_TOOLCHAINS_RUSTC_PATH "${_TOOLCHAIN_PATH}/bin/rustc")
|
|
||||||
list(APPEND _DISCOVERED_TOOLCHAINS_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
|
|
||||||
|
|
||||||
# We need this variable to determine the default toolchain, since `foreach(... IN ZIP_LISTS ...)`
|
|
||||||
# requires CMake 3.17. As a workaround we define this variable to lookup the version when iterating
|
|
||||||
# through the `_DISCOVERED_TOOLCHAINS` lists.
|
|
||||||
set(_TOOLCHAIN_${_TOOLCHAIN}_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
|
|
||||||
if(CMAKE_MATCH_4)
|
|
||||||
set(_TOOLCHAIN_${_TOOLCHAIN}_IS_NIGHTLY "TRUE")
|
|
||||||
else()
|
|
||||||
set(_TOOLCHAIN_${_TOOLCHAIN}_IS_NIGHTLY "FALSE")
|
|
||||||
endif()
|
|
||||||
if(EXISTS "${_TOOLCHAIN_PATH}/bin/cargo")
|
|
||||||
list(APPEND _DISCOVERED_TOOLCHAINS_CARGO_PATH "${_TOOLCHAIN_PATH}/bin/cargo")
|
|
||||||
else()
|
|
||||||
list(APPEND _DISCOVERED_TOOLCHAINS_CARGO_PATH "NOTFOUND")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(AUTHOR_WARNING "Unexpected output from `rustc --version` for Toolchain `${_TOOLCHAIN}`: "
|
|
||||||
"`${_TOOLCHAIN_RAW_VERSION}`.\n"
|
|
||||||
"Ignoring this toolchain."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(AUTHOR_WARNING "Didn't recognize toolchain: ${_TOOLCHAIN_RAW}. Ignoring this toolchain.\n"
|
|
||||||
"Rustup toolchain list output( `${Rust_RUSTUP} toolchain list --verbose`):\n"
|
|
||||||
"${_TOOLCHAINS_RAW}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
# Expose a list of available rustup toolchains.
|
|
||||||
list(LENGTH _DISCOVERED_TOOLCHAINS _toolchain_len)
|
|
||||||
list(LENGTH _DISCOVERED_TOOLCHAINS_RUSTC_PATH _toolchain_rustc_len)
|
|
||||||
list(LENGTH _DISCOVERED_TOOLCHAINS_CARGO_PATH _toolchain_cargo_len)
|
|
||||||
list(LENGTH _DISCOVERED_TOOLCHAINS_VERSION _toolchain_version_len)
|
|
||||||
if(NOT
|
|
||||||
(_toolchain_len EQUAL _toolchain_rustc_len
|
|
||||||
AND _toolchain_cargo_len EQUAL _toolchain_version_len
|
|
||||||
AND _toolchain_len EQUAL _toolchain_cargo_len)
|
|
||||||
)
|
|
||||||
message(FATAL_ERROR "Internal error - list length mismatch."
|
|
||||||
"List lengths: ${_toolchain_len} toolchains, ${_toolchain_rustc_len} rustc, ${_toolchain_cargo_len} cargo,"
|
|
||||||
" ${_toolchain_version_len} version. The lengths should be the same."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(Rust_RUSTUP_TOOLCHAINS CACHE INTERNAL "List of available Rustup toolchains" "${_DISCOVERED_TOOLCHAINS}")
|
|
||||||
set(Rust_RUSTUP_TOOLCHAINS_RUSTC_PATH
|
|
||||||
CACHE INTERNAL
|
|
||||||
"List of the rustc paths corresponding to the toolchain at the same index in `Rust_RUSTUP_TOOLCHAINS`."
|
|
||||||
"${_DISCOVERED_TOOLCHAINS_RUSTC_PATH}"
|
|
||||||
)
|
|
||||||
set(Rust_RUSTUP_TOOLCHAINS_CARGO_PATH
|
|
||||||
CACHE INTERNAL
|
|
||||||
"List of the cargo paths corresponding to the toolchain at the same index in `Rust_RUSTUP_TOOLCHAINS`. \
|
|
||||||
May also be `NOTFOUND` if the toolchain does not have a cargo executable."
|
|
||||||
"${_DISCOVERED_TOOLCHAINS_CARGO_PATH}"
|
|
||||||
)
|
|
||||||
set(Rust_RUSTUP_TOOLCHAINS_VERSION
|
|
||||||
CACHE INTERNAL
|
|
||||||
"List of the rust toolchain version corresponding to the toolchain at the same index in \
|
|
||||||
`Rust_RUSTUP_TOOLCHAINS`."
|
|
||||||
"${_DISCOVERED_TOOLCHAINS_VERSION}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Rust_TOOLCHAIN is preferred over a requested version if it is set.
|
|
||||||
if (NOT DEFINED Rust_TOOLCHAIN)
|
|
||||||
if (NOT DEFINED _TOOLCHAIN_OVERRIDE)
|
|
||||||
set(_TOOLCHAIN_SELECTED "${_TOOLCHAIN_DEFAULT}")
|
|
||||||
else()
|
|
||||||
set(_TOOLCHAIN_SELECTED "${_TOOLCHAIN_OVERRIDE}")
|
|
||||||
endif()
|
|
||||||
# Check default toolchain first.
|
|
||||||
_findrust_version_ok("_TOOLCHAIN_${_TOOLCHAIN_SELECTED}_VERSION" _VERSION_OK)
|
|
||||||
if(NOT "${_VERSION_OK}")
|
|
||||||
foreach(_TOOLCHAIN "${_DISCOVERED_TOOLCHAINS}")
|
|
||||||
_findrust_version_ok("_TOOLCHAIN_${_TOOLCHAIN}_VERSION" _VERSION_OK)
|
|
||||||
if("${_VERSION_OK}")
|
|
||||||
set(_TOOLCHAIN_SELECTED "${_TOOLCHAIN}")
|
|
||||||
break()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
# Check if we found a suitable version in the for loop.
|
|
||||||
if(NOT "${_VERSION_OK}")
|
|
||||||
string(REPLACE ";" "\n" _DISCOVERED_TOOLCHAINS "${_DISCOVERED_TOOLCHAINS}")
|
|
||||||
_findrust_failed("Failed to find a Rust toolchain matching the version requirements of "
|
|
||||||
"${Rust_FIND_VERSION}. Available toolchains: ${_DISCOVERED_TOOLCHAINS}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(Rust_TOOLCHAIN "${_TOOLCHAIN_SELECTED}" CACHE STRING "The rustup toolchain to use")
|
|
||||||
set_property(CACHE Rust_TOOLCHAIN PROPERTY STRINGS "${_DISCOVERED_TOOLCHAINS}")
|
|
||||||
|
|
||||||
if(NOT Rust_FIND_QUIETLY)
|
|
||||||
message(STATUS "Rust Toolchain: ${Rust_TOOLCHAIN}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT Rust_TOOLCHAIN IN_LIST _DISCOVERED_TOOLCHAINS)
|
|
||||||
# If the precise toolchain wasn't found, try appending the default host
|
|
||||||
execute_process(
|
|
||||||
COMMAND
|
|
||||||
"${Rust_RUSTUP}" show
|
|
||||||
RESULT_VARIABLE _SHOW_RESULT
|
|
||||||
OUTPUT_VARIABLE _SHOW_RAW
|
|
||||||
)
|
|
||||||
if(NOT "${_SHOW_RESULT}" EQUAL "0")
|
|
||||||
_findrust_failed("Command `${Rust_RUSTUP} show` failed")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (_SHOW_RAW MATCHES "Default host: ([a-zA-Z0-9_\\-]*)\n")
|
|
||||||
set(_DEFAULT_HOST "${CMAKE_MATCH_1}")
|
|
||||||
else()
|
|
||||||
_findrust_failed("Failed to parse \"Default host\" from `${Rust_RUSTUP} show`. Got: ${_SHOW_RAW}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT "${Rust_TOOLCHAIN}-${_DEFAULT_HOST}" IN_LIST _DISCOVERED_TOOLCHAINS)
|
|
||||||
set(_NOT_FOUND_MESSAGE "Could not find toolchain '${Rust_TOOLCHAIN}'\n"
|
|
||||||
"Available toolchains:\n"
|
|
||||||
)
|
|
||||||
foreach(_TOOLCHAIN ${_DISCOVERED_TOOLCHAINS})
|
|
||||||
list(APPEND _NOT_FOUND_MESSAGE " `${_TOOLCHAIN}`\n")
|
|
||||||
endforeach()
|
|
||||||
_findrust_failed(${_NOT_FOUND_MESSAGE})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(_RUSTUP_TOOLCHAIN_FULL "${Rust_TOOLCHAIN}-${_DEFAULT_HOST}")
|
|
||||||
else()
|
|
||||||
set(_RUSTUP_TOOLCHAIN_FULL "${Rust_TOOLCHAIN}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(_RUST_TOOLCHAIN_PATH "${_TOOLCHAIN_${_RUSTUP_TOOLCHAIN_FULL}_PATH}")
|
|
||||||
if(NOT "${Rust_FIND_QUIETLY}")
|
|
||||||
message(VERBOSE "Rust toolchain ${_RUSTUP_TOOLCHAIN_FULL}")
|
|
||||||
message(VERBOSE "Rust toolchain path ${_RUST_TOOLCHAIN_PATH}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Is overridden if the user specifies `Rust_COMPILER` explicitly.
|
|
||||||
find_program(
|
|
||||||
Rust_COMPILER_CACHED
|
|
||||||
rustc
|
|
||||||
HINTS "${_RUST_TOOLCHAIN_PATH}/bin"
|
|
||||||
NO_DEFAULT_PATH)
|
|
||||||
elseif (Rust_RUSTUP)
|
|
||||||
get_filename_component(_RUST_TOOLCHAIN_PATH "${Rust_RUSTUP}" DIRECTORY)
|
|
||||||
get_filename_component(_RUST_TOOLCHAIN_PATH "${_RUST_TOOLCHAIN_PATH}" DIRECTORY)
|
|
||||||
find_program(
|
|
||||||
Rust_COMPILER_CACHED
|
|
||||||
rustc
|
|
||||||
HINTS "${_RUST_TOOLCHAIN_PATH}/bin"
|
|
||||||
NO_DEFAULT_PATH)
|
|
||||||
else()
|
|
||||||
find_program(Rust_COMPILER_CACHED rustc)
|
|
||||||
if (EXISTS "${Rust_COMPILER_CACHED}")
|
|
||||||
# rustc is expected to be at `<toolchain_path>/bin/rustc`.
|
|
||||||
get_filename_component(_RUST_TOOLCHAIN_PATH "${Rust_COMPILER_CACHED}" DIRECTORY)
|
|
||||||
get_filename_component(_RUST_TOOLCHAIN_PATH "${_RUST_TOOLCHAIN_PATH}" DIRECTORY)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT EXISTS "${Rust_CARGO_CACHED}")
|
||||||
|
message(FATAL_ERROR "The cargo executable ${Rust_CARGO_CACHED} was not found. "
|
||||||
|
"Consider setting `Rust_CARGO_CACHED` to the absolute path of `cargo`."
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED Rust_COMPILER_CACHED)
|
||||||
|
find_program(Rust_COMPILER_CACHED rustc PATHS "$ENV{HOME}/.cargo/bin")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (NOT EXISTS "${Rust_COMPILER_CACHED}")
|
if (NOT EXISTS "${Rust_COMPILER_CACHED}")
|
||||||
set(_NOT_FOUND_MESSAGE "The rustc executable was not found. "
|
message(FATAL_ERROR "The rustc executable ${Rust_COMPILER} was not found. "
|
||||||
"Rust not installed or ~/.cargo/bin not added to path?\n"
|
"Consider setting `Rust_COMPILER` to the absolute path of `rustc`."
|
||||||
"Hint: Consider setting `Rust_COMPILER` to the absolute path of `rustc`."
|
|
||||||
)
|
|
||||||
_findrust_failed(${_NOT_FOUND_MESSAGE})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (Rust_RESOLVE_RUSTUP_TOOLCHAINS)
|
|
||||||
set(_NOT_FOUND_MESSAGE "Rust was detected to be managed by rustup, but failed to find `cargo` "
|
|
||||||
"next to `rustc` in `${_RUST_TOOLCHAIN_PATH}/bin`. This can happen for custom toolchains, "
|
|
||||||
"if cargo was not built. "
|
|
||||||
"Please manually specify the path to a compatible `cargo` by setting `Rust_CARGO`."
|
|
||||||
)
|
|
||||||
find_program(
|
|
||||||
Rust_CARGO_CACHED
|
|
||||||
cargo
|
|
||||||
HINTS "${_RUST_TOOLCHAIN_PATH}/bin"
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
# note: maybe can use find_package_handle_standard_args here, if we remove the _CACHED postfix.
|
|
||||||
# not sure why that is here...
|
|
||||||
if(NOT EXISTS "${Rust_CARGO_CACHED}")
|
|
||||||
_findrust_failed(${_NOT_FOUND_MESSAGE})
|
|
||||||
endif()
|
|
||||||
set(Rust_TOOLCHAIN_IS_RUSTUP_MANAGED TRUE CACHE INTERNAL "" FORCE)
|
|
||||||
else()
|
|
||||||
set(_NOT_FOUND_MESSAGE "Failed to find `cargo` in PATH and `${_RUST_TOOLCHAIN_PATH}/bin`.\n"
|
|
||||||
"Please ensure cargo is in PATH or manually specify the path to a compatible `cargo` by "
|
|
||||||
"setting `Rust_CARGO`."
|
|
||||||
)
|
|
||||||
# On some systems (e.g. NixOS) cargo is not managed by rustup and also not next to rustc.
|
|
||||||
find_program(
|
|
||||||
Rust_CARGO_CACHED
|
|
||||||
cargo
|
|
||||||
HINTS "${_RUST_TOOLCHAIN_PATH}/bin"
|
|
||||||
)
|
|
||||||
# note: maybe can use find_package_handle_standard_args here, if we remove the _CACHED postfix.
|
|
||||||
# not sure why that is here...
|
|
||||||
if(NOT EXISTS "${Rust_CARGO_CACHED}")
|
|
||||||
_findrust_failed(${_NOT_FOUND_MESSAGE})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${Rust_CARGO_CACHED}" --version --verbose
|
|
||||||
OUTPUT_VARIABLE _CARGO_VERSION_RAW
|
|
||||||
RESULT_VARIABLE _CARGO_VERSION_RESULT
|
|
||||||
)
|
|
||||||
# todo: check if cargo is a required component!
|
|
||||||
if(NOT ( "${_CARGO_VERSION_RESULT}" EQUAL "0" ))
|
|
||||||
_findrust_failed("Failed to get cargo version.\n"
|
|
||||||
"`${Rust_CARGO_CACHED} --version` failed with error: `${_CARGO_VERSION_RESULT}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# todo: don't set cache variables here, but let find_package_handle_standard_args do the promotion
|
|
||||||
# later.
|
|
||||||
if (_CARGO_VERSION_RAW MATCHES "cargo ([0-9]+)\\.([0-9]+)\\.([0-9]+)")
|
|
||||||
set(Rust_CARGO_VERSION_MAJOR "${CMAKE_MATCH_1}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_CARGO_VERSION_MINOR "${CMAKE_MATCH_2}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_CARGO_VERSION_PATCH "${CMAKE_MATCH_3}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_CARGO_VERSION "${Rust_CARGO_VERSION_MAJOR}.${Rust_CARGO_VERSION_MINOR}.${Rust_CARGO_VERSION_PATCH}" CACHE INTERNAL "" FORCE)
|
|
||||||
# Workaround for the version strings where the `cargo ` prefix is missing.
|
|
||||||
elseif(_CARGO_VERSION_RAW MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
|
|
||||||
set(Rust_CARGO_VERSION_MAJOR "${CMAKE_MATCH_1}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_CARGO_VERSION_MINOR "${CMAKE_MATCH_2}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_CARGO_VERSION_PATCH "${CMAKE_MATCH_3}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_CARGO_VERSION "${Rust_CARGO_VERSION_MAJOR}.${Rust_CARGO_VERSION_MINOR}.${Rust_CARGO_VERSION_PATCH}" CACHE INTERNAL "" FORCE)
|
|
||||||
else()
|
|
||||||
_findrust_failed(
|
|
||||||
"Failed to parse cargo version. `cargo --version` evaluated to (${_CARGO_VERSION_RAW}). "
|
|
||||||
"Expected a <Major>.<Minor>.<Patch> version triple."
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
execute_process(
|
# Figure out the target by just using the host target.
|
||||||
|
# If you want to cross-compile, you'll have to set Rust_CARGO_TARGET
|
||||||
|
if(NOT Rust_CARGO_TARGET_CACHED)
|
||||||
|
execute_process(
|
||||||
COMMAND "${Rust_COMPILER_CACHED}" --version --verbose
|
COMMAND "${Rust_COMPILER_CACHED}" --version --verbose
|
||||||
OUTPUT_VARIABLE _RUSTC_VERSION_RAW
|
OUTPUT_VARIABLE _RUSTC_VERSION_RAW
|
||||||
RESULT_VARIABLE _RUSTC_VERSION_RESULT
|
RESULT_VARIABLE _RUSTC_VERSION_RESULT
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT ( "${_RUSTC_VERSION_RESULT}" EQUAL "0" ))
|
if(NOT ( "${_RUSTC_VERSION_RESULT}" EQUAL "0" ))
|
||||||
_findrust_failed("Failed to get rustc version.\n"
|
message(FATAL_ERROR "Failed to get rustc version.\n"
|
||||||
"${Rust_COMPILER_CACHED} --version failed with error: `${_RUSTC_VERSION_RESULT}`")
|
"${Rust_COMPILER} --version failed with error: `${_RUSTC_VERSION_RESULT}`")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (_RUSTC_VERSION_RAW MATCHES "rustc ([0-9]+)\\.([0-9]+)\\.([0-9]+)(-nightly)?")
|
if (_RUSTC_VERSION_RAW MATCHES "host: ([a-zA-Z0-9_\\-]*)\n")
|
||||||
set(Rust_VERSION_MAJOR "${CMAKE_MATCH_1}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_VERSION_MINOR "${CMAKE_MATCH_2}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_VERSION_PATCH "${CMAKE_MATCH_3}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_VERSION "${Rust_VERSION_MAJOR}.${Rust_VERSION_MINOR}.${Rust_VERSION_PATCH}" CACHE INTERNAL "" FORCE)
|
|
||||||
if(CMAKE_MATCH_4)
|
|
||||||
set(Rust_IS_NIGHTLY 1 CACHE INTERNAL "" FORCE)
|
|
||||||
else()
|
|
||||||
set(Rust_IS_NIGHTLY 0 CACHE INTERNAL "" FORCE)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
_findrust_failed("Failed to parse rustc version. `${Rust_COMPILER_CACHED} --version --verbose` "
|
|
||||||
"evaluated to:\n`${_RUSTC_VERSION_RAW}`"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (_RUSTC_VERSION_RAW MATCHES "host: ([a-zA-Z0-9_\\-]*)\n")
|
|
||||||
set(Rust_DEFAULT_HOST_TARGET "${CMAKE_MATCH_1}")
|
set(Rust_DEFAULT_HOST_TARGET "${CMAKE_MATCH_1}")
|
||||||
set(Rust_CARGO_HOST_TARGET_CACHED "${Rust_DEFAULT_HOST_TARGET}" CACHE STRING "Host triple")
|
else()
|
||||||
else()
|
message(FATAL_ERROR
|
||||||
_findrust_failed(
|
"Failed to parse rustc host target. `rustc --version --verbose` evaluated to:\n${_RUSTC_VERSION_RAW}"
|
||||||
"Failed to parse rustc host target. `rustc --version --verbose` evaluated to:\n${_RUSTC_VERSION_RAW}"
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (_RUSTC_VERSION_RAW MATCHES "LLVM version: ([0-9]+)\\.([0-9]+)(\\.([0-9]+))?")
|
if(CMAKE_CROSSCOMPILING)
|
||||||
set(Rust_LLVM_VERSION_MAJOR "${CMAKE_MATCH_1}" CACHE INTERNAL "" FORCE)
|
message(FATAL_ERROR "CMake is in cross-compiling mode."
|
||||||
set(Rust_LLVM_VERSION_MINOR "${CMAKE_MATCH_2}" CACHE INTERNAL "" FORCE)
|
"Manually set `Rust_CARGO_TARGET`."
|
||||||
# With the Rust toolchain 1.44.1 the reported LLVM version is 9.0, i.e. without a patch version.
|
|
||||||
# Since cmake regex does not support non-capturing groups, just ignore Match 3.
|
|
||||||
set(Rust_LLVM_VERSION_PATCH "${CMAKE_MATCH_4}" CACHE INTERNAL "" FORCE)
|
|
||||||
set(Rust_LLVM_VERSION "${Rust_LLVM_VERSION_MAJOR}.${Rust_LLVM_VERSION_MINOR}.${Rust_LLVM_VERSION_PATCH}" CACHE INTERNAL "" FORCE)
|
|
||||||
elseif(NOT Rust_FIND_QUIETLY)
|
|
||||||
message(
|
|
||||||
WARNING
|
|
||||||
"Failed to parse rustc LLVM version. `rustc --version --verbose` evaluated to:\n${_RUSTC_VERSION_RAW}"
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
set(Rust_CARGO_TARGET_CACHED "${Rust_DEFAULT_HOST_TARGET}" CACHE STRING "Target triple")
|
||||||
if (NOT Rust_CARGO_TARGET_CACHED)
|
|
||||||
unset(_CARGO_ARCH)
|
|
||||||
unset(_CARGO_ABI)
|
|
||||||
if (WIN32)
|
|
||||||
if (CMAKE_VS_PLATFORM_NAME)
|
|
||||||
string(TOLOWER "${CMAKE_VS_PLATFORM_NAME}" LOWER_VS_PLATFORM_NAME)
|
|
||||||
if ("${LOWER_VS_PLATFORM_NAME}" STREQUAL "win32")
|
|
||||||
set(_CARGO_ARCH i686)
|
|
||||||
elseif("${LOWER_VS_PLATFORM_NAME}" STREQUAL "x64")
|
|
||||||
set(_CARGO_ARCH x86_64)
|
|
||||||
elseif("${LOWER_VS_PLATFORM_NAME}" STREQUAL "arm64")
|
|
||||||
set(_CARGO_ARCH aarch64)
|
|
||||||
else()
|
|
||||||
message(WARNING "VS Platform '${CMAKE_VS_PLATFORM_NAME}' not recognized")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
# Fallback path
|
|
||||||
if(NOT DEFINED _CARGO_ARCH)
|
|
||||||
# Possible values for windows when not cross-compiling taken from here:
|
|
||||||
# https://learn.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details
|
|
||||||
# When cross-compiling the user is expected to supply the value, so we match more variants.
|
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(AMD64|amd64|x86_64)$")
|
|
||||||
set(_CARGO_ARCH x86_64)
|
|
||||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ARM64|arm64|aarch64)$")
|
|
||||||
set(_CARGO_ARCH aarch64)
|
|
||||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(X86|x86|i686)$")
|
|
||||||
set(_CARGO_ARCH i686)
|
|
||||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "i586")
|
|
||||||
set(_CARGO_ARCH i586)
|
|
||||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "IA64")
|
|
||||||
message(FATAL_ERROR "No rust target for Intel Itanium.")
|
|
||||||
elseif(NOT "${CMAKE_SYSTEM_PROCESSOR}")
|
|
||||||
message(WARNING "Failed to detect target architecture. Please set `CMAKE_SYSTEM_PROCESSOR`"
|
|
||||||
" to your target architecture or set `Rust_CARGO_TARGET` to your cargo target triple."
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
message(WARNING "Failed to detect target architecture. Please set "
|
|
||||||
"`Rust_CARGO_TARGET` to your cargo target triple."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(_CARGO_VENDOR "pc-windows")
|
|
||||||
|
|
||||||
# The MSVC Generators will always target the msvc ABI.
|
|
||||||
# For other generators we check the compiler ID and compiler target (if present)
|
|
||||||
# If no compiler is set and we are not cross-compiling then we just choose the
|
|
||||||
# default rust host target.
|
|
||||||
if(DEFINED MSVC
|
|
||||||
OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
|
|
||||||
OR "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC"
|
|
||||||
OR "${CMAKE_CXX_COMPILER_TARGET}" MATCHES "-msvc$"
|
|
||||||
OR "${CMAKE_C_COMPILER_TARGET}" MATCHES "-msvc$"
|
|
||||||
)
|
|
||||||
set(_CARGO_ABI msvc)
|
|
||||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"
|
|
||||||
OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU"
|
|
||||||
OR "${CMAKE_CXX_COMPILER_TARGET}" MATCHES "-gnu$"
|
|
||||||
OR "${CMAKE_C_COMPILER_TARGET}" MATCHES "-gnu$"
|
|
||||||
OR (NOT CMAKE_CROSSCOMPILING AND "${Rust_DEFAULT_HOST_TARGET}" MATCHES "-gnu$")
|
|
||||||
)
|
|
||||||
set(_CARGO_ABI gnu)
|
|
||||||
elseif(NOT "${CMAKE_CROSSCOMPILING}" AND "${Rust_DEFAULT_HOST_TARGET}" MATCHES "-msvc$")
|
|
||||||
# We first check if the gnu branch matches to ensure this fallback is only used
|
|
||||||
# if no compiler is enabled.
|
|
||||||
set(_CARGO_ABI msvc)
|
|
||||||
else()
|
|
||||||
message(WARNING "Could not determine the target ABI. Please specify `Rust_CARGO_TARGET` manually.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(DEFINED _CARGO_ARCH AND DEFINED _CARGO_VENDOR AND DEFINED _CARGO_ABI)
|
|
||||||
set(Rust_CARGO_TARGET_CACHED "${_CARGO_ARCH}-${_CARGO_VENDOR}-${_CARGO_ABI}"
|
|
||||||
CACHE STRING "Target triple")
|
|
||||||
endif()
|
|
||||||
elseif (ANDROID)
|
|
||||||
if (CMAKE_ANDROID_ARCH_ABI STREQUAL armeabi-v7a)
|
|
||||||
if (CMAKE_ANDROID_ARM_MODE)
|
|
||||||
set(_Rust_ANDROID_TARGET armv7-linux-androideabi)
|
|
||||||
else ()
|
|
||||||
set(_Rust_ANDROID_TARGET thumbv7neon-linux-androideabi)
|
|
||||||
endif()
|
|
||||||
elseif (CMAKE_ANDROID_ARCH_ABI STREQUAL arm64-v8a)
|
|
||||||
set(_Rust_ANDROID_TARGET aarch64-linux-android)
|
|
||||||
elseif (CMAKE_ANDROID_ARCH_ABI STREQUAL x86)
|
|
||||||
set(_Rust_ANDROID_TARGET i686-linux-android)
|
|
||||||
elseif (CMAKE_ANDROID_ARCH_ABI STREQUAL x86_64)
|
|
||||||
set(_Rust_ANDROID_TARGET x86_64-linux-android)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (_Rust_ANDROID_TARGET)
|
|
||||||
set(Rust_CARGO_TARGET_CACHED "${_Rust_ANDROID_TARGET}" CACHE STRING "Target triple")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
# Fallback to the default host target
|
|
||||||
if(NOT Rust_CARGO_TARGET_CACHED)
|
|
||||||
if(CMAKE_CROSSCOMPILING)
|
|
||||||
message(WARNING "CMake is in cross-compiling mode, but the cargo target-triple could not be inferred."
|
|
||||||
"Falling back to the default host target. Please consider manually setting `Rust_CARGO_TARGET`."
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
set(Rust_CARGO_TARGET_CACHED "${Rust_DEFAULT_HOST_TARGET}" CACHE STRING "Target triple")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Rust Target: ${Rust_CARGO_TARGET_CACHED}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(Rust_CARGO_TARGET_CACHED STREQUAL Rust_DEFAULT_HOST_TARGET)
|
|
||||||
set(Rust_CROSSCOMPILING FALSE CACHE INTERNAL "Rust is configured for cross-compiling")
|
|
||||||
else()
|
|
||||||
set(Rust_CROSSCOMPILING TRUE CACHE INTERNAL "Rust is configured for cross-compiling")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
_corrosion_parse_target_triple("${Rust_CARGO_TARGET_CACHED}" rust_arch rust_vendor rust_os rust_env)
|
|
||||||
_corrosion_parse_target_triple("${Rust_CARGO_HOST_TARGET_CACHED}" rust_host_arch rust_host_vendor rust_host_os rust_host_env)
|
|
||||||
|
|
||||||
set(Rust_CARGO_TARGET_ARCH "${rust_arch}" CACHE INTERNAL "Target architecture")
|
|
||||||
set(Rust_CARGO_TARGET_VENDOR "${rust_vendor}" CACHE INTERNAL "Target vendor")
|
|
||||||
set(Rust_CARGO_TARGET_OS "${rust_os}" CACHE INTERNAL "Target Operating System")
|
|
||||||
set(Rust_CARGO_TARGET_ENV "${rust_env}" CACHE INTERNAL "Target environment")
|
|
||||||
|
|
||||||
set(Rust_CARGO_HOST_ARCH "${rust_host_arch}" CACHE INTERNAL "Host architecture")
|
|
||||||
set(Rust_CARGO_HOST_VENDOR "${rust_host_vendor}" CACHE INTERNAL "Host vendor")
|
|
||||||
set(Rust_CARGO_HOST_OS "${rust_host_os}" CACHE INTERNAL "Host Operating System")
|
|
||||||
set(Rust_CARGO_HOST_ENV "${rust_host_env}" CACHE INTERNAL "Host environment")
|
|
||||||
|
|
||||||
if(NOT DEFINED CACHE{Rust_CARGO_TARGET_LINK_NATIVE_LIBS})
|
|
||||||
message(STATUS "Determining required link libraries for target ${Rust_CARGO_TARGET_CACHED}")
|
|
||||||
unset(required_native_libs)
|
|
||||||
_corrosion_determine_libs_new("${Rust_CARGO_TARGET_CACHED}" required_native_libs)
|
|
||||||
if(DEFINED required_native_libs)
|
|
||||||
message(STATUS "Required static libs for target ${Rust_CARGO_TARGET_CACHED}: ${required_native_libs}" )
|
|
||||||
endif()
|
|
||||||
# In very recent corrosion versions it is possible to override the rust compiler version
|
|
||||||
# per target, so to be totally correct we would need to determine the libraries for
|
|
||||||
# every installed Rust version, that the user could choose from.
|
|
||||||
# In practice there aren't likely going to be any major differences, so we just do it once
|
|
||||||
# for the target and once for the host target (if cross-compiling).
|
|
||||||
set(Rust_CARGO_TARGET_LINK_NATIVE_LIBS "${required_native_libs}" CACHE INTERNAL
|
|
||||||
"Required native libraries when linking Rust static libraries")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(Rust_CROSSCOMPILING AND NOT DEFINED CACHE{Rust_CARGO_HOST_TARGET_LINK_NATIVE_LIBS})
|
|
||||||
message(STATUS "Determining required link libraries for target ${Rust_CARGO_HOST_TARGET_CACHED}")
|
|
||||||
unset(host_libs)
|
|
||||||
_corrosion_determine_libs_new("${Rust_CARGO_HOST_TARGET_CACHED}" host_libs)
|
|
||||||
if(DEFINED host_libs)
|
|
||||||
message(STATUS "Required static libs for host target ${Rust_CARGO_HOST_TARGET_CACHED}: ${host_libs}" )
|
|
||||||
endif()
|
|
||||||
set(Rust_CARGO_HOST_TARGET_LINK_NATIVE_LIBS "${host_libs}" CACHE INTERNAL
|
|
||||||
"Required native libraries when linking Rust static libraries for the host target")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set the input variables as non-cache variables so that the variables are available after
|
# Set the input variables as non-cache variables so that the variables are available after
|
||||||
@@ -777,24 +82,6 @@ endforeach()
|
|||||||
|
|
||||||
find_package_handle_standard_args(
|
find_package_handle_standard_args(
|
||||||
Rust
|
Rust
|
||||||
REQUIRED_VARS Rust_COMPILER Rust_VERSION Rust_CARGO Rust_CARGO_VERSION Rust_CARGO_TARGET Rust_CARGO_HOST_TARGET
|
REQUIRED_VARS Rust_COMPILER Rust_CARGO Rust_CARGO_TARGET
|
||||||
VERSION_VAR Rust_VERSION
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if(NOT TARGET Rust::Rustc)
|
|
||||||
add_executable(Rust::Rustc IMPORTED GLOBAL)
|
|
||||||
set_property(
|
|
||||||
TARGET Rust::Rustc
|
|
||||||
PROPERTY IMPORTED_LOCATION "${Rust_COMPILER_CACHED}"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(Rust::Cargo IMPORTED GLOBAL)
|
|
||||||
set_property(
|
|
||||||
TARGET Rust::Cargo
|
|
||||||
PROPERTY IMPORTED_LOCATION "${Rust_CARGO_CACHED}"
|
|
||||||
)
|
|
||||||
set(Rust_FOUND true)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
list(POP_BACK CMAKE_MESSAGE_CONTEXT)
|
|
||||||
|
|||||||
@@ -164,14 +164,8 @@ if(GETTEXT_FOUND)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT APPLE)
|
|
||||||
install(FILES fish.desktop DESTINATION ${rel_datadir}/applications)
|
|
||||||
install(FILES ${SPHINX_SRC_DIR}/python_docs_theme/static/fish.png DESTINATION ${rel_datadir}/pixmaps)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Group install targets into a InstallTargets folder
|
# Group install targets into a InstallTargets folder
|
||||||
set_property(TARGET build_fish_pc CHECK-FISH-BUILD-VERSION-FILE
|
set_property(TARGET build_fish_pc CHECK-FISH-BUILD-VERSION-FILE
|
||||||
tests_buildroot_target
|
|
||||||
PROPERTY FOLDER cmake/InstallTargets)
|
PROPERTY FOLDER cmake/InstallTargets)
|
||||||
|
|
||||||
# Make a target build_root that installs into the buildroot directory, for testing.
|
# Make a target build_root that installs into the buildroot directory, for testing.
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
# Trying to build using the resolved toolchain causes all kinds of weird errors
|
|
||||||
# Just let rustup do its job
|
|
||||||
set(Rust_RESOLVE_RUSTUP_TOOLCHAINS Off)
|
|
||||||
|
|
||||||
include(FindRust)
|
include(FindRust)
|
||||||
find_package(Rust REQUIRED)
|
find_package(Rust REQUIRED)
|
||||||
|
|
||||||
@@ -26,7 +22,7 @@ set(rust_profile $<IF:$<CONFIG:Debug>,debug,$<IF:$<CONFIG:RelWithDebInfo>,releas
|
|||||||
set(rust_debugflags "$<$<CONFIG:Debug>:-g>$<$<CONFIG:RelWithDebInfo>:-g>")
|
set(rust_debugflags "$<$<CONFIG:Debug>:-g>$<$<CONFIG:RelWithDebInfo>:-g>")
|
||||||
|
|
||||||
|
|
||||||
# Temporary hack to propogate CMake flags/options to build.rs. We need to get CMake to evaluate the
|
# Temporary hack to propagate CMake flags/options to build.rs. We need to get CMake to evaluate the
|
||||||
# truthiness of the strings if they are set.
|
# truthiness of the strings if they are set.
|
||||||
set(CMAKE_WITH_GETTEXT "1")
|
set(CMAKE_WITH_GETTEXT "1")
|
||||||
if(DEFINED WITH_GETTEXT AND NOT "${WITH_GETTEXT}")
|
if(DEFINED WITH_GETTEXT AND NOT "${WITH_GETTEXT}")
|
||||||
@@ -38,16 +34,11 @@ if(FISH_CRATE_FEATURES)
|
|||||||
list(PREPEND FEATURES_ARG "--features")
|
list(PREPEND FEATURES_ARG "--features")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
get_property(
|
|
||||||
RUSTC_EXECUTABLE
|
|
||||||
TARGET Rust::Rustc PROPERTY IMPORTED_LOCATION
|
|
||||||
)
|
|
||||||
|
|
||||||
# Tell Cargo where our build directory is so it can find Cargo.toml.
|
# Tell Cargo where our build directory is so it can find Cargo.toml.
|
||||||
set(VARS_FOR_CARGO
|
set(VARS_FOR_CARGO
|
||||||
"FISH_BUILD_DIR=${CMAKE_BINARY_DIR}"
|
"FISH_BUILD_DIR=${CMAKE_BINARY_DIR}"
|
||||||
"PREFIX=${CMAKE_INSTALL_PREFIX}"
|
"PREFIX=${CMAKE_INSTALL_PREFIX}"
|
||||||
# Temporary hack to propogate CMake flags/options to build.rs.
|
# Temporary hack to propagate CMake flags/options to build.rs.
|
||||||
"CMAKE_WITH_GETTEXT=${CMAKE_WITH_GETTEXT}"
|
"CMAKE_WITH_GETTEXT=${CMAKE_WITH_GETTEXT}"
|
||||||
# Cheesy so we can tell cmake was used to build
|
# Cheesy so we can tell cmake was used to build
|
||||||
"CMAKE=1"
|
"CMAKE=1"
|
||||||
@@ -57,7 +48,7 @@ set(VARS_FOR_CARGO
|
|||||||
"BINDIR=${CMAKE_INSTALL_FULL_BINDIR}"
|
"BINDIR=${CMAKE_INSTALL_FULL_BINDIR}"
|
||||||
"LOCALEDIR=${CMAKE_INSTALL_FULL_LOCALEDIR}"
|
"LOCALEDIR=${CMAKE_INSTALL_FULL_LOCALEDIR}"
|
||||||
"CARGO_TARGET_DIR=${FISH_RUST_BUILD_DIR}"
|
"CARGO_TARGET_DIR=${FISH_RUST_BUILD_DIR}"
|
||||||
"CARGO_BUILD_RUSTC=${RUSTC_EXECUTABLE}"
|
"CARGO_BUILD_RUSTC=${Rust_COMPILER}"
|
||||||
"${FISH_PCRE2_BUILDFLAG}"
|
"${FISH_PCRE2_BUILDFLAG}"
|
||||||
"RUSTFLAGS=$ENV{RUSTFLAGS} ${rust_debugflags}"
|
"RUSTFLAGS=$ENV{RUSTFLAGS} ${rust_debugflags}"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,19 @@
|
|||||||
# This adds ctest support to the project
|
# This adds ctest support to the project
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
|
# By default, ctest runs tests serially
|
||||||
|
# Support CTEST_PARALLEL_LEVEL as an environment variable in addition to a CMake variable
|
||||||
|
if(NOT CTEST_PARALLEL_LEVEL)
|
||||||
|
set(CTEST_PARALLEL_LEVEL $ENV{CTEST_PARALLEL_LEVEL})
|
||||||
|
if(NOT CTEST_PARALLEL_LEVEL)
|
||||||
|
include(ProcessorCount)
|
||||||
|
ProcessorCount(CORES)
|
||||||
|
math(EXPR halfcores "${CORES} / 2")
|
||||||
|
set(CTEST_PARALLEL_LEVEL ${halfcores})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Put in a tests folder to reduce the top level targets in IDEs.
|
# Put in a tests folder to reduce the top level targets in IDEs.
|
||||||
set(CMAKE_FOLDER tests)
|
set(CMAKE_FOLDER tests)
|
||||||
|
|
||||||
@@ -8,13 +21,15 @@ set(CMAKE_FOLDER tests)
|
|||||||
# pass but it should not be considered a failed test run, either.
|
# pass but it should not be considered a failed test run, either.
|
||||||
set(SKIP_RETURN_CODE 125)
|
set(SKIP_RETURN_CODE 125)
|
||||||
|
|
||||||
# Even though we are using CMake's ctest for testing, we still define our own `make test` target
|
# Even though we are using CMake's ctest for testing, we still define our own `make fish_run_tests` target
|
||||||
# rather than use its default for many reasons:
|
# rather than use its default for many reasons:
|
||||||
# * CMake doesn't run tests in-proc or even add each tests as an individual node in the ninja
|
# * CMake doesn't run tests in-proc or even add each tests as an individual node in the ninja
|
||||||
# dependency tree, instead it just bundles all tests into a target called `test` that always just
|
# dependency tree, instead it just bundles all tests into a target called `test` that always just
|
||||||
# shells out to `ctest`, so there are no build-related benefits to not doing that ourselves.
|
# shells out to `ctest`, so there are no build-related benefits to not doing that ourselves.
|
||||||
# * CMake devs insist that it is appropriate for `make test` to never depend on `make all`, i.e.
|
# * CMake devs insist that it is appropriate for `make fish_run_tests` to never depend on `make all`, i.e.
|
||||||
# running `make test` does not require any of the binaries to be built before testing.
|
# running `make fish_run_tests` does not require any of the binaries to be built before testing.
|
||||||
|
# * It is not possible to set top-level CTest options/settings such as CTEST_PARALLEL_LEVEL from
|
||||||
|
# within the CMake configuration file.
|
||||||
# * The only way to have a test depend on a binary is to add a fake test with a name like
|
# * The only way to have a test depend on a binary is to add a fake test with a name like
|
||||||
# "build_fish" that executes CMake recursively to build the `fish` target.
|
# "build_fish" that executes CMake recursively to build the `fish` target.
|
||||||
# * Circling back to the point about individual tests not being actual Makefile targets, CMake does
|
# * Circling back to the point about individual tests not being actual Makefile targets, CMake does
|
||||||
@@ -24,85 +39,33 @@ set(SKIP_RETURN_CODE 125)
|
|||||||
|
|
||||||
# The top-level test target is "fish_run_tests".
|
# The top-level test target is "fish_run_tests".
|
||||||
add_custom_target(fish_run_tests
|
add_custom_target(fish_run_tests
|
||||||
COMMAND env FISH_FORCE_COLOR=1
|
COMMAND env CTEST_PARALLEL_LEVEL=${CTEST_PARALLEL_LEVEL} FISH_FORCE_COLOR=1
|
||||||
FISH_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
|
||||||
${CMAKE_CTEST_COMMAND} --force-new-ctest-process # --verbose
|
${CMAKE_CTEST_COMMAND} --force-new-ctest-process # --verbose
|
||||||
--output-on-failure --progress
|
--output-on-failure --progress
|
||||||
DEPENDS tests_dir funcs_dir tests_buildroot_target
|
DEPENDS fish fish_indent fish_key_reader fish_test_helper
|
||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
)
|
)
|
||||||
|
|
||||||
# If CMP0037 is available, also make an alias "test" target.
|
|
||||||
# Note that this policy may not be available, in which case definining such a target silently fails.
|
|
||||||
cmake_policy(PUSH)
|
|
||||||
if(POLICY CMP0037)
|
|
||||||
cmake_policy(SET CMP0037 OLD)
|
|
||||||
add_custom_target(test DEPENDS fish_run_tests)
|
|
||||||
endif()
|
|
||||||
cmake_policy(POP)
|
|
||||||
|
|
||||||
# The "test" directory.
|
|
||||||
set(TEST_DIR ${CMAKE_CURRENT_BINARY_DIR}/test)
|
|
||||||
|
|
||||||
# The directory into which fish is installed.
|
|
||||||
set(TEST_INSTALL_DIR ${TEST_DIR}/buildroot)
|
|
||||||
|
|
||||||
# The directory where the tests expect to find the fish root (./bin, etc)
|
|
||||||
set(TEST_ROOT_DIR ${TEST_DIR}/root)
|
|
||||||
|
|
||||||
# Copy needed directories for out-of-tree builds
|
|
||||||
if(NOT FISH_IN_TREE_BUILD)
|
|
||||||
add_custom_target(funcs_dir)
|
|
||||||
add_custom_command(TARGET funcs_dir
|
|
||||||
POST_BUILD
|
|
||||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/share
|
|
||||||
# Don't run ln twice or it will create a new link in the link.
|
|
||||||
COMMAND test -e ${CMAKE_BINARY_DIR}/share/functions || ln -sf
|
|
||||||
${CMAKE_SOURCE_DIR}/share/functions/ ${CMAKE_BINARY_DIR}/share/functions
|
|
||||||
COMMENT "Symlinking fish functions to binary dir"
|
|
||||||
VERBATIM)
|
|
||||||
|
|
||||||
add_custom_target(tests_dir DEPENDS tests)
|
|
||||||
add_custom_command(TARGET tests_dir
|
|
||||||
POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
||||||
${CMAKE_SOURCE_DIR}/tests/ ${CMAKE_BINARY_DIR}/tests/
|
|
||||||
COMMENT "Copying test files to binary dir"
|
|
||||||
VERBATIM)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Suppress generating Xcode schemes for all tests, there's too many.
|
|
||||||
set(CMAKE_XCODE_GENERATE_SCHEME 0)
|
|
||||||
|
|
||||||
# CMake being CMake, you can't just add a DEPENDS argument to add_test to make it depend on any of
|
# CMake being CMake, you can't just add a DEPENDS argument to add_test to make it depend on any of
|
||||||
# your binaries actually being built before `make test` is executed (requiring `make all` first),
|
# your binaries actually being built before `make fish_run_tests` is executed (requiring `make all` first),
|
||||||
# and the only dependency a test can have is on another test. So we make building fish
|
# and the only dependency a test can have is on another test. So we make building fish
|
||||||
# prerequisites to our entire top-level `test` target.
|
# prerequisites to our entire top-level `test` target.
|
||||||
function(add_test_target NAME)
|
function(add_test_target NAME)
|
||||||
string(REPLACE "/" "-" NAME ${NAME})
|
string(REPLACE "/" "-" NAME ${NAME})
|
||||||
add_custom_target("test_${NAME}" COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -R "^${NAME}$$"
|
add_custom_target("test_${NAME}" COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -R "^${NAME}$$"
|
||||||
DEPENDS tests_dir funcs_dir tests_buildroot_target USES_TERMINAL )
|
DEPENDS fish fish_indent fish_key_reader fish_test_helper USES_TERMINAL)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
add_custom_target(tests_buildroot_target
|
add_executable(fish_test_helper tests/fish_test_helper.c)
|
||||||
# Make the directory in which to run tests:
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_INSTALL_DIR}
|
|
||||||
COMMAND env DESTDIR=${TEST_INSTALL_DIR} ${CMAKE_COMMAND}
|
|
||||||
--build ${CMAKE_CURRENT_BINARY_DIR} --target install
|
|
||||||
# Also symlink fish to where the tests expect it to be:
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E create_symlink
|
|
||||||
${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}
|
|
||||||
${TEST_ROOT_DIR}
|
|
||||||
DEPENDS fish)
|
|
||||||
|
|
||||||
FILE(GLOB FISH_CHECKS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/tests/checks/*.fish)
|
FILE(GLOB FISH_CHECKS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/tests/checks/*.fish)
|
||||||
foreach(CHECK ${FISH_CHECKS})
|
foreach(CHECK ${FISH_CHECKS})
|
||||||
get_filename_component(CHECK_NAME ${CHECK} NAME)
|
get_filename_component(CHECK_NAME ${CHECK} NAME)
|
||||||
get_filename_component(CHECK ${CHECK} NAME_WE)
|
get_filename_component(CHECK ${CHECK} NAME_WE)
|
||||||
add_test(NAME ${CHECK_NAME}
|
add_test(NAME ${CHECK_NAME}
|
||||||
COMMAND env FISHDIR=${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/tests/test_driver.sh
|
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py --cachedir=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/tests/test.fish ${CHECK}
|
checks/${CHECK}.fish
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
|
||||||
)
|
)
|
||||||
set_tests_properties(${CHECK_NAME} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
set_tests_properties(${CHECK_NAME} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||||
set_tests_properties(${CHECK_NAME} PROPERTIES ENVIRONMENT FISH_FORCE_COLOR=1)
|
set_tests_properties(${CHECK_NAME} PROPERTIES ENVIRONMENT FISH_FORCE_COLOR=1)
|
||||||
@@ -113,9 +76,9 @@ FILE(GLOB PEXPECTS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/tests/pexpects/*.py)
|
|||||||
foreach(PEXPECT ${PEXPECTS})
|
foreach(PEXPECT ${PEXPECTS})
|
||||||
get_filename_component(PEXPECT ${PEXPECT} NAME)
|
get_filename_component(PEXPECT ${PEXPECT} NAME)
|
||||||
add_test(NAME ${PEXPECT}
|
add_test(NAME ${PEXPECT}
|
||||||
COMMAND env FISHDIR=${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/tests/test_driver.sh
|
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py --cachedir=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/tests/interactive.fish ${PEXPECT}
|
pexpects/${PEXPECT}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
|
||||||
)
|
)
|
||||||
set_tests_properties(${PEXPECT} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
set_tests_properties(${PEXPECT} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||||
set_tests_properties(${PEXPECT} PROPERTIES ENVIRONMENT FISH_FORCE_COLOR=1)
|
set_tests_properties(${PEXPECT} PROPERTIES ENVIRONMENT FISH_FORCE_COLOR=1)
|
||||||
|
|||||||
4
debian/control
vendored
4
debian/control
vendored
@@ -20,8 +20,8 @@ Vcs-Browser: https://github.com/fish-shell/fish-shell
|
|||||||
|
|
||||||
Package: fish
|
Package: fish
|
||||||
Architecture: any
|
Architecture: any
|
||||||
# for col and lock
|
# for col and lock - bsdmainutils is required in Ubuntu focal
|
||||||
Depends: bsdextrautils,
|
Depends: bsdextrautils | bsdmainutils,
|
||||||
file,
|
file,
|
||||||
# for the gettext command
|
# for the gettext command
|
||||||
gettext-base,
|
gettext-base,
|
||||||
|
|||||||
3
debian/rules
vendored
3
debian/rules
vendored
@@ -20,3 +20,6 @@ override_dh_clean:
|
|||||||
dh_clean
|
dh_clean
|
||||||
-unlink .cargo
|
-unlink .cargo
|
||||||
-unlink vendor
|
-unlink vendor
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
make fish_run_tests
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ allow = [
|
|||||||
"MPL-2.0",
|
"MPL-2.0",
|
||||||
"PSF-2.0",
|
"PSF-2.0",
|
||||||
"Unicode-DFS-2016",
|
"Unicode-DFS-2016",
|
||||||
|
"Unicode-3.0",
|
||||||
"WTFPL",
|
"WTFPL",
|
||||||
"Zlib",
|
"Zlib",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Description
|
|||||||
|
|
||||||
It is equivalent to ``gettext fish STRING``, meaning it can only be used to look up fish's own translations.
|
It is equivalent to ``gettext fish STRING``, meaning it can only be used to look up fish's own translations.
|
||||||
|
|
||||||
It requires fish to be built with gettext support. If that support is disabled, or there is no translation it will simply echo the argument back.
|
It requires fish to be built with gettext support. If that support is disabled, or there is no translation it will echo the argument back.
|
||||||
|
|
||||||
The language depends on the current locale, set with :envvar:`LANG` and :envvar:`LC_MESSAGES`.
|
The language depends on the current locale, set with :envvar:`LANG` and :envvar:`LC_MESSAGES`.
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ This first creates a function ``vim_edit`` which prepends ``vim`` before its arg
|
|||||||
This creates an abbreviation "4DIRS" which expands to a multi-line loop "template." The template enters each directory and then leaves it. The cursor is positioned ready to enter the command to run in each directory, at the location of the ``!``, which is itself erased.
|
This creates an abbreviation "4DIRS" which expands to a multi-line loop "template." The template enters each directory and then leaves it. The cursor is positioned ready to enter the command to run in each directory, at the location of the ``!``, which is itself erased.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
abbr --command git co checkout
|
abbr --command git co checkout
|
||||||
|
|
||||||
Turns "co" as an argument to "git" into "checkout". Multiple commands are possible, ``--command={git,hg}`` would expand "co" to "checkout" for both git and hg.
|
Turns "co" as an argument to "git" into "checkout". Multiple commands are possible, ``--command={git,hg}`` would expand "co" to "checkout" for both git and hg.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Each option specification (``OPTION_SPEC``) is written in the :ref:`domain speci
|
|||||||
|
|
||||||
Each option that is seen in the ARG list will result in variables named ``_flag_X``, where **X** is the short flag letter and the long flag name (if they are defined). For example a **--help** option could cause argparse to define one variable called ``_flag_h`` and another called ``_flag_help``.
|
Each option that is seen in the ARG list will result in variables named ``_flag_X``, where **X** is the short flag letter and the long flag name (if they are defined). For example a **--help** option could cause argparse to define one variable called ``_flag_h`` and another called ``_flag_help``.
|
||||||
|
|
||||||
The variables will be set with local scope (i.e., as if the script had done ``set -l _flag_X``). If the flag is a boolean (that is, it just is passed or not, it doesn't have a value) the values are the short and long flags seen. If the option is not a boolean the values will be zero or more values corresponding to the values collected when the ARG list is processed. If the flag was not seen the flag variable will not be set.
|
The variables will be set with local scope (i.e., as if the script had done ``set -l _flag_X``). If the flag is a boolean (that is, it is passed or not, it doesn't have a value) the values are the short and long flags seen. If the option is not a boolean the values will be zero or more values corresponding to the values collected when the ARG list is processed. If the flag was not seen the flag variable will not be set.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
-------
|
-------
|
||||||
@@ -165,7 +165,7 @@ This isn't specific to argparse but common to all things using ``getopt(3)`` (if
|
|||||||
Flag Value Validation
|
Flag Value Validation
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Sometimes you need to validate the option values. For example, that it is a valid integer within a specific range, or an ip address, or something entirely different. You can always do this after ``argparse`` returns but you can also request that ``argparse`` perform the validation by executing arbitrary fish script. To do so simply append an ``!`` (exclamation-mark) then the fish script to be run. When that code is executed three vars will be defined:
|
Sometimes you need to validate the option values. For example, that it is a valid integer within a specific range, or an ip address, or something entirely different. You can always do this after ``argparse`` returns but you can also request that ``argparse`` perform the validation by executing arbitrary fish script. To do so append an ``!`` (exclamation-mark) then the fish script to be run. When that code is executed three vars will be defined:
|
||||||
|
|
||||||
- ``_argparse_cmd`` will be set to the value of the value of the ``argparse --name`` value.
|
- ``_argparse_cmd`` will be set to the value of the value of the ``argparse --name`` value.
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ These variables are passed to the function as local exported variables.
|
|||||||
|
|
||||||
The script should write any error messages to stdout, not stderr. It should return a status of zero if the flag value is valid otherwise a non-zero status to indicate it is invalid.
|
The script should write any error messages to stdout, not stderr. It should return a status of zero if the flag value is valid otherwise a non-zero status to indicate it is invalid.
|
||||||
|
|
||||||
Fish ships with a ``_validate_int`` function that accepts a ``--min`` and ``--max`` flag. Let's say your command accepts a ``-m`` or ``--max`` flag and the minimum allowable value is zero and the maximum is 5. You would define the option like this: ``m/max=!_validate_int --min 0 --max 5``. The default if you just call ``_validate_int`` without those flags is to simply check that the value is a valid integer with no limits on the min or max value allowed.
|
Fish ships with a ``_validate_int`` function that accepts a ``--min`` and ``--max`` flag. Let's say your command accepts a ``-m`` or ``--max`` flag and the minimum allowable value is zero and the maximum is 5. You would define the option like this: ``m/max=!_validate_int --min 0 --max 5``. The default if you call ``_validate_int`` without those flags is to check that the value is a valid integer with no limits on the min or max value allowed.
|
||||||
|
|
||||||
Here are some examples of flag validations::
|
Here are some examples of flag validations::
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ A simple use::
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
This just wants one option - ``-h`` / ``--help``. Any other option is an error. If it is given it prints help and exits.
|
This supports one option - ``-h`` / ``--help``. Any other option is an error. If it is given it prints help and exits.
|
||||||
|
|
||||||
How :doc:`fish_add_path` parses its args::
|
How :doc:`fish_add_path` parses its args::
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Synopsis
|
|||||||
.. synopsis::
|
.. synopsis::
|
||||||
|
|
||||||
begin; [COMMANDS ...]; end
|
begin; [COMMANDS ...]; end
|
||||||
|
{ [COMMANDS ...] }
|
||||||
|
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
@@ -21,6 +22,8 @@ The block is unconditionally executed. ``begin; ...; end`` is equivalent to ``if
|
|||||||
|
|
||||||
``begin`` does not change the current exit status itself. After the block has completed, ``$status`` will be set to the status returned by the most recent command.
|
``begin`` does not change the current exit status itself. After the block has completed, ``$status`` will be set to the status returned by the most recent command.
|
||||||
|
|
||||||
|
Some other shells only support the ``{ [COMMANDS ...] ; }`` notation.
|
||||||
|
|
||||||
The **-h** or **--help** option displays help about using this command.
|
The **-h** or **--help** option displays help about using this command.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Synopsis
|
|||||||
bind [(-M | --mode) MODE] [--preset] [--user] [KEYS]
|
bind [(-M | --mode) MODE] [--preset] [--user] [KEYS]
|
||||||
bind [-a | --all] [--preset] [--user]
|
bind [-a | --all] [--preset] [--user]
|
||||||
bind (-f | --function-names)
|
bind (-f | --function-names)
|
||||||
|
bind (-K | --key-names)
|
||||||
bind (-L | --list-modes)
|
bind (-L | --list-modes)
|
||||||
bind (-e | --erase) [(-M | --mode) MODE] [--preset] [--user] [-a | --all] | KEYS ...
|
bind (-e | --erase) [(-M | --mode) MODE] [--preset] [--user] [-a | --all] | KEYS ...
|
||||||
|
|
||||||
@@ -20,10 +21,11 @@ Description
|
|||||||
``bind`` manages key bindings.
|
``bind`` manages key bindings.
|
||||||
|
|
||||||
If both ``KEYS`` and ``COMMAND`` are given, ``bind`` adds (or replaces) a binding in ``MODE``.
|
If both ``KEYS`` and ``COMMAND`` are given, ``bind`` adds (or replaces) a binding in ``MODE``.
|
||||||
If only ``KEYS`` is given, any existing binding in the given ``MODE`` will be printed.
|
If only ``KEYS`` is given, any existing binding for those keys in the given ``MODE`` will be printed.
|
||||||
|
If no ``KEYS`` argument is provided, all bindings (in the given ``MODE``) are printed.
|
||||||
|
|
||||||
``KEYS`` is a comma-separated list of key names.
|
``KEYS`` is a comma-separated list of key names.
|
||||||
Modifier keys can be specified by prefixing a key name with a combination of ``ctrl-``, ``alt-`` and ``shift-``.
|
Modifier keys can be specified by prefixing a key name with a combination of ``ctrl-``, ``alt-``, ``shift-`` and ``super-`` (i.e. the "windows" or "command" key).
|
||||||
For example, pressing :kbd:`w` while holding the Alt modifier is written as ``alt-w``.
|
For example, pressing :kbd:`w` while holding the Alt modifier is written as ``alt-w``.
|
||||||
Key names are case-sensitive; for example ``alt-W`` is the same as ``alt-shift-w``.
|
Key names are case-sensitive; for example ``alt-W`` is the same as ``alt-shift-w``.
|
||||||
``ctrl-x,ctrl-e`` would mean pressing :kbd:`ctrl-x` followed by :kbd:`ctrl-e`.
|
``ctrl-x,ctrl-e`` would mean pressing :kbd:`ctrl-x` followed by :kbd:`ctrl-e`.
|
||||||
@@ -41,9 +43,11 @@ They are:
|
|||||||
- ``f1`` through ``f12``.
|
- ``f1`` through ``f12``.
|
||||||
- ``home``,
|
- ``home``,
|
||||||
- ``insert``,
|
- ``insert``,
|
||||||
|
- ``menu``,
|
||||||
- ``minus`` (``-``),
|
- ``minus`` (``-``),
|
||||||
- ``pageup``,
|
- ``pageup``,
|
||||||
- ``pagedown``,
|
- ``pagedown``,
|
||||||
|
- ``printscreen``,
|
||||||
- ``space`` and
|
- ``space`` and
|
||||||
- ``tab``,
|
- ``tab``,
|
||||||
|
|
||||||
@@ -58,9 +62,7 @@ To find the name of a key combination you can use :doc:`fish_key_reader <fish_ke
|
|||||||
.. note::
|
.. note::
|
||||||
If a script changes the commandline, it should finish by calling the ``repaint`` special input function.
|
If a script changes the commandline, it should finish by calling the ``repaint`` special input function.
|
||||||
|
|
||||||
If no ``KEYS`` argument is provided, all bindings (in the given ``MODE``) are printed. If ``KEYS`` is provided but no ``COMMAND``, just the binding matching that sequence is printed.
|
Key bindings may use "modes", which mimics vi's modal input behavior. The default mode is "default" (in vi-mode, that's vi's "normal" mode). Every key binding applies to a single mode; you can specify which one with ``-M MODE``. If the key binding should change the mode, you can specify the new mode with ``-m NEW_MODE``. The mode can be viewed and changed via the ``$fish_bind_mode`` variable. If you want to change the mode from inside a fish function, use ``set fish_bind_mode MODE``.
|
||||||
|
|
||||||
Key bindings may use "modes", which mimics vi's modal input behavior. The default mode is "default". Every key binding applies to a single mode; you can specify which one with ``-M MODE``. If the key binding should change the mode, you can specify the new mode with ``-m NEW_MODE``. The mode can be viewed and changed via the ``$fish_bind_mode`` variable. If you want to change the mode from inside a fish function, use ``set fish_bind_mode MODE``.
|
|
||||||
|
|
||||||
To save custom key bindings, put the ``bind`` statements into :ref:`config.fish <configuration>`. Alternatively, fish also automatically executes a function called ``fish_user_key_bindings`` if it exists.
|
To save custom key bindings, put the ``bind`` statements into :ref:`config.fish <configuration>`. Alternatively, fish also automatically executes a function called ``fish_user_key_bindings`` if it exists.
|
||||||
|
|
||||||
@@ -71,11 +73,16 @@ The following options are available:
|
|||||||
**-f** or **--function-names**
|
**-f** or **--function-names**
|
||||||
Display a list of available input functions
|
Display a list of available input functions
|
||||||
|
|
||||||
|
**-K** or **--key-names**
|
||||||
|
Display a list of available named keys such as ``backspace``.
|
||||||
|
|
||||||
**-L** or **--list-modes**
|
**-L** or **--list-modes**
|
||||||
Display a list of defined bind modes
|
Display a list of defined bind modes
|
||||||
|
|
||||||
**-M MODE** or **--mode** *MODE*
|
**-M MODE** or **--mode** *MODE*
|
||||||
Specify a bind mode that the bind is used in. Defaults to "default"
|
Specify a bind mode that the bind is used in. Defaults to "default".
|
||||||
|
If you use :ref:`vi bindings <vi-mode>`, that's the *command* mode,
|
||||||
|
what vi calls "normal" mode.
|
||||||
|
|
||||||
**-m NEW_MODE** or **--sets-mode** *NEW_MODE*
|
**-m NEW_MODE** or **--sets-mode** *NEW_MODE*
|
||||||
Change the current mode to *NEW_MODE* after this binding is executed
|
Change the current mode to *NEW_MODE* after this binding is executed
|
||||||
@@ -162,7 +169,7 @@ The following special input functions are available:
|
|||||||
start selecting text
|
start selecting text
|
||||||
|
|
||||||
``cancel``
|
``cancel``
|
||||||
cancel the current commandline and replace it with a new empty one
|
close the pager if it is open, or undo the most recent completion if one was just inserted
|
||||||
|
|
||||||
``cancel-commandline``
|
``cancel-commandline``
|
||||||
cancel the current commandline and replace it with a new empty one, leaving the old one in place with a marker to show that it was cancelled
|
cancel the current commandline and replace it with a new empty one, leaving the old one in place with a marker to show that it was cancelled
|
||||||
@@ -170,6 +177,9 @@ The following special input functions are available:
|
|||||||
``capitalize-word``
|
``capitalize-word``
|
||||||
make the current word begin with a capital letter
|
make the current word begin with a capital letter
|
||||||
|
|
||||||
|
``clear-commandline``
|
||||||
|
empty the entire commandline
|
||||||
|
|
||||||
``clear-screen``
|
``clear-screen``
|
||||||
clears the screen and redraws the prompt.
|
clears the screen and redraws the prompt.
|
||||||
|
|
||||||
@@ -240,7 +250,7 @@ The following special input functions are available:
|
|||||||
``history-pager``
|
``history-pager``
|
||||||
invoke the searchable pager on history (incremental search); or if the history pager is already active, search further backwards in time.
|
invoke the searchable pager on history (incremental search); or if the history pager is already active, search further backwards in time.
|
||||||
|
|
||||||
``history-pager-delete``
|
``history-delete``
|
||||||
permanently delete the current history item, either from the history pager or from an active up-arrow history search
|
permanently delete the current history item, either from the history pager or from an active up-arrow history search
|
||||||
|
|
||||||
``history-search-backward``
|
``history-search-backward``
|
||||||
@@ -261,6 +271,12 @@ The following special input functions are available:
|
|||||||
``history-token-search-forward``
|
``history-token-search-forward``
|
||||||
search the history for the next matching argument
|
search the history for the next matching argument
|
||||||
|
|
||||||
|
``history-last-token-search-backward``
|
||||||
|
search the history for the previous matching last argument
|
||||||
|
|
||||||
|
``history-last-token-search-forward``
|
||||||
|
search the history for the next matching last argument
|
||||||
|
|
||||||
``forward-jump`` and ``backward-jump``
|
``forward-jump`` and ``backward-jump``
|
||||||
read another character and jump to its next occurrence after/before the cursor
|
read another character and jump to its next occurrence after/before the cursor
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,9 @@ The following options change the way ``commandline`` updates the command line bu
|
|||||||
**-a** or **--append**
|
**-a** or **--append**
|
||||||
Do not remove the current commandline, append the specified string at the end of it.
|
Do not remove the current commandline, append the specified string at the end of it.
|
||||||
|
|
||||||
**-i** or **--insert**
|
**-i**, **--insert** or **--insert-smart**
|
||||||
Do not remove the current commandline, insert the specified string at the current cursor position
|
Do not remove the current commandline, insert the specified string at the current cursor position.
|
||||||
|
The **--insert-smart** option turns on a Do-What-I-Mean (DWIM) mode: it strips any **$** prefix from the first command on each line.
|
||||||
|
|
||||||
**-r** or **--replace**
|
**-r** or **--replace**
|
||||||
Remove the current commandline and replace it with the specified string (default)
|
Remove the current commandline and replace it with the specified string (default)
|
||||||
@@ -71,7 +72,7 @@ The following options change what part of the commandline is printed or updated:
|
|||||||
Selects the current token
|
Selects the current token
|
||||||
|
|
||||||
**--search-field**
|
**--search-field**
|
||||||
Use the pager search field instead of the command line. Returns false is the search field is not shown.
|
Use the pager search field instead of the command line. Returns false if the search field is not shown.
|
||||||
|
|
||||||
The following options change the way ``commandline`` prints the current commandline buffer:
|
The following options change the way ``commandline`` prints the current commandline buffer:
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,9 @@ The following options are available:
|
|||||||
Add a description for this completion, to be shown in the completion pager.
|
Add a description for this completion, to be shown in the completion pager.
|
||||||
|
|
||||||
**-w** or **--wraps** *WRAPPED_COMMAND*
|
**-w** or **--wraps** *WRAPPED_COMMAND*
|
||||||
Causes the specified command to inherit completions from *WRAPPED_COMMAND* (see below for details).
|
Causes the specified command to inherit completions from *WRAPPED_COMMAND*.
|
||||||
|
This is used for "this command completes like that other command" kinds of relationships.
|
||||||
|
See below for details.
|
||||||
|
|
||||||
**-n** or **--condition** *CONDITION*
|
**-n** or **--condition** *CONDITION*
|
||||||
This completion should only be used if the *CONDITION* (a shell command) returns 0. This makes it possible to specify completions that should only be used in some cases. If multiple conditions are specified, fish will try them in the order they are specified until one fails or all succeeded.
|
This completion should only be used if the *CONDITION* (a shell command) returns 0. This makes it possible to specify completions that should only be used in some cases. If multiple conditions are specified, fish will try them in the order they are specified until one fails or all succeeded.
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ The :ref:`tutorial <tutorial>` is available as HTML via ``help tutorial`` or in
|
|||||||
The following options are available:
|
The following options are available:
|
||||||
|
|
||||||
**-c** or **--command=COMMAND**
|
**-c** or **--command=COMMAND**
|
||||||
Evaluate the specified commands instead of reading from the commandline, passing additional positional arguments through ``$argv``.
|
Evaluate the specified commands instead of reading from the commandline.
|
||||||
|
Any additional positional arguments are used as ``$argv``.
|
||||||
|
|
||||||
**-C** or **--init-command=COMMANDS**
|
**-C** or **--init-command=COMMANDS**
|
||||||
Evaluate specified commands after reading the configuration but before executing command specified by **-c** or reading interactive input.
|
Evaluate specified commands after reading the configuration but before executing command specified by **-c** or reading interactive input.
|
||||||
@@ -34,18 +35,12 @@ The following options are available:
|
|||||||
See :ref:`Debugging <debugging-fish>` below for details.
|
See :ref:`Debugging <debugging-fish>` below for details.
|
||||||
|
|
||||||
**-o** or **--debug-output=DEBUG_FILE**
|
**-o** or **--debug-output=DEBUG_FILE**
|
||||||
Specifies a file path to receive the debug output, including categories and :envvar:`fish_trace`.
|
Specifies a file path to receive the debug output, including categories and :envvar:`fish_trace`.
|
||||||
The default is stderr.
|
The default is standard error.
|
||||||
|
|
||||||
**-i** or **--interactive**
|
**-i** or **--interactive**
|
||||||
The shell is interactive.
|
The shell is interactive.
|
||||||
|
|
||||||
**--install[=PATH]**
|
|
||||||
When built as self-installable (via cargo), this will unpack fish's datafiles and place them in ~/.local/share/fish/install/.
|
|
||||||
Fish will also ask to do this automatically when run interactively.
|
|
||||||
If PATH is given, fish will install itself into a relocatable directory tree rooted at that path.
|
|
||||||
That means it will install the datafiles to PATH/share/fish and copy itself to PATH/bin/fish.
|
|
||||||
|
|
||||||
**-l** or **--login**
|
**-l** or **--login**
|
||||||
Act as if invoked as a login shell.
|
Act as if invoked as a login shell.
|
||||||
|
|
||||||
@@ -106,3 +101,33 @@ These options can also be changed via the :envvar:`FISH_DEBUG` and :envvar:`FISH
|
|||||||
The categories enabled via **--debug** are *added* to the ones enabled by $FISH_DEBUG, so they can be disabled by prefixing them with **-** (**reader-*,-ast*** enables reader debugging and disables ast debugging).
|
The categories enabled via **--debug** are *added* to the ones enabled by $FISH_DEBUG, so they can be disabled by prefixing them with **-** (**reader-*,-ast*** enables reader debugging and disables ast debugging).
|
||||||
|
|
||||||
The file given in **--debug-output** takes precedence over the file in :envvar:`FISH_DEBUG_OUTPUT`.
|
The file given in **--debug-output** takes precedence over the file in :envvar:`FISH_DEBUG_OUTPUT`.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
--------
|
||||||
|
|
||||||
|
To just start fish::
|
||||||
|
|
||||||
|
fish
|
||||||
|
|
||||||
|
To run a file with fish::
|
||||||
|
|
||||||
|
fish /path/to/script.fish
|
||||||
|
|
||||||
|
To run some commands with fish::
|
||||||
|
|
||||||
|
fish -c 'echo Hi there!'
|
||||||
|
|
||||||
|
You can also pass arguments to those commands::
|
||||||
|
|
||||||
|
> fish -c 'printf %s\n $argv' "first line" "second line"
|
||||||
|
first line
|
||||||
|
second line
|
||||||
|
|
||||||
|
To run a script, except read this other file first::
|
||||||
|
|
||||||
|
fish --init-cmd "source otherfile" script.fish
|
||||||
|
|
||||||
|
To :ref:`profile <profiling>` fish's startup and find what takes the most time in your configuration::
|
||||||
|
|
||||||
|
fish --profile-startup /tmp/start.prof -ic exit
|
||||||
|
sort -nk2 /tmp/start.prof
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ Currently supported are:
|
|||||||
- ``wl-copy`` using wayland
|
- ``wl-copy`` using wayland
|
||||||
- ``xsel`` and ``xclip`` for X11
|
- ``xsel`` and ``xclip`` for X11
|
||||||
- ``clip.exe`` on Windows.
|
- ``clip.exe`` on Windows.
|
||||||
|
- The OSC 52 clipboard sequence, which your terminal might support
|
||||||
|
|
||||||
See also
|
See also
|
||||||
--------
|
--------
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Synopsis
|
|||||||
|
|
||||||
fish_config [browse]
|
fish_config [browse]
|
||||||
fish_config prompt (choose | list | save | show)
|
fish_config prompt (choose | list | save | show)
|
||||||
fish_config theme (choose | demo | dump | list | save | show)
|
fish_config theme (choose | demo | dump | list | save | show | update)
|
||||||
|
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
@@ -40,6 +40,9 @@ Available subcommands for the ``theme`` command:
|
|||||||
- ``list`` lists the names of the available sample themes.
|
- ``list`` lists the names of the available sample themes.
|
||||||
- ``save`` saves the given theme to :ref:`universal variables <variables-universal>`.
|
- ``save`` saves the given theme to :ref:`universal variables <variables-universal>`.
|
||||||
- ``show`` shows what the given sample theme (or all) would look like.
|
- ``show`` shows what the given sample theme (or all) would look like.
|
||||||
|
- ``update`` updates any ``fish_color_*`` and ``fish_pager_color_*`` variables whose value contains
|
||||||
|
"--track=THEME". They are set to the latest version of that theme, and the tracking
|
||||||
|
option is preserved. Note that ``fish_config theme update`` is run at fish startup.
|
||||||
|
|
||||||
The **-h** or **--help** option displays help about using this command.
|
The **-h** or **--help** option displays help about using this command.
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ The following options are available:
|
|||||||
Displays the current :program:`fish` version and then exits.
|
Displays the current :program:`fish` version and then exits.
|
||||||
|
|
||||||
**--ansi**
|
**--ansi**
|
||||||
Colorizes the output using ANSI escape sequences, appropriate for the current :envvar:`TERM`, using the colors defined in the environment (such as :envvar:`fish_color_command`).
|
Colorizes the output using ANSI escape sequences using the colors defined in the environment (such as :envvar:`fish_color_command`).
|
||||||
|
|
||||||
**--html**
|
**--html**
|
||||||
Outputs HTML, which supports syntax highlighting if the appropriate CSS is defined. The CSS class names are the same as the variable names, such as ``fish_color_command``.
|
Outputs HTML, which supports syntax highlighting if the appropriate CSS is defined. The CSS class names are the same as the variable names, such as ``fish_color_command``.
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ You can also define an empty ``fish_mode_prompt`` function to remove the vi mode
|
|||||||
|
|
||||||
``fish_mode_prompt`` will be executed when the vi mode changes. If it produces any output, it is displayed and used. If it does not, the other prompt functions (:doc:`fish_prompt <fish_prompt>` and :doc:`fish_right_prompt <fish_right_prompt>`) will be executed as well in case they contain a mode display.
|
``fish_mode_prompt`` will be executed when the vi mode changes. If it produces any output, it is displayed and used. If it does not, the other prompt functions (:doc:`fish_prompt <fish_prompt>` and :doc:`fish_right_prompt <fish_right_prompt>`) will be executed as well in case they contain a mode display.
|
||||||
|
|
||||||
|
If :envvar:`fish_transient_prompt` is set to 1, ``fish_mode_prompt --final-rendering`` is run before executing the commandline.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ The ``fish_prompt`` function is executed when the prompt is to be shown, and the
|
|||||||
|
|
||||||
The exit status of commands within ``fish_prompt`` will not modify the value of :ref:`$status <variables-status>` outside of the ``fish_prompt`` function.
|
The exit status of commands within ``fish_prompt`` will not modify the value of :ref:`$status <variables-status>` outside of the ``fish_prompt`` function.
|
||||||
|
|
||||||
|
If :envvar:`fish_transient_prompt` is set to 1, ``fish_prompt --final-rendering`` is run before executing the commandline.
|
||||||
|
|
||||||
``fish`` ships with a number of example prompts that can be chosen with the ``fish_config`` command.
|
``fish`` ships with a number of example prompts that can be chosen with the ``fish_config`` command.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ Description
|
|||||||
|
|
||||||
Multiple lines are not supported in ``fish_right_prompt``.
|
Multiple lines are not supported in ``fish_right_prompt``.
|
||||||
|
|
||||||
|
If :envvar:`fish_transient_prompt` is set to 1, ``fish_right_prompt --final-rendering`` is run before executing the commandline.
|
||||||
|
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
|||||||
@@ -26,15 +26,12 @@ The first argument to fish_title contains the most recently executed foreground
|
|||||||
|
|
||||||
This requires that your terminal supports programmable titles and the feature is turned on.
|
This requires that your terminal supports programmable titles and the feature is turned on.
|
||||||
|
|
||||||
|
To disable setting the title, use an empty function (see below).
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
|
||||||
A simple title:
|
A simple title::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
function fish_title
|
function fish_title
|
||||||
set -q argv[1]; or set argv fish
|
set -q argv[1]; or set argv fish
|
||||||
@@ -43,3 +40,7 @@ A simple title:
|
|||||||
echo (fish_prompt_pwd_dir_length=1 prompt_pwd): $argv;
|
echo (fish_prompt_pwd_dir_length=1 prompt_pwd): $argv;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Do not change the title::
|
||||||
|
|
||||||
|
function fish_title
|
||||||
|
end
|
||||||
|
|||||||
@@ -27,7 +27,11 @@ The following options are available:
|
|||||||
A description of what the function does, suitable as a completion description.
|
A description of what the function does, suitable as a completion description.
|
||||||
|
|
||||||
**-w** *WRAPPED_COMMAND* or **--wraps** *WRAPPED_COMMAND*
|
**-w** *WRAPPED_COMMAND* or **--wraps** *WRAPPED_COMMAND*
|
||||||
Inherit completions from the given *WRAPPED_COMMAND*. See the documentation for :doc:`complete <complete>` for more information.
|
Inherit completions from the given *WRAPPED_COMMAND*.
|
||||||
|
This is used to say that this function completes like that command,
|
||||||
|
for example if you're creating an alias.
|
||||||
|
See the documentation for :doc:`complete <complete>` for more information.
|
||||||
|
If the wrapped command is the same as the function name, this will be ignored.
|
||||||
|
|
||||||
**-e** *EVENT_NAME* or **--on-event** *EVENT_NAME*
|
**-e** *EVENT_NAME* or **--on-event** *EVENT_NAME*
|
||||||
Run this function when the specified named event is emitted. Fish internally generates named events, for example, when showing the prompt. Custom events can be emitted using the :doc:`emit <emit>` command.
|
Run this function when the specified named event is emitted. Fish internally generates named events, for example, when showing the prompt. Custom events can be emitted using the :doc:`emit <emit>` command.
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ Description
|
|||||||
The following operations (sub-commands) are available:
|
The following operations (sub-commands) are available:
|
||||||
|
|
||||||
**search**
|
**search**
|
||||||
Returns history items matching the search string. If no search string is provided it returns all history items. This is the default operation if no other operation is specified. You only have to explicitly say ``history search`` if you wish to search for one of the subcommands. The ``--contains`` search option will be used if you don't specify a different search option. Entries are ordered newest to oldest unless you use the ``--reverse`` flag. If stdout is attached to a tty the output will be piped through your pager by the history function. The history builtin simply writes the results to stdout.
|
Returns history items matching the search string. If no search string is provided it returns all history items. This is the default operation if no other operation is specified. You only have to explicitly say ``history search`` if you wish to search for one of the subcommands. The ``--contains`` search option will be used if you don't specify a different search option. Entries are ordered newest to oldest unless you use the ``--reverse`` flag. If stdout is attached to a tty the output will be piped through your pager by the history function. The history builtin writes the results to stdout.
|
||||||
|
|
||||||
**delete**
|
**delete**
|
||||||
Deletes history items. The ``--contains`` search option will be used if you don't specify a different search option. If you don't specify ``--exact`` a prompt will be displayed before any items are deleted asking you which entries are to be deleted. You can enter the word "all" to delete all matching entries. You can enter a single ID (the number in square brackets) to delete just that single entry. You can enter more than one ID, or an ID range separated by a space to delete multiple entries. Just press [enter] to not delete anything. Note that the interactive delete behavior is a feature of the history function. The history builtin only supports ``--exact --case-sensitive`` deletion.
|
Deletes history items. The ``--contains`` search option will be used if you don't specify a different search option. If you don't specify ``--exact`` a prompt will be displayed before any items are deleted asking you which entries are to be deleted. You can enter the word "all" to delete all matching entries. You can enter a single ID (the number in square brackets) to delete just that single entry. You can enter more than one ID, or an ID range separated by a space to delete multiple entries. Press [enter] to not delete anything. Note that the interactive delete behavior is a feature of the history function. The history builtin only supports ``--exact --case-sensitive`` deletion.
|
||||||
|
|
||||||
**merge**
|
**merge**
|
||||||
Immediately incorporates history changes from other sessions. Ordinarily ``fish`` ignores history changes from sessions started after the current one. This command applies those changes immediately.
|
Immediately incorporates history changes from other sessions. Ordinarily ``fish`` ignores history changes from sessions started after the current one. This command applies those changes immediately.
|
||||||
@@ -52,7 +52,7 @@ The following options are available:
|
|||||||
These flags can appear before or immediately after one of the sub-commands listed above.
|
These flags can appear before or immediately after one of the sub-commands listed above.
|
||||||
|
|
||||||
**-C** or **--case-sensitive**
|
**-C** or **--case-sensitive**
|
||||||
Does a case-sensitive search. The default is case-insensitive. Note that prior to fish 2.4.0 the default was case-sensitive.
|
Does a case-sensitive search. The default is case-insensitive.
|
||||||
|
|
||||||
**-c** or **--contains**
|
**-c** or **--contains**
|
||||||
Searches items in the history that contain the specified text string. This is the default for the **--search** flag. This is not currently supported by the **delete** subcommand.
|
Searches items in the history that contain the specified text string. This is the default for the **--search** flag. This is not currently supported by the **delete** subcommand.
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ Examples
|
|||||||
path change-extension [-z | --null-in] [-Z | --null-out] \
|
path change-extension [-z | --null-in] [-Z | --null-out] \
|
||||||
[-q | --quiet] EXTENSION [PATH ...]
|
[-q | --quiet] EXTENSION [PATH ...]
|
||||||
|
|
||||||
``path change-extension`` returns the given paths, with their extension changed to the given new extension. The extension is the part after (and including) the last ".", unless that "." followed a "/" or the basename is "." or "..", in which case there is no previous extension and the new one is simply added.
|
``path change-extension`` returns the given paths, with their extension changed to the given new extension. The extension is the part after (and including) the last ".", unless that "." followed a "/" or the basename is "." or "..", in which case there is no previous extension and the new one is added.
|
||||||
|
|
||||||
If the extension is empty, any previous extension is stripped, along with the ".". This is, of course, the inverse of ``path extension``.
|
If the extension is empty, any previous extension is stripped, along with the ".". This is, of course, the inverse of ``path extension``.
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ If no option to determine how to split like ``--delimiter``, ``--line`` or ``--t
|
|||||||
|
|
||||||
With the ``--line`` option, ``read`` reads a line of input from standard input into each provided variable, stopping when each variable has been filled. The line is not tokenized.
|
With the ``--line`` option, ``read`` reads a line of input from standard input into each provided variable, stopping when each variable has been filled. The line is not tokenized.
|
||||||
|
|
||||||
If no variable names are provided, ``read`` enters a special case that simply provides redirection from standard input to standard output, useful for command substitution. For instance, the fish shell command below can be used to read a password from the console instead of hardcoding it in the command itself, which prevents it from showing up in fish's history::
|
If no variable names are provided, ``read`` enters a special case that provides redirection from standard input to standard output, useful for command substitution. For instance, the fish shell command below can be used to read a password from the console instead of hardcoding it in the command itself, which prevents it from showing up in fish's history::
|
||||||
|
|
||||||
mysql -uuser -p(read)
|
mysql -uuser -p(read)
|
||||||
|
|
||||||
|
|||||||
@@ -22,15 +22,25 @@ Valid colors include:
|
|||||||
|
|
||||||
The *br*- (as in 'bright') forms are full-brightness variants of the 8 standard-brightness colors on many terminals. **brblack** has higher brightness than **black** - towards gray.
|
The *br*- (as in 'bright') forms are full-brightness variants of the 8 standard-brightness colors on many terminals. **brblack** has higher brightness than **black** - towards gray.
|
||||||
|
|
||||||
An RGB value with three or six hex digits, such as A0FF33 or f2f can be used. Fish will choose the closest supported color. A three digit value is equivalent to specifying each digit twice; e.g., ``set_color 2BC`` is the same as ``set_color 22BBCC``. Hexadecimal RGB values can be in lower or uppercase. Depending on the capabilities of your terminal (and the level of support ``set_color`` has for it) the actual color may be approximated by a nearby matching reserved color name or ``set_color`` may not have an effect on color.
|
An RGB value with three or six hex digits, such as A0FF33 or f2f can be used.
|
||||||
|
A three digit value is equivalent to specifying each digit twice; e.g., ``set_color 2BC`` is the same as ``set_color 22BBCC``.
|
||||||
|
Hexadecimal RGB values can be in lower or uppercase.
|
||||||
|
|
||||||
A second color may be given as a desired fallback color. e.g. ``set_color 124212 brblue`` will instruct set_color to use *brblue* if a terminal is not capable of the exact shade of grey desired. This is very useful when an 8 or 16 color terminal might otherwise not use a color.
|
If :envvar:`fish_term24bit` is set to 0, fish will translate RGB values to the nearest color on the 256-color palette.
|
||||||
|
If :envvar:`fish_term256` is also set to 0, fish will translate them to the 16-color palette instead.
|
||||||
|
Fish launched as ``fish -d term_support`` will include diagnostic messages that indicate the color support mode in use.
|
||||||
|
|
||||||
|
If multiple colors are specified, fish prefers the first RGB one.
|
||||||
|
However if :envvar:`fish_term256` is set to 0, fish prefers the first named color specified.
|
||||||
|
|
||||||
The following options are available:
|
The following options are available:
|
||||||
|
|
||||||
**-b** or **--background** *COLOR*
|
**-b** or **--background** *COLOR*
|
||||||
Sets the background color.
|
Sets the background color.
|
||||||
|
|
||||||
|
**--underline-color** *COLOR*
|
||||||
|
Set the underline color.
|
||||||
|
|
||||||
**-c** or **--print-colors**
|
**-c** or **--print-colors**
|
||||||
Prints the given colors or a colored list of the 16 named colors.
|
Prints the given colors or a colored list of the 16 named colors.
|
||||||
|
|
||||||
@@ -46,18 +56,22 @@ The following options are available:
|
|||||||
**-r** or **--reverse**
|
**-r** or **--reverse**
|
||||||
Sets reverse mode.
|
Sets reverse mode.
|
||||||
|
|
||||||
**-u** or **--underline**
|
**-u** or **--underline**, or **-uSTYLE** or **--underline=STYLE**
|
||||||
Sets underlined mode.
|
Set the underline mode; supported styles are **single** (default) and **curly**.
|
||||||
|
|
||||||
|
**--track=THEME**
|
||||||
|
Ignored. Included by default in universally-scoped color variables to tell fish to update
|
||||||
|
them as the associated theme changes.
|
||||||
|
This flag can be set for all variables when loading a theme with the `--track`` option, that is
|
||||||
|
:doc:`fish_config theme save THEME --track <fish_config>`.
|
||||||
|
|
||||||
**-h** or **--help**
|
**-h** or **--help**
|
||||||
Displays help about using this command.
|
Displays help about using this command.
|
||||||
|
|
||||||
Using the **normal** keyword will reset foreground, background, and all formatting back to default.
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
1. Using the **normal** keyword will reset both background and foreground colors to whatever is the default for the terminal.
|
1. Using **set_color normal** will reset all colors and modes to the terminal's default.
|
||||||
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. Look for a config option.
|
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. Look for a config option.
|
||||||
3. Some terminals use the ``--bold`` escape sequence to switch to a brighter color set rather than increasing the weight of text.
|
3. Some terminals use the ``--bold`` escape sequence to switch to a brighter color set rather than increasing the weight of text.
|
||||||
4. ``set_color`` works by printing sequences of characters to standard output. If used in command substitution or a pipe, these characters will also be captured. This may or may not be desirable. Checking the exit status of ``isatty stdout`` before using ``set_color`` can be useful to decide not to colorize output in a script.
|
4. ``set_color`` works by printing sequences of characters to standard output. If used in command substitution or a pipe, these characters will also be captured. This may or may not be desirable. Checking the exit status of ``isatty stdout`` before using ``set_color`` can be useful to decide not to colorize output in a script.
|
||||||
@@ -72,24 +86,3 @@ Examples
|
|||||||
set_color blue; echo "Violets are blue"
|
set_color blue; echo "Violets are blue"
|
||||||
set_color 62A; echo "Eggplants are dark purple"
|
set_color 62A; echo "Eggplants are dark purple"
|
||||||
set_color normal; echo "Normal is nice" # Resets the background too
|
set_color normal; echo "Normal is nice" # Resets the background too
|
||||||
|
|
||||||
|
|
||||||
Terminal Capability Detection
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
Fish uses some heuristics to determine what colors a terminal supports to avoid sending sequences that it won't understand.
|
|
||||||
|
|
||||||
In particular it will:
|
|
||||||
|
|
||||||
- Enable 256 colors if :envvar:`TERM` contains "xterm", except for known exceptions (like MacOS 10.6 Terminal.app)
|
|
||||||
- Enable 24-bit ("true-color") even if the $TERM entry only reports 256 colors. This includes modern xterm, VTE-based terminals like Gnome Terminal, Konsole and iTerm2.
|
|
||||||
- Detect support for italics, dim, reverse and other modes.
|
|
||||||
|
|
||||||
If terminfo reports 256 color support for a terminal, 256 color support will always be enabled.
|
|
||||||
|
|
||||||
To force true-color support on or off, set :envvar:`fish_term24bit` to "1" for on and 0 for off - ``set -g fish_term24bit 1``.
|
|
||||||
|
|
||||||
To debug color palette problems, ``tput colors`` may be useful to see the number of colors in terminfo for a terminal. Fish launched as ``fish -d term_support`` will include diagnostic messages that indicate the color support mode in use.
|
|
||||||
|
|
||||||
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 lack color information for terminals that support it. Fish assumes that all terminals can use the `ANSI X3.64 <https://en.wikipedia.org/wiki/ANSI_escape_code>`_ escape sequences if the terminfo definition indicates a color below 16 is not supported.
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Description
|
|||||||
|
|
||||||
fish will search the working directory to resolve relative paths but will not search :envvar:`PATH` .
|
fish will search the working directory to resolve relative paths but will not search :envvar:`PATH` .
|
||||||
|
|
||||||
If no file is specified and stdin is not the terminal, or if the file name ``-`` is used, stdin will be read.
|
If no file is specified and a file or pipeline is connected to standard input, or if the file name ``-`` is used, ``source`` will read from standard input. If no file is specified and there is no redirected file or pipeline on standard input, an error will be printed.
|
||||||
|
|
||||||
The exit status of ``source`` is the exit status of the last job to execute. If something goes wrong while opening or reading the file, ``source`` exits with a non-zero status.
|
The exit status of ``source`` is the exit status of the last job to execute. If something goes wrong while opening or reading the file, ``source`` exits with a non-zero status.
|
||||||
|
|
||||||
@@ -41,8 +41,3 @@ Example
|
|||||||
source ~/.config/fish/config.fish
|
source ~/.config/fish/config.fish
|
||||||
# Causes fish to re-read its initialization file.
|
# Causes fish to re-read its initialization file.
|
||||||
|
|
||||||
|
|
||||||
Caveats
|
|
||||||
-------
|
|
||||||
|
|
||||||
In fish versions prior to 2.3.0, the :envvar:`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.
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Synopsis
|
|||||||
status
|
status
|
||||||
status is-login
|
status is-login
|
||||||
status is-interactive
|
status is-interactive
|
||||||
|
status is-interactive-read
|
||||||
status is-block
|
status is-block
|
||||||
status is-breakpoint
|
status is-breakpoint
|
||||||
status is-command-substitution
|
status is-command-substitution
|
||||||
@@ -30,6 +31,8 @@ Synopsis
|
|||||||
status features
|
status features
|
||||||
status test-feature FEATURE
|
status test-feature FEATURE
|
||||||
status buildinfo
|
status buildinfo
|
||||||
|
status get-file FILE
|
||||||
|
status list-files [PATH]
|
||||||
|
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
@@ -50,6 +53,9 @@ The following operations (subcommands) are available:
|
|||||||
**is-interactive**, **-i** or **--is-interactive**
|
**is-interactive**, **-i** or **--is-interactive**
|
||||||
Returns 0 if fish is interactive - that is, connected to a keyboard.
|
Returns 0 if fish is interactive - that is, connected to a keyboard.
|
||||||
|
|
||||||
|
**is-interactive-read** or **--is-interactive-read**
|
||||||
|
Returns 0 if fish is running an interactive :doc:`read <read>` builtin which is connected to a keyboard.
|
||||||
|
|
||||||
**is-login**, **-l** or **--is-login**
|
**is-login**, **-l** or **--is-login**
|
||||||
Returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up :envvar:`PATH`.
|
Returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up :envvar:`PATH`.
|
||||||
|
|
||||||
@@ -102,6 +108,15 @@ The following operations (subcommands) are available:
|
|||||||
This prints information on how fish was build - which architecture, which build system or profile was used, etc.
|
This prints information on how fish was build - which architecture, which build system or profile was used, etc.
|
||||||
This is mainly useful for debugging.
|
This is mainly useful for debugging.
|
||||||
|
|
||||||
|
**get-file** *FILE*
|
||||||
|
This prints a file embedded in the fish binary at compile time. This includes the default set of functions and completions,
|
||||||
|
as well as the man pages and themes. Which files are included depends on build settings.
|
||||||
|
Returns 0 if the file was included, 1 otherwise.
|
||||||
|
|
||||||
|
**list-files** *FILE*
|
||||||
|
This lists the files embedded in the fish binary at compile time. Only files where the path starts with the optional *FILE* argument are shown.
|
||||||
|
Returns 0 if something was printed, 1 otherwise.
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ Description
|
|||||||
|
|
||||||
``string 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.
|
``string 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.
|
||||||
|
|
||||||
If you specify the **-e** or **--entire** then each matching string is printed including any prefix or suffix not matched by the pattern (equivalent to ``grep`` without the **-o** flag). You can, obviously, achieve the same result by prepending and appending **\*** or **.*** depending on whether or not you have specified the **--regex** flag. The **--entire** flag is simply a way to avoid having to complicate the pattern in that fashion and make the intent of the ``string match`` clearer. Without **--entire** and **--regex**, a *PATTERN* will need to match the entire *STRING* before it will be reported.
|
If you specify the **-e** or **--entire** then each matching string is printed including any prefix or suffix not matched by the pattern (equivalent to ``grep`` without the **-o** flag). You can, obviously, achieve the same result by prepending and appending **\*** or **.*** depending on whether or not you have specified the **--regex** flag. The **--entire** flag is a way to avoid having to complicate the pattern in that fashion and make the intent of the ``string match`` clearer. Without **--entire** and **--regex**, a *PATTERN* will need to match the entire *STRING* before it will be reported.
|
||||||
|
|
||||||
Matching can be made case-insensitive with **--ignore-case** or **-i**.
|
Matching can be made case-insensitive with **--ignore-case** or **-i**.
|
||||||
|
|
||||||
If **--groups-only** or **-g** is given, only the capturing groups will be reported - meaning the full match will be skipped. This is incompatible with **--entire** and **--invert**, and requires **--regex**. It is useful as a simple cutting tool instead of ``string replace``, so you can simply choose "this part" of a string.
|
If **--groups-only** or **-g** is given, only the capturing groups will be reported - meaning the full match will be skipped. This is incompatible with **--entire** and **--invert**, and requires **--regex**. It is useful as a simple cutting tool instead of ``string replace``, so you can choose "this part" of a string.
|
||||||
|
|
||||||
If **--index** or **-n** 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. A glob pattern is only considered a valid match if it matches the entire *STRING*.
|
If **--index** or **-n** 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. A glob pattern is only considered a valid match if it matches the entire *STRING*.
|
||||||
|
|
||||||
@@ -52,13 +52,13 @@ Match Glob Examples
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
>_ string match '?' a
|
>_ string match 'a' a
|
||||||
a
|
a
|
||||||
|
|
||||||
>_ string match 'a*b' axxb
|
>_ string match 'a*b' axxb
|
||||||
axxb
|
axxb
|
||||||
|
|
||||||
>_ string match -i 'a??B' Axxb
|
>_ string match -i 'a*B' Axxb
|
||||||
Axxb
|
Axxb
|
||||||
|
|
||||||
>_ string match -- '-*' -h foo --version bar
|
>_ string match -- '-*' -h foo --version bar
|
||||||
@@ -67,7 +67,7 @@ Match Glob Examples
|
|||||||
-h
|
-h
|
||||||
--version
|
--version
|
||||||
|
|
||||||
>_ echo 'ok?' | string match '*\?'
|
>_ echo 'ok?' | string match '*?'
|
||||||
ok?
|
ok?
|
||||||
|
|
||||||
# Note that only the second STRING will match here.
|
# Note that only the second STRING will match here.
|
||||||
@@ -79,7 +79,7 @@ Match Glob Examples
|
|||||||
foo
|
foo
|
||||||
foo2
|
foo2
|
||||||
|
|
||||||
>_ string match 'foo?' 'foo1' 'foo' 'foo2'
|
>_ string match 'foo*' 'foo1' 'foo' 'foo2'
|
||||||
foo1
|
foo1
|
||||||
foo2
|
foo2
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ See also the **--delimiter** option of the :doc:`read <read>` command.
|
|||||||
|
|
||||||
``split0`` has the important property that its output is not further split when used in a command substitution, allowing for the command substitution to produce elements containing newlines. This is most useful when used with Unix tools that produce zero bytes, such as ``find -print0`` or ``sort -z``. See split0 examples below.
|
``split0`` has the important property that its output is not further split when used in a command substitution, allowing for the command substitution to produce elements containing newlines. This is most useful when used with Unix tools that produce zero bytes, such as ``find -print0`` or ``sort -z``. See split0 examples below.
|
||||||
|
|
||||||
|
Be aware that commandline arguments cannot include NULs, so you likely want to pass to ``string split0`` via a pipe, not a command substitution.
|
||||||
|
|
||||||
.. END DESCRIPTION
|
.. END DESCRIPTION
|
||||||
|
|
||||||
@@ -65,6 +66,7 @@ NUL Delimited Examples
|
|||||||
::
|
::
|
||||||
|
|
||||||
>_ # Count files in a directory, without being confused by newlines.
|
>_ # Count files in a directory, without being confused by newlines.
|
||||||
|
>_ # Note: Don't use `string split0 (find . -print0)`, because arguments cannot include NUL.
|
||||||
>_ count (find . -print0 | string split0)
|
>_ count (find . -print0 | string split0)
|
||||||
42
|
42
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ Parentheses and the ``-o`` and ``-a`` operators can be combined to produce more
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
Numerical comparisons will simply fail if one of the operands is not a number:
|
Numerical comparisons will fail if one of the operands is not a number:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ man_pages = [
|
|||||||
("language", "fish-language", "", [author], 1),
|
("language", "fish-language", "", [author], 1),
|
||||||
("interactive", "fish-interactive", "", [author], 1),
|
("interactive", "fish-interactive", "", [author], 1),
|
||||||
("relnotes", "fish-releasenotes", "", [author], 1),
|
("relnotes", "fish-releasenotes", "", [author], 1),
|
||||||
|
("terminal-compatibility", "fish-terminal-compatibility", "", [author], 1),
|
||||||
("completions", "fish-completions", "", [author], 1),
|
("completions", "fish-completions", "", [author], 1),
|
||||||
("prompt", "fish-prompt-tutorial", "", [author], 1),
|
("prompt", "fish-prompt-tutorial", "", [author], 1),
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Use the :doc:`set <cmds/set>` command::
|
|||||||
set -x key value # typically set -gx key value
|
set -x key value # typically set -gx key value
|
||||||
set -e key
|
set -e key
|
||||||
|
|
||||||
Since fish 3.1 you can set an environment variable for just one command using the ``key=value some command`` syntax, like in other shells. The two lines below behave identically - unlike other shells, fish will output ``value`` both times::
|
Since fish 3.1 you can set an environment variable for one command using the ``key=value some command`` syntax, like in other shells. The two lines below behave identically - unlike other shells, fish will output ``value`` both times::
|
||||||
|
|
||||||
key=value echo $key
|
key=value echo $key
|
||||||
begin; set -lx key value; echo $key; end
|
begin; set -lx key value; echo $key; end
|
||||||
@@ -162,11 +162,11 @@ Why doesn't history substitution ("!$" etc.) work?
|
|||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
Because history substitution is an awkward interface that was invented before interactive line editing was even possible. Instead of adding this pseudo-syntax, fish opts for nice history searching and recall features. Switching requires a small change of habits: if you want to modify an old line/word, first recall it, then edit.
|
Because history substitution is an awkward interface that was invented before interactive line editing was even possible. Instead of adding this pseudo-syntax, fish opts for nice history searching and recall features. Switching requires a small change of habits: if you want to modify an old line/word, first recall it, then edit.
|
||||||
|
|
||||||
As a special case, most of the time history substitution is used as ``sudo !!``. In that case just press :kbd:`alt-s`, and it will recall your last commandline with ``sudo`` prefixed (or toggle a ``sudo`` prefix on the current commandline if there is anything).
|
As a special case, most of the time history substitution is used as ``sudo !!``. In that case press :kbd:`alt-s`, and it will recall your last commandline with ``sudo`` prefixed (or toggle a ``sudo`` prefix on the current commandline if there is anything).
|
||||||
|
|
||||||
In general, fish's history recall works like this:
|
In general, fish's history recall works like this:
|
||||||
|
|
||||||
- Like other shells, the Up arrow, ``up`` recalls whole lines, starting from the last executed line. So instead of typing ``!!``, you would just hit the up-arrow.
|
- Like other shells, the Up arrow, ``up`` recalls whole lines, starting from the last executed line. So instead of typing ``!!``, you would hit the up-arrow.
|
||||||
|
|
||||||
- If the line you want is far back in the history, type any part of the line and then press Up one or more times. This will filter the recalled lines to ones that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like. If you want to see more context, you can press ``ctrl-r`` to open the history in the pager.
|
- If the line you want is far back in the history, type any part of the line and then press Up one or more times. This will filter the recalled lines to ones that include this text, and you will get to the line you want much faster. This replaces "!vi", "!?bar.c" and the like. If you want to see more context, you can press ``ctrl-r`` to open the history in the pager.
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ In general, fish's history recall works like this:
|
|||||||
|
|
||||||
See :ref:`documentation <editor>` for more details about line editing in fish.
|
See :ref:`documentation <editor>` for more details about line editing in fish.
|
||||||
|
|
||||||
That being said, you can use :ref:`abbreviations` to implement history substitution. Here's just ``!!``::
|
That being said, you can use :ref:`abbreviations` to implement history substitution. Here's ``!!`` only::
|
||||||
|
|
||||||
function last_history_item; echo $history[1]; end
|
function last_history_item; echo $history[1]; end
|
||||||
abbr -a !! --position anywhere --function last_history_item
|
abbr -a !! --position anywhere --function last_history_item
|
||||||
@@ -232,7 +232,7 @@ Use the ``$status`` variable. This replaces the ``$?`` variable used in other sh
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
If you are just interested in success or failure, you can run the command directly as the if-condition::
|
If you are only interested in success or failure, you can run the command directly as the if-condition::
|
||||||
|
|
||||||
if somecommand
|
if somecommand
|
||||||
echo "Command succeeded"
|
echo "Command succeeded"
|
||||||
@@ -330,7 +330,7 @@ This is more important to fish than other shells because features like syntax hi
|
|||||||
|
|
||||||
Sometimes, there is disagreement on the width. There are numerous causes and fixes for this:
|
Sometimes, there is disagreement on the width. There are numerous causes and fixes for this:
|
||||||
|
|
||||||
- It is possible the character is simply too new for your system to know - in this case you need to refrain from using it.
|
- It is possible the character is too new for your system to know - in this case you need to refrain from using it.
|
||||||
- Fish or your terminal might not know about the character or handle it wrong - in this case fish or your terminal needs to be fixed, or you need to update to a fixed version.
|
- Fish or your terminal might not know about the character or handle it wrong - in this case fish or your terminal needs to be fixed, or you need to update to a fixed version.
|
||||||
- The character has an "ambiguous" width and fish thinks that means a width of X while your terminal thinks it's Y. In this case you either need to change your terminal's configuration or set $fish_ambiguous_width to the correct value.
|
- The character has an "ambiguous" width and fish thinks that means a width of X while your terminal thinks it's Y. In this case you either need to change your terminal's configuration or set $fish_ambiguous_width to the correct value.
|
||||||
- The character is an emoji and the host system only supports Unicode 8, while you are running the terminal on a system that uses Unicode >= 9. In this case set $fish_emoji_width to 2.
|
- The character is an emoji and the host system only supports Unicode 8, while you are running the terminal on a system that uses Unicode >= 9. In this case set $fish_emoji_width to 2.
|
||||||
@@ -340,13 +340,21 @@ This also means that a few things are unsupportable:
|
|||||||
- Non-monospace fonts - there is *no way* for fish to figure out what width a specific character has as it has no influence on the terminal's font rendering.
|
- Non-monospace fonts - there is *no way* for fish to figure out what width a specific character has as it has no influence on the terminal's font rendering.
|
||||||
- Different widths for multiple ambiguous width characters - there is no way for fish to know which width you assign to each character.
|
- Different widths for multiple ambiguous width characters - there is no way for fish to know which width you assign to each character.
|
||||||
|
|
||||||
|
.. _faq-terminal-compatibility:
|
||||||
|
|
||||||
|
fish does not work in a specific terminal
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
The terminal might not meet all of :doc:`fish's requirements <terminal-compatibility>`.
|
||||||
|
Please report this to your terminal's and to fish's issue tracker.
|
||||||
|
|
||||||
.. _faq-uninstalling:
|
.. _faq-uninstalling:
|
||||||
|
|
||||||
Uninstalling fish
|
Uninstalling fish
|
||||||
-----------------
|
-----------------
|
||||||
If you want to uninstall fish, first make sure fish is not set as your shell. Run ``chsh -s /bin/bash`` if you are not sure.
|
If you want to uninstall fish, first make sure fish is not set as your shell. Run ``chsh -s /bin/bash`` if you are not sure.
|
||||||
|
|
||||||
If you installed it with a package manager, just use that package manager's uninstall function. If you built fish yourself, assuming you installed it to /usr/local, do this::
|
If you installed it with a package manager, use that package manager's uninstall function. If you built fish yourself, assuming you installed it to /usr/local, do this::
|
||||||
|
|
||||||
rm -Rf /usr/local/etc/fish /usr/local/share/fish ~/.config/fish
|
rm -Rf /usr/local/etc/fish /usr/local/share/fish ~/.config/fish
|
||||||
rm /usr/local/share/man/man1/fish*.1
|
rm /usr/local/share/man/man1/fish*.1
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Note that both of these are bashisms, and most things can easily be expressed wi
|
|||||||
|
|
||||||
source (command | psub)
|
source (command | psub)
|
||||||
|
|
||||||
just use::
|
Use::
|
||||||
|
|
||||||
command | source
|
command | source
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ is mostly the same as
|
|||||||
foo
|
foo
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
Just like with heredocs, the command has to be prepared to read from stdin. Sometimes this requires special options to be used, often giving a filename of ``-`` turns it on.
|
Like with heredocs, the command has to be prepared to read from stdin. Sometimes this requires special options to be used, often giving a filename of ``-`` turns it on.
|
||||||
|
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ and could be written in other shells as
|
|||||||
rxvt-unicode
|
rxvt-unicode
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
So heredocs really are just minor syntactical sugar that introduces a lot of special rules, which is why fish doesn't have them. Pipes are a core concept, and are simpler and compose nicer.
|
So heredocs really are minor syntactical sugar that introduces a lot of special rules, which is why fish doesn't have them. Pipes are a core concept, and are simpler and compose nicer.
|
||||||
|
|
||||||
.. [#] For example, the "EOF" is just a convention, the terminator can be an arbitrary string, something like "THISISTHEEND" also works. And using ``<<-`` trims leading *tab* characters (but not other whitespace), so you can indent the lines, but only with tabs. Substitutions (variables, commands) are done on the heredoc by default, but not if the terminator is quoted: ``cat << "EOF"``.
|
.. [#] For example, the "EOF" is just a convention, the terminator can be an arbitrary string, something like "THISISTHEEND" also works. And using ``<<-`` trims leading *tab* characters (but not other whitespace), so you can indent the lines, but only with tabs. Substitutions (variables, commands) are done on the heredoc by default, but not if the terminator is quoted: ``cat << "EOF"``.
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ and a rough fish equivalent::
|
|||||||
This shows a few differences:
|
This shows a few differences:
|
||||||
|
|
||||||
- Fish provides :doc:`set_color <cmds/set_color>` to color text. It can use the 16 named colors and also RGB sequences (so you could also use ``set_color 5555FF``)
|
- Fish provides :doc:`set_color <cmds/set_color>` to color text. It can use the 16 named colors and also RGB sequences (so you could also use ``set_color 5555FF``)
|
||||||
- Instead of introducing specific escapes like ``\h`` for the hostname, the prompt is simply a function. To achieve the effect of ``\h``, fish provides helper functions like :doc:`prompt_hostname <cmds/prompt_hostname>`, which prints a shortened version of the hostname.
|
- Instead of introducing specific escapes like ``\h`` for the hostname, the prompt is a function. To achieve the effect of ``\h``, fish provides helper functions like :doc:`prompt_hostname <cmds/prompt_hostname>`, which prints a shortened version of the hostname.
|
||||||
- Fish offers other helper functions for adding things to the prompt, like :doc:`fish_vcs_prompt <cmds/fish_vcs_prompt>` for adding a display for common version control systems (git, mercurial, svn), and :doc:`prompt_pwd <cmds/prompt_pwd>` for showing a shortened ``$PWD`` (the user's home directory becomes ``~`` and any path component is shortened).
|
- Fish offers other helper functions for adding things to the prompt, like :doc:`fish_vcs_prompt <cmds/fish_vcs_prompt>` for adding a display for common version control systems (git, mercurial, svn), and :doc:`prompt_pwd <cmds/prompt_pwd>` for showing a shortened ``$PWD`` (the user's home directory becomes ``~`` and any path component is shortened).
|
||||||
|
|
||||||
The default prompt is reasonably full-featured and its code can be read via ``type fish_prompt``.
|
The default prompt is reasonably full-featured and its code can be read via ``type fish_prompt``.
|
||||||
@@ -417,7 +417,7 @@ This includes things like:
|
|||||||
baz &
|
baz &
|
||||||
done
|
done
|
||||||
|
|
||||||
Fish does not currently have subshells. You will have to find a different solution. The isolation can usually be achieved by just scoping variables (with ``set -l``), but if you really do need to run your code in a new shell environment you can use ``fish -c 'your code here'`` to do so explicitly.
|
Fish does not currently have subshells. You will have to find a different solution. The isolation can usually be achieved by scoping variables (with ``set -l``), but if you really do need to run your code in a new shell environment you can use ``fish -c 'your code here'`` to do so explicitly.
|
||||||
|
|
||||||
``()`` subshells are often confused with ``{}`` grouping, which does *not* use a subshell. When you just need to group, you can use ``begin; end`` in fish::
|
``()`` subshells are often confused with ``{}`` grouping, which does *not* use a subshell. When you just need to group, you can use ``begin; end`` in fish::
|
||||||
|
|
||||||
@@ -427,7 +427,7 @@ Fish does not currently have subshells. You will have to find a different soluti
|
|||||||
# becomes
|
# becomes
|
||||||
begin; foo; bar; end | baz
|
begin; foo; bar; end | baz
|
||||||
|
|
||||||
The pipe will simply be run in the same process, so ``while read`` loops can set variables outside::
|
The pipe will be run in the same process, so ``while read`` loops can set variables outside::
|
||||||
|
|
||||||
foo | while read bar
|
foo | while read bar
|
||||||
set -g VAR VAL
|
set -g VAR VAL
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ lexer_rules = [
|
|||||||
# Hack: treat the "[ expr ]" alias of builtin test as command token (not as grammar
|
# Hack: treat the "[ expr ]" alias of builtin test as command token (not as grammar
|
||||||
# metacharacter). This works because we write it without spaces in the grammar (like
|
# metacharacter). This works because we write it without spaces in the grammar (like
|
||||||
# "[OPTIONS]").
|
# "[OPTIONS]").
|
||||||
(r"\. |! |\[ | \]", Name.Constant),
|
(r"\. |! |\[ | \]|\{ | \}", Name.Constant),
|
||||||
# Statement separators.
|
# Statement separators.
|
||||||
(r"\n", Text.Whitespace),
|
(r"\n", Text.Whitespace),
|
||||||
(r";", Punctuation),
|
(r";", Punctuation),
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ Resources
|
|||||||
|
|
||||||
- The `GitHub page <https://github.com/fish-shell/fish-shell/>`_
|
- The `GitHub page <https://github.com/fish-shell/fish-shell/>`_
|
||||||
|
|
||||||
- The official `Gitter channel <https://gitter.im/fish-shell/fish-shell>`_
|
- The official `Matrix room <https://matrix.to/#/#fish-shell:matrix.org>`_
|
||||||
|
|
||||||
- The official mailing list at `fish-users@lists.sourceforge.net <https://lists.sourceforge.net/lists/listinfo/fish-users>`_
|
- The official mailing list at `fish-users@lists.sourceforge.net <https://lists.sourceforge.net/lists/listinfo/fish-users>`_
|
||||||
|
|
||||||
@@ -174,5 +174,6 @@ Other help pages
|
|||||||
prompt
|
prompt
|
||||||
design
|
design
|
||||||
relnotes
|
relnotes
|
||||||
|
terminal-compatibility
|
||||||
contributing
|
contributing
|
||||||
license
|
license
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Autosuggestions
|
|||||||
|
|
||||||
fish suggests commands as you type, based on :ref:`command history <history-search>`, 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).
|
fish suggests commands as you type, based on :ref:`command history <history-search>`, 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 :kbd:`right` (``→``) or :kbd:`ctrl-f`. To accept the first suggested word, press :kbd:`alt-right` (``→``) or :kbd:`alt-f`. If the autosuggestion is not what you want, just ignore it: it won't execute unless you accept it.
|
To accept the autosuggestion (replacing the command line contents), press :kbd:`right` (``→``) or :kbd:`ctrl-f`. To accept the first suggested word, press :kbd:`alt-right` (``→``) or :kbd:`alt-f`. If the autosuggestion is not what you want, ignore it: it won't execute unless you accept it.
|
||||||
|
|
||||||
Autosuggestions are a powerful way to quickly summon frequently entered commands, by typing the first few characters. They are also an efficient technique for navigating through directory hierarchies.
|
Autosuggestions are a powerful way to quickly summon frequently entered commands, by typing the first few characters. They are also an efficient technique for navigating through directory hierarchies.
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ If you don't like autosuggestions, you can disable them by setting ``$fish_autos
|
|||||||
Tab Completion
|
Tab Completion
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Tab completion is a time saving feature of any modern shell. When you type :kbd:`tab`, fish tries to guess the rest of the word under the cursor. If it finds just one possibility, it inserts it. If it finds more, it inserts the longest unambiguous part and then opens a menu (the "pager") that you can navigate to find what you're looking for.
|
Tab completion is a time saving feature of any modern shell. When you type :kbd:`tab`, fish tries to guess the rest of the word under the cursor. If it finds exactly one possibility, it inserts it. If it finds more, it inserts the longest unambiguous part and then opens a menu (the "pager") that you can navigate to find what you're looking for.
|
||||||
|
|
||||||
The pager can be navigated with the arrow keys, :kbd:`pageup` / :kbd:`pagedown`, :kbd:`tab` or :kbd:`shift-tab`. Pressing :kbd:`ctrl-s` (the ``pager-toggle-search`` binding - :kbd:`/` in vi mode) opens up a search menu that you can use to filter the list.
|
The pager can be navigated with the arrow keys, :kbd:`pageup` / :kbd:`pagedown`, :kbd:`tab` or :kbd:`shift-tab`. Pressing :kbd:`ctrl-s` (the ``pager-toggle-search`` binding - :kbd:`/` in vi mode) opens up a search menu that you can use to filter the list.
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ It also provides a large number of program specific scripted completions. Most o
|
|||||||
|
|
||||||
You can also write your own completions or install some you got from someone else. For that, see :ref:`Writing your own completions <completion-own>`.
|
You can also write your own completions or install some you got from someone else. For that, see :ref:`Writing your own completions <completion-own>`.
|
||||||
|
|
||||||
Completion scripts are loaded on demand, just like :ref:`functions are <syntax-function-autoloading>`. The difference is the ``$fish_complete_path`` :ref:`list <variables-lists>` is used instead of ``$fish_function_path``. Typically you can drop new completions in ~/.config/fish/completions/name-of-command.fish and fish will find them automatically.
|
Completion scripts are loaded on demand, like :ref:`functions are <syntax-function-autoloading>`. The difference is the ``$fish_complete_path`` :ref:`list <variables-lists>` is used instead of ``$fish_function_path``. Typically you can drop new completions in ~/.config/fish/completions/name-of-command.fish and fish will find them automatically.
|
||||||
|
|
||||||
.. _color:
|
.. _color:
|
||||||
|
|
||||||
@@ -89,7 +89,16 @@ Or, to see all themes, right in your terminal::
|
|||||||
Syntax highlighting variables
|
Syntax highlighting variables
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The colors used by fish for syntax highlighting can be configured by changing the values of various variables. The value of these variables can be one of the colors accepted by the :doc:`set_color <cmds/set_color>` command. The modifier switches accepted by ``set_color`` like ``--bold``, ``--dim``, ``--italics``, ``--reverse`` and ``--underline`` are also accepted.
|
The colors used by fish for syntax highlighting can be configured by changing the values of various variables. The value of these variables can be one of the colors accepted by the :doc:`set_color <cmds/set_color>` command.
|
||||||
|
Options accepted by ``set_color`` like
|
||||||
|
``--background=``,
|
||||||
|
``--bold``,
|
||||||
|
``--dim``,
|
||||||
|
``--italics``,
|
||||||
|
``--reverse``,
|
||||||
|
``--underline`` and
|
||||||
|
``--underline-color=``
|
||||||
|
are also accepted.
|
||||||
|
|
||||||
|
|
||||||
Example: to make errors highlighted and red, use::
|
Example: to make errors highlighted and red, use::
|
||||||
@@ -217,6 +226,8 @@ This prompt is determined by running the :doc:`fish_prompt <cmds/fish_prompt>` a
|
|||||||
The output of the former is displayed on the left and the latter's output on the right side of the terminal.
|
The output of the former is displayed on the left and the latter's output on the right side of the terminal.
|
||||||
For :ref:`vi mode <vi-mode>`, the output of :doc:`fish_mode_prompt <cmds/fish_mode_prompt>` will be prepended on the left.
|
For :ref:`vi mode <vi-mode>`, the output of :doc:`fish_mode_prompt <cmds/fish_mode_prompt>` will be prepended on the left.
|
||||||
|
|
||||||
|
If :envvar:`fish_transient_prompt` is set to 1, fish will redraw the prompt with a ``--final-rendering`` argument before running a commandline, allowing you to change it before pushing it to the scrollback.
|
||||||
|
|
||||||
Fish ships with a few prompts which you can see with :doc:`fish_config <cmds/fish_config>`. If you run just ``fish_config`` it will open a web interface [#]_ where you'll be shown the prompts and can pick which one you want. ``fish_config prompt show`` will show you the prompts right in your terminal.
|
Fish ships with a few prompts which you can see with :doc:`fish_config <cmds/fish_config>`. If you run just ``fish_config`` it will open a web interface [#]_ where you'll be shown the prompts and can pick which one you want. ``fish_config prompt show`` will show you the prompts right in your terminal.
|
||||||
|
|
||||||
For example ``fish_config prompt choose disco`` will temporarily select the "disco" prompt. If you like it and decide to keep it, run ``fish_config prompt save``.
|
For example ``fish_config prompt choose disco`` will temporarily select the "disco" prompt. If you like it and decide to keep it, run ``fish_config prompt save``.
|
||||||
@@ -303,9 +314,11 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit
|
|||||||
|
|
||||||
- :kbd:`alt-enter` inserts a newline at the cursor position. This is useful to add a line to a commandline that's already complete.
|
- :kbd:`alt-enter` inserts a newline at the cursor position. This is useful to add a line to a commandline that's already complete.
|
||||||
|
|
||||||
- :kbd:`alt-left` (``←``) and :kbd:`alt-right` (``→``) move the cursor one argument left or right, or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (``→``) (or :kbd:`alt-f`) accepts the first argument in the suggestion.
|
- :kbd:`alt-left` (``←``) and :kbd:`alt-right` (``→``) move the cursor left or right by one argument (or one word on macOS).
|
||||||
|
If the command line is empty, they move forward/backward in the directory history.
|
||||||
|
If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`alt-right` (``→``) (or :kbd:`alt-f`) accepts the first argument (or word on macOS) in the suggestion.
|
||||||
|
|
||||||
- :kbd:`ctrl-left` (``←``) and :kbd:`ctrl-right` (``→``) move the cursor one word left or right. These accept one word of the autosuggestion - the part they'd move over.
|
- :kbd:`ctrl-left` (``←``) and :kbd:`ctrl-right` (``→``) move the cursor left or right by one word. These accept one word of the autosuggestion - the part they'd move over.
|
||||||
|
|
||||||
- :kbd:`shift-left` (``←``) and :kbd:`shift-right` (``→``) move the cursor one word left or right, without stopping on punctuation. These accept one big word of the autosuggestion.
|
- :kbd:`shift-left` (``←``) and :kbd:`shift-right` (``→``) move the cursor one word left or right, without stopping on punctuation. These accept one big word of the autosuggestion.
|
||||||
|
|
||||||
@@ -325,11 +338,13 @@ Some bindings are common across Emacs and vi mode, because they aren't text edit
|
|||||||
|
|
||||||
- :kbd:`ctrl-x` copies the current buffer to the system's clipboard, :kbd:`ctrl-v` inserts the clipboard contents. (see :doc:`fish_clipboard_copy <cmds/fish_clipboard_copy>` and :doc:`fish_clipboard_paste <cmds/fish_clipboard_paste>`)
|
- :kbd:`ctrl-x` copies the current buffer to the system's clipboard, :kbd:`ctrl-v` inserts the clipboard contents. (see :doc:`fish_clipboard_copy <cmds/fish_clipboard_copy>` and :doc:`fish_clipboard_paste <cmds/fish_clipboard_paste>`)
|
||||||
|
|
||||||
- :kbd:`alt-d` or :kbd:`ctrl-delete` moves the next word to the :ref:`killring`.
|
- :kbd:`alt-d` moves the next word to the :ref:`killring`.
|
||||||
|
|
||||||
|
- :kbd:`ctrl-delete` moves the next word (or next argument on macOS) to the :ref:`killring`.
|
||||||
|
|
||||||
- :kbd:`alt-d` lists the directory history if the command line is empty.
|
- :kbd:`alt-d` lists the directory history if the command line is empty.
|
||||||
|
|
||||||
- :kbd:`alt-delete` moves the next argument to the :ref:`killring`.
|
- :kbd:`alt-delete` moves the next argument (or word on macOS) to the :ref:`killring`.
|
||||||
|
|
||||||
- :kbd:`shift-delete` removes the current history item or autosuggestion from the command history.
|
- :kbd:`shift-delete` removes the current history item or autosuggestion from the command history.
|
||||||
|
|
||||||
@@ -364,11 +379,14 @@ To enable emacs mode, use :doc:`fish_default_key_bindings <cmds/fish_default_key
|
|||||||
|
|
||||||
- :kbd:`ctrl-b`, :kbd:`ctrl-f` move the cursor one character left or right or accept the autosuggestion just like the :kbd:`left` (``←``) and :kbd:`right` (``→``) shared bindings (which are available as well).
|
- :kbd:`ctrl-b`, :kbd:`ctrl-f` move the cursor one character left or right or accept the autosuggestion just like the :kbd:`left` (``←``) and :kbd:`right` (``→``) shared bindings (which are available as well).
|
||||||
|
|
||||||
|
- :kbd:`alt-b`, :kbd:`alt-f` move the cursor one word left or right, or accept one word of the autosuggestion. If the command line is empty, moves forward/backward in the directory history instead.
|
||||||
|
|
||||||
- :kbd:`ctrl-n`, :kbd:`ctrl-p` move the cursor up/down or through history, like the up and down arrow shared bindings.
|
- :kbd:`ctrl-n`, :kbd:`ctrl-p` move the cursor up/down or through history, like the up and down arrow shared bindings.
|
||||||
|
|
||||||
- :kbd:`delete` or :kbd:`backspace` or :kbd:`ctrl-h` removes one character forwards or backwards respectively.
|
- :kbd:`delete` or :kbd:`backspace` or :kbd:`ctrl-h` removes one character forwards or backwards respectively.
|
||||||
|
|
||||||
- :kbd:`ctrl-backspace` removes one word backwards and :kbd:`alt-backspace` removes one argument backwards.
|
- :kbd:`ctrl-backspace` removes one word backwards and :kbd:`alt-backspace` removes one argument backwards.
|
||||||
|
On macOS, it's the other way round.
|
||||||
|
|
||||||
- :kbd:`alt-<` moves to the beginning of the commandline, :kbd:`alt->` moves to the end.
|
- :kbd:`alt-<` moves to the beginning of the commandline, :kbd:`alt->` moves to the end.
|
||||||
|
|
||||||
@@ -480,6 +498,7 @@ Command mode is also known as normal mode.
|
|||||||
- :kbd:`p` pastes text from the :ref:`killring`.
|
- :kbd:`p` pastes text from the :ref:`killring`.
|
||||||
|
|
||||||
- :kbd:`u` undoes the most recent edit of the command line.
|
- :kbd:`u` undoes the most recent edit of the command line.
|
||||||
|
|
||||||
- :kbd:`ctrl-r` redoes the most recent edit.
|
- :kbd:`ctrl-r` redoes the most recent edit.
|
||||||
|
|
||||||
- :kbd:`[` and :kbd:`]` search the command history for the previous/next token containing the token under the cursor before the search was started. See the :ref:`history <history-search>` section for more information on history searching.
|
- :kbd:`[` and :kbd:`]` search the command history for the previous/next token containing the token under the cursor before the search was started. See the :ref:`history <history-search>` section for more information on history searching.
|
||||||
@@ -501,6 +520,8 @@ Insert mode
|
|||||||
|
|
||||||
- :kbd:`backspace` removes one character to the left.
|
- :kbd:`backspace` removes one character to the left.
|
||||||
|
|
||||||
|
- :kbd:`ctrl-n` accepts the autosuggestion.
|
||||||
|
|
||||||
.. _vi-mode-visual:
|
.. _vi-mode-visual:
|
||||||
|
|
||||||
Visual mode
|
Visual mode
|
||||||
@@ -539,12 +560,12 @@ Custom bindings
|
|||||||
|
|
||||||
In addition to the standard bindings listed here, you can also define your own with :doc:`bind <cmds/bind>`::
|
In addition to the standard bindings listed here, you can also define your own with :doc:`bind <cmds/bind>`::
|
||||||
|
|
||||||
# Just clear the commandline on control-c
|
# Prints ``^C`` and a new prompt
|
||||||
bind ctrl-c 'commandline -r ""'
|
bind ctrl-c cancel-commandline
|
||||||
|
|
||||||
Put ``bind`` statements into :ref:`config.fish <configuration>` or a function called ``fish_user_key_bindings``.
|
Put ``bind`` statements into :ref:`config.fish <configuration>` or a function called ``fish_user_key_bindings``.
|
||||||
|
|
||||||
If you change your mind on a binding and want to go back to fish's default, you can simply erase it again::
|
If you change your mind on a binding and want to go back to fish's default, you can erase it again::
|
||||||
|
|
||||||
bind --erase ctrl-c
|
bind --erase ctrl-c
|
||||||
|
|
||||||
@@ -596,7 +617,7 @@ Copy and paste (Kill Ring)
|
|||||||
Fish uses an Emacs-style kill ring for copy and paste functionality. For example, use :kbd:`ctrl-k` (`kill-line`) to cut from the current cursor position to the end of the line. The string that is cut (a.k.a. killed in emacs-ese) is inserted into a list of kills, called the kill ring. To paste the latest value from the kill ring (emacs calls this "yanking") use :kbd:`ctrl-y` (the ``yank`` input function). After pasting, use :kbd:`alt-y` (``yank-pop``) to rotate to the previous kill.
|
Fish uses an Emacs-style kill ring for copy and paste functionality. For example, use :kbd:`ctrl-k` (`kill-line`) to cut from the current cursor position to the end of the line. The string that is cut (a.k.a. killed in emacs-ese) is inserted into a list of kills, called the kill ring. To paste the latest value from the kill ring (emacs calls this "yanking") use :kbd:`ctrl-y` (the ``yank`` input function). After pasting, use :kbd:`alt-y` (``yank-pop``) to rotate to the previous kill.
|
||||||
|
|
||||||
Copy and paste from outside are also supported, both via the :kbd:`ctrl-x` / :kbd:`ctrl-v` bindings (the ``fish_clipboard_copy`` and ``fish_clipboard_paste`` functions [#]_) and via the terminal's paste function, for which fish enables "Bracketed Paste Mode", so it can tell a paste from manually entered text.
|
Copy and paste from outside are also supported, both via the :kbd:`ctrl-x` / :kbd:`ctrl-v` bindings (the ``fish_clipboard_copy`` and ``fish_clipboard_paste`` functions [#]_) and via the terminal's paste function, for which fish enables "Bracketed Paste Mode", so it can tell a paste from manually entered text.
|
||||||
In addition, when pasting inside single quotes, pasted single quotes and backslashes are automatically escaped so that the result can be used as a single token simply by closing the quote after.
|
In addition, when pasting inside single quotes, pasted single quotes and backslashes are automatically escaped so that the result can be used as a single token by closing the quote after.
|
||||||
Kill ring entries are stored in ``fish_killring`` variable.
|
Kill ring entries are stored in ``fish_killring`` variable.
|
||||||
|
|
||||||
The commands ``begin-selection`` and ``end-selection`` (unbound by default; used for selection in vi visual mode) control text selection together with cursor movement commands that extend the current selection.
|
The commands ``begin-selection`` and ``end-selection`` (unbound by default; used for selection in vi visual mode) control text selection together with cursor movement commands that extend the current selection.
|
||||||
@@ -626,7 +647,7 @@ Searchable command history
|
|||||||
|
|
||||||
After a command has been executed, it is remembered in the history list. Any duplicate history items are automatically removed. By pressing the up and down keys, you can search forwards and backwards in the history. If the current command line is not empty when starting a history search, only the commands containing the string entered into the command line are shown.
|
After a command has been executed, it is remembered in the history list. Any duplicate history items are automatically removed. By pressing the up and down keys, you can search forwards and backwards in the history. If the current command line is not empty when starting a history search, only the commands containing the string entered into the command line are shown.
|
||||||
|
|
||||||
By pressing :kbd:`alt-up` (``↑``) and :kbd:`alt-down` (``↓``), a history search is also performed, but instead of searching for a complete commandline, each commandline is broken into separate elements just like it would be before execution, and the history is searched for an element matching that under the cursor.
|
By pressing :kbd:`alt-up` (``↑``) and :kbd:`alt-down` (``↓``), a history search is also performed, but instead of searching for a complete commandline, each commandline is broken into separate elements like it would be before execution, and the history is searched for an element matching that under the cursor.
|
||||||
|
|
||||||
For more complicated searches, you can press :kbd:`ctrl-r` to open a pager that allows you to search the history. It shows a limited number of entries in one page, press :kbd:`ctrl-r` [#]_ again to move to the next page and :kbd:`ctrl-s` [#]_ to move to the previous page. You can change the text to refine your search.
|
For more complicated searches, you can press :kbd:`ctrl-r` to open a pager that allows you to search the history. It shows a limited number of entries in one page, press :kbd:`ctrl-r` [#]_ again to move to the next page and :kbd:`ctrl-s` [#]_ to move to the previous page. You can change the text to refine your search.
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ This is important when any redirections reference other file descriptors with th
|
|||||||
|
|
||||||
Consider this helper function::
|
Consider this helper function::
|
||||||
|
|
||||||
# Just make a function that prints something to stdout and stderr
|
# Make a function that prints something to stdout and stderr
|
||||||
function print
|
function print
|
||||||
echo out
|
echo out
|
||||||
echo err >&2
|
echo err >&2
|
||||||
@@ -281,7 +281,7 @@ Now let's see a few cases::
|
|||||||
Job control
|
Job control
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
When you start a job in fish, fish itself will pause, and give control of the terminal to the program just started. Sometimes, you want to continue using the commandline, and have the job run in the background. To create a background job, append an ``&`` (ampersand) to your command. This will tell fish to run the job in the background. Background jobs are very useful when running programs that have a graphical user interface.
|
When you start a job in fish, fish itself will pause, and give control of the terminal to the program it just started. Sometimes, you want to continue using the commandline, and have the job run in the background. To create a background job, append an ``&`` (ampersand) to your command. This will tell fish to run the job in the background. Background jobs are very useful when running programs that have a graphical user interface.
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
@@ -314,7 +314,7 @@ For example, here's a simple function to list directories::
|
|||||||
ls -l $argv
|
ls -l $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
The first line tells fish to define a function by the name of ``ll``, so it can be used by simply writing ``ll`` on the commandline. The second line tells fish that the command ``ls -l $argv`` should be called when ``ll`` is invoked. :ref:`$argv <variables-argv>` is a :ref:`list variable <variables-lists>`, which always contains all arguments sent to the function. In the example above, these are simply passed on to the ``ls`` command. The ``end`` on the third line ends the definition.
|
The first line tells fish to define a function by the name of ``ll``, so it can be used by writing ``ll`` on the commandline. The second line tells fish that the command ``ls -l $argv`` should be called when ``ll`` is invoked. :ref:`$argv <variables-argv>` is a :ref:`list variable <variables-lists>`, which always contains all arguments sent to the function. In the example above, these are passed on to the ``ls`` command. The ``end`` on the third line ends the definition.
|
||||||
|
|
||||||
Calling this as ``ll /tmp/`` will end up running ``ls -l /tmp/``, which will list the contents of /tmp.
|
Calling this as ``ll /tmp/`` will end up running ``ls -l /tmp/``, which will list the contents of /tmp.
|
||||||
|
|
||||||
@@ -408,7 +408,7 @@ This is useful to explain what and why you are doing something::
|
|||||||
command ls --color=auto $argv
|
command ls --color=auto $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
There are no multiline comments. If you want to make a comment span multiple lines, simply start each line with a ``#``.
|
There are no multiline comments. If you want to make a comment span multiple lines, start each line with a ``#``.
|
||||||
|
|
||||||
Comments can also appear after a line like so::
|
Comments can also appear after a line like so::
|
||||||
|
|
||||||
@@ -436,7 +436,7 @@ Like other shells, but unlike typical programming languages you might know, the
|
|||||||
|
|
||||||
This uses the :doc:`test <cmds/test>` command to see if the file /etc/os-release exists. If it does, it runs ``cat``, which prints it on the screen.
|
This uses the :doc:`test <cmds/test>` command to see if the file /etc/os-release exists. If it does, it runs ``cat``, which prints it on the screen.
|
||||||
|
|
||||||
Unlike other shells, the condition command just ends after the first job, there is no ``then`` here. Combiners like ``and`` and ``or`` extend the condition.
|
Unlike other shells, the condition command ends after the first job, there is no ``then`` here. Combiners like ``and`` and ``or`` extend the condition.
|
||||||
|
|
||||||
A more complicated example with a :ref:`command substitution <expand-command-substitution>`::
|
A more complicated example with a :ref:`command substitution <expand-command-substitution>`::
|
||||||
|
|
||||||
@@ -460,7 +460,7 @@ Because ``test`` can be used for many different tests, it is important to quote
|
|||||||
|
|
||||||
The :doc:`not <cmds/not>` keyword can be used to invert the status::
|
The :doc:`not <cmds/not>` keyword can be used to invert the status::
|
||||||
|
|
||||||
# Just see if the file contains the string "fish" anywhere.
|
# Check if the file contains the string "fish" anywhere.
|
||||||
# This executes the `grep` command, which searches for a string,
|
# This executes the `grep` command, which searches for a string,
|
||||||
# and if it finds it returns a status of 0.
|
# and if it finds it returns a status of 0.
|
||||||
# The `not` then turns 0 into 1 or anything else into 0.
|
# The `not` then turns 0 into 1 or anything else into 0.
|
||||||
@@ -530,7 +530,7 @@ Or you can have a case where it is necessary to stop early::
|
|||||||
|
|
||||||
If this went on after seeing that the command "foo" doesn't exist, it would try to run ``foo`` and error because it wasn't found!
|
If this went on after seeing that the command "foo" doesn't exist, it would try to run ``foo`` and error because it wasn't found!
|
||||||
|
|
||||||
Combiners really just execute step-by-step, so it isn't recommended to build longer chains of them because they might do something you don't want. Consider::
|
Combiners execute step-by-step, so it isn't recommended to build longer chains of them because they might do something you don't want. Consider::
|
||||||
|
|
||||||
test -e /etc/my.config
|
test -e /etc/my.config
|
||||||
or echo "OH NO WE NEED A CONFIG FILE"
|
or echo "OH NO WE NEED A CONFIG FILE"
|
||||||
@@ -567,7 +567,7 @@ will print "Still running" once a second. You can abort it with ctrl-c.
|
|||||||
echo file: $file
|
echo file: $file
|
||||||
end
|
end
|
||||||
|
|
||||||
will print each file in the current directory. The part after the ``in`` is just a list of arguments, so you can use any :ref:`expansions <expand>` there::
|
will print each file in the current directory. The part after the ``in`` is a list of arguments, so you can use any :ref:`expansions <expand>` there::
|
||||||
|
|
||||||
set moreanimals bird fox
|
set moreanimals bird fox
|
||||||
for animal in {cat,}fish dog $moreanimals
|
for animal in {cat,}fish dog $moreanimals
|
||||||
@@ -620,7 +620,7 @@ When a parameter includes an :ref:`unquoted <quotes>` ``*`` star (or "asterisk")
|
|||||||
|
|
||||||
- ``**`` matches any number of characters (including zero), and also descends into subdirectories. If ``**`` is a segment by itself, that segment may match zero times, for compatibility with other shells.
|
- ``**`` matches any number of characters (including zero), and also descends into subdirectories. If ``**`` is a segment by itself, that segment may match zero times, for compatibility with other shells.
|
||||||
|
|
||||||
- ``?`` can match any single character except ``/``. This is deprecated and can be disabled via the ``qmark-noglob`` :ref:`feature flag<featureflags>`, so ``?`` will just be an ordinary character.
|
- ``?`` can match any single character except ``/``. This is deprecated and can be disabled via the ``qmark-noglob`` :ref:`feature flag<featureflags>`, so ``?`` will be an ordinary character.
|
||||||
|
|
||||||
Wildcard matches are sorted case insensitively. When sorting matches containing numbers, they are naturally sorted, so that the strings '1' '5' and '12' would be sorted like 1, 5, 12.
|
Wildcard matches are sorted case insensitively. When sorting matches containing numbers, they are naturally sorted, so that the strings '1' '5' and '12' would be sorted like 1, 5, 12.
|
||||||
|
|
||||||
@@ -658,7 +658,7 @@ Variable expansion
|
|||||||
|
|
||||||
One of the most important expansions in fish is the "variable expansion". This is the replacing of a dollar sign (``$``) followed by a variable name with the _value_ of that variable.
|
One of the most important expansions in fish is the "variable expansion". This is the replacing of a dollar sign (``$``) followed by a variable name with the _value_ of that variable.
|
||||||
|
|
||||||
In the simplest case, this is just something like::
|
A simple example::
|
||||||
|
|
||||||
echo $HOME
|
echo $HOME
|
||||||
|
|
||||||
@@ -788,11 +788,10 @@ Some more examples::
|
|||||||
# Output is 1 2 3
|
# Output is 1 2 3
|
||||||
|
|
||||||
echo $$var[2][3]
|
echo $$var[2][3]
|
||||||
# $var[1] is listtwo, third element of that is 6, output is 6
|
# $var[2] is listtwo, third element of that is 6, output is 6
|
||||||
|
|
||||||
echo $$var[..][2]
|
echo $$var[..][2]
|
||||||
# The second element of every variable, so output is
|
# The second element of every variable, so output is 2 5
|
||||||
# 2 5
|
|
||||||
|
|
||||||
Variables as command
|
Variables as command
|
||||||
''''''''''''''''''''
|
''''''''''''''''''''
|
||||||
@@ -859,18 +858,18 @@ Examples::
|
|||||||
# Set ``$data`` to the contents of data, splitting on NUL-bytes.
|
# Set ``$data`` to the contents of data, splitting on NUL-bytes.
|
||||||
set data (cat data | string split0)
|
set data (cat data | string split0)
|
||||||
|
|
||||||
Sometimes you want to pass the output of a command to another command that only accepts files. If it's just one file, you can usually just pass it via a pipe, like::
|
Sometimes you want to pass the output of a command to another command that only accepts files. If it's just one file, you can usually pass it via a pipe, like::
|
||||||
|
|
||||||
grep fish myanimallist1 | wc -l
|
grep fish myanimallist1 | wc -l
|
||||||
|
|
||||||
but if you need multiple or the command doesn't read from standard input, "process substitution" is useful. Other shells allow this via ``foo <(bar) <(baz)``, and fish uses the :doc:`psub <cmds/psub>` command::
|
but if you need multiple or the command doesn't read from standard input, "process substitution" is useful. Other shells allow this via ``foo <(bar) <(baz)``, and fish uses the :doc:`psub <cmds/psub>` command::
|
||||||
|
|
||||||
# Compare just the lines containing "fish" in two files:
|
# Compare only the lines containing "fish" in two files:
|
||||||
diff -u (grep fish myanimallist1 | psub) (grep fish myanimallist2 | psub)
|
diff -u (grep fish myanimallist1 | psub) (grep fish myanimallist2 | psub)
|
||||||
|
|
||||||
This creates a temporary file, stores the output of the command in that file and prints the filename, so it is given to the outer command.
|
This creates a temporary file, stores the output of the command in that file and prints the filename, so it is given to the outer command.
|
||||||
|
|
||||||
Fish has a default limit of 100 MiB on the data it will read in a command substitution. If that limit is reached the command (all of it, not just the command substitution - the outer command won't be executed at all) fails and ``$status`` is set to 122. This is so command substitutions can't cause the system to go out of memory, because typically your operating system has a much lower limit, so reading more than that would be useless and harmful. This limit can be adjusted with the ``fish_read_limit`` variable (`0` meaning no limit). This limit also affects the :doc:`read <cmds/read>` command.
|
Fish has a default limit of 1 GiB on the data it will read in a command substitution. If that limit is reached the command (all of it, not just the command substitution - the outer command won't be executed at all) fails and ``$status`` is set to 122. This is so command substitutions can't cause the system to go out of memory, because typically your operating system has a much lower limit, so reading more than that would be useless and harmful. This limit can be adjusted with the ``fish_read_limit`` variable (`0` meaning no limit). This limit also affects the :doc:`read <cmds/read>` command.
|
||||||
|
|
||||||
.. [#] One exception: Setting ``$IFS`` to empty will disable line splitting. This is deprecated, use :doc:`string split <cmds/string-split>` instead.
|
.. [#] One exception: Setting ``$IFS`` to empty will disable line splitting. This is deprecated, use :doc:`string split <cmds/string-split>` instead.
|
||||||
|
|
||||||
@@ -909,7 +908,7 @@ If there is no "," or variable expansion between the curly braces, they will not
|
|||||||
If after expansion there is nothing between the braces, the argument will be removed (see :ref:`the Combining Lists <cartesian-product>` section)::
|
If after expansion there is nothing between the braces, the argument will be removed (see :ref:`the Combining Lists <cartesian-product>` section)::
|
||||||
|
|
||||||
> echo foo-{$undefinedvar}
|
> echo foo-{$undefinedvar}
|
||||||
# Output is an empty line, just like a bare `echo`.
|
# Output is an empty line, like a bare `echo`.
|
||||||
|
|
||||||
If there is nothing between a brace and a comma or two commas, it's interpreted as an empty element::
|
If there is nothing between a brace and a comma or two commas, it's interpreted as an empty element::
|
||||||
|
|
||||||
@@ -1326,7 +1325,7 @@ To see universal variables in action, start two fish sessions side by side, and
|
|||||||
|
|
||||||
:ref:`Universal variables <variables-universal>` are stored in the file ``.config/fish/fish_variables``. Do not edit this file directly, as your edits may be overwritten. Edit the variables through fish scripts or by using fish interactively instead.
|
:ref:`Universal variables <variables-universal>` are stored in the file ``.config/fish/fish_variables``. Do not edit this file directly, as your edits may be overwritten. Edit the variables through fish scripts or by using fish interactively instead.
|
||||||
|
|
||||||
Do not append to universal variables in :ref:`config.fish <configuration>`, because these variables will then get longer with each new shell instance. Instead, simply set them once at the command line.
|
Do not append to universal variables in :ref:`config.fish <configuration>`, because these variables will then get longer with each new shell instance. Instead, set them once at the command line.
|
||||||
|
|
||||||
.. _variables-export:
|
.. _variables-export:
|
||||||
|
|
||||||
@@ -1369,7 +1368,7 @@ To access one element of a list, use the index of the element inside of square b
|
|||||||
|
|
||||||
echo $PATH[3]
|
echo $PATH[3]
|
||||||
|
|
||||||
List indices start at 1 in fish, not 0 like in other languages. This is because it requires less subtracting of 1 and many common Unix tools like ``seq`` work better with it (``seq 5`` prints 1 to 5, not 0 to 5). An invalid index is silently ignored resulting in no value (not even an empty string, just no argument at all).
|
List indices start at 1 in fish, not 0 like in other languages. This is because it requires less subtracting of 1 and many common Unix tools like ``seq`` work better with it (``seq 5`` prints 1 to 5, not 0 to 5). An invalid index is silently ignored resulting in no value (not even an empty string, no argument at all).
|
||||||
|
|
||||||
If you don't use any brackets, all the elements of the list will be passed to the command as separate items. This means you can iterate over a list with ``for``::
|
If you don't use any brackets, all the elements of the list will be passed to the command as separate items. This means you can iterate over a list with ``for``::
|
||||||
|
|
||||||
@@ -1379,7 +1378,7 @@ If you don't use any brackets, all the elements of the list will be passed to th
|
|||||||
|
|
||||||
This goes over every directory in :envvar:`PATH` separately and prints a line saying it is in the path.
|
This goes over every directory in :envvar:`PATH` separately and prints a line saying it is in the path.
|
||||||
|
|
||||||
To create a variable ``smurf``, containing the items ``blue`` and ``small``, simply write::
|
To create a variable ``smurf``, containing the items ``blue`` and ``small``, write::
|
||||||
|
|
||||||
set smurf blue small
|
set smurf blue small
|
||||||
|
|
||||||
@@ -1441,7 +1440,7 @@ Lists can be inspected with the :doc:`count <cmds/count>` or the :doc:`contains
|
|||||||
> contains -i blue $smurf
|
> contains -i blue $smurf
|
||||||
1
|
1
|
||||||
|
|
||||||
A nice thing about lists is that they are passed to commands one element as one argument, so once you've set your list, you can just pass it::
|
A nice thing about lists is that they are passed to commands one element as one argument, so once you've set your list, you can pass it::
|
||||||
|
|
||||||
set -l grep_args -r "my string"
|
set -l grep_args -r "my string"
|
||||||
grep $grep_args . # will run the same as `grep -r "my string"` .
|
grep $grep_args . # will run the same as `grep -r "my string"` .
|
||||||
@@ -1566,13 +1565,12 @@ You can change the settings of fish by changing the values of certain variables.
|
|||||||
|
|
||||||
.. envvar:: fish_term24bit
|
.. envvar:: fish_term24bit
|
||||||
|
|
||||||
If this is set to 1, fish will assume the terminal understands 24-bit RGB color sequences, and won't translate them to the 256 or 16 color palette.
|
If this is set to 0, fish will not output 24-bit RGB true-color sequences but the nearest color on the 256 color palette (or the 16 color palette, if :envvar:`fish_term256` is 0).
|
||||||
This is often detected automatically.
|
|
||||||
|
|
||||||
.. envvar:: fish_term256
|
.. envvar:: fish_term256
|
||||||
|
|
||||||
If this is set to 1, fish will assume the terminal understands 256 colors, and won't translate matching colors down to the 16 color palette.
|
If this is set to 0 and :envvar:`fish_term24bit` is 0, translate RGB colors down to the 16 color palette.
|
||||||
This is usually autodetected.
|
Also, if this is set to 0, :doc:`set_color <cmds/set_color>`/` commands such as ``set_color ff0000 red`` will prefer the named color.
|
||||||
|
|
||||||
.. envvar:: fish_ambiguous_width
|
.. envvar:: fish_ambiguous_width
|
||||||
|
|
||||||
@@ -1586,6 +1584,10 @@ You can change the settings of fish by changing the values of certain variables.
|
|||||||
|
|
||||||
controls if :ref:`autosuggestions` are enabled. Set it to 0 to disable, anything else to enable. By default they are on.
|
controls if :ref:`autosuggestions` are enabled. Set it to 0 to disable, anything else to enable. By default they are on.
|
||||||
|
|
||||||
|
.. envvar:: fish_transient_prompt
|
||||||
|
|
||||||
|
If this is set to 1, fish will redraw prompts with a ``--final-rendering`` argument before running a commandline, allowing you to change it before pushing it to the scrollback. This enables :ref:`transient prompts <transient-prompt>`.
|
||||||
|
|
||||||
.. envvar:: fish_handle_reflow
|
.. envvar:: fish_handle_reflow
|
||||||
|
|
||||||
determines whether fish should try to repaint the commandline when the terminal resizes. In terminals that reflow text this should be disabled. Set it to 1 to enable, anything else to disable.
|
determines whether fish should try to repaint the commandline when the terminal resizes. In terminals that reflow text this should be disabled. Set it to 1 to enable, anything else to disable.
|
||||||
@@ -1715,7 +1717,7 @@ Fish also provides additional information through the values of certain environm
|
|||||||
|
|
||||||
.. ENVVAR:: SHLVL
|
.. ENVVAR:: SHLVL
|
||||||
|
|
||||||
the level of nesting of shells. Fish increments this in interactive shells, otherwise it simply passes it along.
|
the level of nesting of shells. Fish increments this in interactive shells, otherwise it only passes it along.
|
||||||
|
|
||||||
.. envvar:: status
|
.. envvar:: status
|
||||||
|
|
||||||
@@ -1725,12 +1727,6 @@ Fish also provides additional information through the values of certain environm
|
|||||||
|
|
||||||
the "generation" count of ``$status``. This will be incremented only when the previous command produced an explicit status. (For example, background jobs will not increment this).
|
the "generation" count of ``$status``. This will be incremented only when the previous command produced an explicit status. (For example, background jobs will not increment this).
|
||||||
|
|
||||||
.. ENVVAR:: TERM
|
|
||||||
|
|
||||||
the type of the current terminal. When fish tries to determine how the terminal works - how many colors it supports, what sequences it sends for keys and other things - it looks at this variable and the corresponding information in the terminfo database (see ``man terminfo``).
|
|
||||||
|
|
||||||
Note: Typically this should not be changed as the terminal sets it to the correct value.
|
|
||||||
|
|
||||||
.. ENVVAR:: USER
|
.. ENVVAR:: USER
|
||||||
|
|
||||||
the current username. This variable can be changed.
|
the current username. This variable can be changed.
|
||||||
@@ -1954,7 +1950,7 @@ Let's make up an example. This function will :ref:`glob <expand-wildcard>` the f
|
|||||||
printf '%s\n' $files
|
printf '%s\n' $files
|
||||||
end
|
end
|
||||||
|
|
||||||
If you run this as ``show_files /``, it will most likely ask you until you press Y/y or N/n. If you run this as ``show_files / | cat``, it will print the files without asking. If you run this as ``show_files .``, it might just print something without asking because there are fewer than five files.
|
If you run this as ``show_files /``, it will most likely ask you until you press Y/y or N/n. If you run this as ``show_files / | cat``, it will print the files without asking. If you run this as ``show_files .``, it might print something without asking because there are fewer than five files.
|
||||||
|
|
||||||
.. _identifiers:
|
.. _identifiers:
|
||||||
|
|
||||||
@@ -2022,19 +2018,19 @@ You can see the current list of features via ``status features``::
|
|||||||
qmark-noglob on 3.0 ? no longer globs
|
qmark-noglob on 3.0 ? no longer globs
|
||||||
regex-easyesc on 3.1 string replace -r needs fewer \\'s
|
regex-easyesc on 3.1 string replace -r needs fewer \\'s
|
||||||
ampersand-nobg-in-token on 3.4 & only backgrounds if followed by a separating character
|
ampersand-nobg-in-token on 3.4 & only backgrounds if followed by a separating character
|
||||||
remove-percent-self off 3.8 %self is no longer expanded (use $fish_pid)
|
remove-percent-self off 4.0 %self is no longer expanded (use $fish_pid)
|
||||||
test-require-arg off 3.8 builtin test requires an argument
|
test-require-arg off 4.0 builtin test requires an argument
|
||||||
buffered-enter-noexec off 4.1 enter typed while executing will not execute
|
ignore-terminfo on 4.1 do not look up $TERM in terminfo database
|
||||||
|
|
||||||
Here is what they mean:
|
Here is what they mean:
|
||||||
|
|
||||||
- ``stderr-nocaret`` was introduced in fish 3.0 (and made the default in 3.3). It makes ``^`` an ordinary character instead of denoting an stderr redirection, to make dealing with quoting and such easier. Use ``2>`` instead. This can no longer be turned off since fish 3.5. The flag can still be tested for compatibility, but a ``no-stderr-nocaret`` value will simply be ignored.
|
- ``stderr-nocaret`` was introduced in fish 3.0 and cannot be turned off since fish 3.5. It can still be tested for compatibility, but a ``no-stderr-nocaret`` value will be ignored. The flag made ``^`` an ordinary character instead of denoting an stderr redirection. Use ``2>`` instead.
|
||||||
- ``qmark-noglob`` was also introduced in fish 3.0 (and made the default in 3.8). It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``.
|
- ``qmark-noglob`` was also introduced in fish 3.0 (and made the default in 4.0). It makes ``?`` an ordinary character instead of a single-character glob. Use a ``*`` instead (which will match multiple characters) or find other ways to match files like ``find``.
|
||||||
- ``regex-easyesc`` was introduced in 3.1. It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere.
|
- ``regex-easyesc`` was introduced in 3.1 (and made the default in 3.5). It makes it so the replacement expression in ``string replace -r`` does one fewer round of escaping. Before, to escape a backslash you would have to use ``string replace -ra '([ab])' '\\\\\\\\$1'``. After, just ``'\\\\$1'`` is enough. Check your ``string replace`` calls if you use this anywhere.
|
||||||
- ``ampersand-nobg-in-token`` was introduced in fish 3.4. It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.
|
- ``ampersand-nobg-in-token`` was introduced in fish 3.4 (and made the default in 3.5). It makes it so a ``&`` i no longer interpreted as the backgrounding operator in the middle of a token, so dealing with URLs becomes easier. Either put spaces or a semicolon after the ``&``. This is recommended formatting anyway, and ``fish_indent`` will have done it for you already.
|
||||||
- ``remove-percent-self`` turns off the special ``%self`` expansion. It was introduced in 3.8. To get fish's pid, you can use the :envvar:`fish_pid` variable.
|
- ``remove-percent-self`` turns off the special ``%self`` expansion. It was introduced in 4.0. To get fish's pid, you can use the :envvar:`fish_pid` variable.
|
||||||
- ``test-require-arg`` removes :doc:`builtin test <cmds/test>`'s one-argument form (``test "string"``. It was introduced in 3.8. To test if a string is non-empty, use ``test -n "string"``. If disabled, any call to ``test`` that would change sends a :ref:`debug message <debugging-fish>` of category "deprecated-test", so starting fish with ``fish --debug=deprecated-test`` can be used to find offending calls.
|
- ``test-require-arg`` removes :doc:`builtin test <cmds/test>`'s one-argument form (``test "string"``. It was introduced in 4.0. To test if a string is non-empty, use ``test -n "string"``. If disabled, any call to ``test`` that would change sends a :ref:`debug message <debugging-fish>` of category "deprecated-test", so starting fish with ``fish --debug=deprecated-test`` can be used to find offending calls.
|
||||||
- ``buffered-enter-noexec`` typing enter during command execution will insert a newline into the next commandline instead of executing it.
|
- ``ignore-terminfo`` disables lookup of $TERM in the terminfo database. Use ``no-ignore-terminfo`` to turn it back on.
|
||||||
|
|
||||||
|
|
||||||
These changes are introduced off by default. They can be enabled on a per session basis::
|
These changes are introduced off by default. They can be enabled on a per session basis::
|
||||||
@@ -2055,12 +2051,6 @@ Prefixing a feature with ``no-`` turns it off instead. E.g. to reenable the ``?`
|
|||||||
|
|
||||||
set -Ua fish_features no-qmark-noglob
|
set -Ua fish_features no-qmark-noglob
|
||||||
|
|
||||||
Currently, the following features are enabled by default:
|
|
||||||
|
|
||||||
- stderr-nocaret - ``^`` no longer redirects stderr, use ``2>``. Enabled by default in fish 3.3.0. No longer changeable since fish 3.5.0.
|
|
||||||
- regex-easyesc - ``string replace -r`` requires fewer backslashes in the replacement part. Enabled by default in fish 3.5.0.
|
|
||||||
- ampersand-nobg-in-token - ``&`` in the middle of a word is a normal character instead of backgrounding. Enabled by default in fish 3.5.0.
|
|
||||||
|
|
||||||
.. _event:
|
.. _event:
|
||||||
|
|
||||||
Event handlers
|
Event handlers
|
||||||
@@ -2124,12 +2114,14 @@ For more information on how to define new event handlers, see the documentation
|
|||||||
Debugging fish scripts
|
Debugging fish scripts
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Fish includes basic built-in debugging facilities that allow you to stop execution of a script at an arbitrary point. When this happens you are presented with an interactive prompt where you can execute any fish command to inspect or change state (there are no debug commands as such). For example, you can check or change the value of any variables using :doc:`printf <cmds/printf>` and :doc:`set <cmds/set>`. As another example, you can run :doc:`status print-stack-trace <cmds/status>` to see how the current breakpoint was reached. To resume normal execution of the script, simply type :doc:`exit <cmds/exit>` or :kbd:`ctrl-d`.
|
Fish includes basic built-in debugging facilities that allow you to stop execution of a script at an arbitrary point. When this happens you are presented with an interactive prompt where you can execute any fish command to inspect or change state (there are no debug commands as such). For example, you can check or change the value of any variables using :doc:`printf <cmds/printf>` and :doc:`set <cmds/set>`. As another example, you can run :doc:`status print-stack-trace <cmds/status>` to see how the current breakpoint was reached. To resume normal execution of the script, type :doc:`exit <cmds/exit>` or :kbd:`ctrl-d`.
|
||||||
|
|
||||||
To start a debug session simply insert the :doc:`builtin command <cmds/breakpoint>` ``breakpoint`` at the point in a function or script where you wish to gain control, then run the function or script. Also, the default action of the ``TRAP`` signal is to call this builtin, meaning a running script can be actively debugged by sending it the ``TRAP`` signal (``kill -s TRAP <PID>``). There is limited support for interactively setting or modifying breakpoints from this debug prompt: it is possible to insert new breakpoints in (or remove old ones from) other functions by using the ``funced`` function to edit the definition of a function, but it is not possible to add or remove a breakpoint from the function/script currently loaded and being executed.
|
To start a debug session insert the :doc:`builtin command <cmds/breakpoint>` ``breakpoint`` at the point in a function or script where you wish to gain control, then run the function or script. Also, the default action of the ``TRAP`` signal is to call this builtin, meaning a running script can be actively debugged by sending it the ``TRAP`` signal (``kill -s TRAP <PID>``). There is limited support for interactively setting or modifying breakpoints from this debug prompt: it is possible to insert new breakpoints in (or remove old ones from) other functions by using the ``funced`` function to edit the definition of a function, but it is not possible to add or remove a breakpoint from the function/script currently loaded and being executed.
|
||||||
|
|
||||||
Another way to debug script issues is to set the :envvar:`fish_trace` variable, e.g. ``fish_trace=1 fish_prompt`` to see which commands fish executes when running the :doc:`fish_prompt <cmds/fish_prompt>` function.
|
Another way to debug script issues is to set the :envvar:`fish_trace` variable, e.g. ``fish_trace=1 fish_prompt`` to see which commands fish executes when running the :doc:`fish_prompt <cmds/fish_prompt>` function.
|
||||||
|
|
||||||
|
.. _profiling:
|
||||||
|
|
||||||
Profiling fish scripts
|
Profiling fish scripts
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|||||||
@@ -148,10 +148,51 @@ And it looks like:
|
|||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
:class: highlight
|
:class: highlight
|
||||||
|
|
||||||
|
:green:`~/M/L/Oneknowing`>false
|
||||||
:green:`~/M/L/Oneknowing`\ :red:`[1]`>_
|
:green:`~/M/L/Oneknowing`\ :red:`[1]`>_
|
||||||
|
|
||||||
after we run ``false`` (which returns 1).
|
after we run ``false`` (which returns 1).
|
||||||
|
|
||||||
|
.. _transient-prompt:
|
||||||
|
|
||||||
|
Transient prompt
|
||||||
|
----------------
|
||||||
|
|
||||||
|
To enable transient prompt functionality, set the :envvar:`fish_transient_prompt` variable to 1::
|
||||||
|
|
||||||
|
set -g fish_transient_prompt 1
|
||||||
|
|
||||||
|
With this set, fish re-runs prompt functions with a ``--final-rendering`` argument before running a commandline.
|
||||||
|
So you can use it to declutter your old prompts. For example if you want to see only the current directory name when you scroll up::
|
||||||
|
|
||||||
|
function fish_prompt
|
||||||
|
set -l last_status $status
|
||||||
|
set -l stat
|
||||||
|
set -l pwd
|
||||||
|
# Check if it's a transient or final prompt
|
||||||
|
if contains -- --final-rendering $argv
|
||||||
|
set pwd (path basename $PWD)
|
||||||
|
else
|
||||||
|
set pwd (prompt_pwd)
|
||||||
|
# Prompt status only if it's not 0
|
||||||
|
if test $last_status -ne 0
|
||||||
|
set stat (set_color red)"[$last_status]"(set_color normal)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
string join '' -- (set_color green) $pwd (set_color normal) $stat '>'
|
||||||
|
end
|
||||||
|
|
||||||
|
Now running two commands in the same directory could result in this screen:
|
||||||
|
|
||||||
|
.. role:: green
|
||||||
|
.. role:: red
|
||||||
|
.. parsed-literal::
|
||||||
|
:class: highlight
|
||||||
|
|
||||||
|
:green:`Oneknowing`>false
|
||||||
|
:green:`~/M/L/Oneknowing`\ :red:`[1]`>_
|
||||||
|
|
||||||
Save the prompt
|
Save the prompt
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|||||||
274
doc_src/terminal-compatibility.rst
Normal file
274
doc_src/terminal-compatibility.rst
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
Terminal Compatibility
|
||||||
|
======================
|
||||||
|
|
||||||
|
fish writes various control sequences to the terminal.
|
||||||
|
Some must be implemented to enable basic functionality,
|
||||||
|
while others enable optional features and may be ignored by the terminal.
|
||||||
|
|
||||||
|
The terminal must be able to parse Control Sequence Introducer (CSI) commands, Operating System Commands (OSC) and optionally Device Control Strings (DCS).
|
||||||
|
These are defined by ECMA-48.
|
||||||
|
If a valid CSI, OSC or DCS sequence does not represent a command implemented by the terminal, the terminal must ignore it.
|
||||||
|
|
||||||
|
Control sequences are denoted in a fish-like syntax.
|
||||||
|
Special characters other than ``\`` are not escaped.
|
||||||
|
Spaces are only added for readability and are not part of the sequence.
|
||||||
|
Placeholders are written as ``<Ps>`` for a number or ``<Pt>`` for an arbitrary printable string.
|
||||||
|
|
||||||
|
**NOTE:** fish does not rely on your system's terminfo database.
|
||||||
|
In this document, terminfo (TI) codes are included for reference only.
|
||||||
|
|
||||||
|
Required Commands
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:widths: auto
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Sequence
|
||||||
|
- TI
|
||||||
|
- Description
|
||||||
|
- Origin
|
||||||
|
* - ``\r``
|
||||||
|
- n/a
|
||||||
|
- Move cursor to the beginning of the line
|
||||||
|
-
|
||||||
|
* - ``\n``
|
||||||
|
- cud1
|
||||||
|
- Move cursor down one line.
|
||||||
|
-
|
||||||
|
* - ``\e[ Ps A``
|
||||||
|
- cuu
|
||||||
|
- Move cursor up Ps columns, or one column if no parameter.
|
||||||
|
- VT100
|
||||||
|
* - ``\e[ Ps C``
|
||||||
|
- cuf
|
||||||
|
- Move cursor to the right Ps columns, or one column if no parameter.
|
||||||
|
- VT100
|
||||||
|
* - ``\x08``
|
||||||
|
- cub1
|
||||||
|
- Move cursor one column to the left.
|
||||||
|
- VT100
|
||||||
|
* - ``\e[ Ps D``
|
||||||
|
- cub
|
||||||
|
- Move cursor to the left Ps times.
|
||||||
|
- VT100
|
||||||
|
* - ``\e[H``
|
||||||
|
- cup
|
||||||
|
- Set cursor position (no parameters means: move to row 1, column 1).
|
||||||
|
- VT100
|
||||||
|
* - ``\e[K``
|
||||||
|
- el
|
||||||
|
- Clear to end of line.
|
||||||
|
- VT100
|
||||||
|
* - ``\e[J``
|
||||||
|
- ed
|
||||||
|
- Clear to the end of screen.
|
||||||
|
- VT100
|
||||||
|
* - ``\e[2J``
|
||||||
|
- clear
|
||||||
|
- Clear the screen.
|
||||||
|
- VT100
|
||||||
|
* - ``\e[0c``
|
||||||
|
-
|
||||||
|
- Request primary device attribute.
|
||||||
|
The terminal must respond with a CSI command that starts with the ``?`` parameter byte (so a sequence starting with ``\e[?``) and has ``c`` as final byte.
|
||||||
|
- VT100
|
||||||
|
* - n/a
|
||||||
|
- am
|
||||||
|
- Soft wrap text at screen width.
|
||||||
|
-
|
||||||
|
* - n/a
|
||||||
|
- xenl
|
||||||
|
- Printing to the last column does not move the cursor to the next line.
|
||||||
|
Verify this by running ``printf %0"$COLUMNS"d 0; sleep 3``
|
||||||
|
-
|
||||||
|
|
||||||
|
Optional Commands
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:widths: auto
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Sequence
|
||||||
|
- TI
|
||||||
|
- Description
|
||||||
|
- Origin
|
||||||
|
* - ``\t``
|
||||||
|
- it
|
||||||
|
- Move the cursor to the next tab stop (à 8 columns).
|
||||||
|
This is mainly relevant if your prompt includes tabs.
|
||||||
|
-
|
||||||
|
|
||||||
|
* - ``\e[m``
|
||||||
|
- sgr0
|
||||||
|
- Turn off bold/dim/italic/underline/reverse attribute modes and select default colors.
|
||||||
|
-
|
||||||
|
* - ``\e[1m``
|
||||||
|
- bold
|
||||||
|
- Enter bold mode.
|
||||||
|
-
|
||||||
|
* - ``\e[2m``
|
||||||
|
- dim
|
||||||
|
- Enter dim mode.
|
||||||
|
-
|
||||||
|
* - ``\e[3m``
|
||||||
|
- sitm
|
||||||
|
- Enter italic mode.
|
||||||
|
-
|
||||||
|
* - ``\e[4m``
|
||||||
|
- smul
|
||||||
|
- Enter underline mode.
|
||||||
|
-
|
||||||
|
* - ``\e[4:3m``
|
||||||
|
- Su
|
||||||
|
- Enter curly underline mode.
|
||||||
|
- kitty
|
||||||
|
* - ``\e[7m``
|
||||||
|
- rev
|
||||||
|
- Enter reverse video mode (swap foreground and background colors).
|
||||||
|
-
|
||||||
|
* - ``\e[23m``
|
||||||
|
- ritm
|
||||||
|
- Exit italic mode.
|
||||||
|
-
|
||||||
|
* - ``\e[24m``
|
||||||
|
- rmul
|
||||||
|
- Exit underline mode.
|
||||||
|
-
|
||||||
|
* - ``\e[38;5; Ps m``
|
||||||
|
- setaf
|
||||||
|
- Select foreground color Ps from the 256-color-palette.
|
||||||
|
-
|
||||||
|
* - ``\e[48;5; Ps m``
|
||||||
|
- setab
|
||||||
|
- Select background color Ps from the 256-color-palette.
|
||||||
|
-
|
||||||
|
* - ``\e[58:5: Ps m`` (note: colons not semicolons)
|
||||||
|
- Su
|
||||||
|
- Select underline color Ps from the 256-color-palette.
|
||||||
|
- kitty
|
||||||
|
* - ``\e[ Ps m``
|
||||||
|
- setaf
|
||||||
|
setab
|
||||||
|
- Select foreground/background color. This uses a color in the aforementioned 256-color-palette, based on the range that contains the parameter:
|
||||||
|
30-37 maps to foreground 0-7,
|
||||||
|
40-47 maps to background 0-7,
|
||||||
|
90-97 maps to foreground 8-15 and
|
||||||
|
100-107 maps to background 8-15.
|
||||||
|
-
|
||||||
|
* - ``\e[38;2; Ps ; Ps ; Ps m``
|
||||||
|
-
|
||||||
|
- Select foreground color from 24-bit RGB colors.
|
||||||
|
-
|
||||||
|
* - ``\e[48;2; Ps ; Ps ; Ps m``
|
||||||
|
-
|
||||||
|
- Select background color from 24-bit RGB colors.
|
||||||
|
-
|
||||||
|
* - ``\e[49m``
|
||||||
|
-
|
||||||
|
- Reset background color to the terminal's default.
|
||||||
|
-
|
||||||
|
* - ``\e[58:2:: Ps : Ps : Ps m`` (note: colons not semicolons)
|
||||||
|
- Su
|
||||||
|
- Select underline color from 24-bit RGB colors.
|
||||||
|
- kitty
|
||||||
|
* - ``\e[59m``
|
||||||
|
- Su
|
||||||
|
- Reset underline color to the default (follow the foreground color).
|
||||||
|
- kitty
|
||||||
|
* - ``\e[ Ps S``
|
||||||
|
- indn
|
||||||
|
- Scroll forward Ps lines.
|
||||||
|
-
|
||||||
|
* - ``\e[= Ps u``, ``\e[? Ps u``
|
||||||
|
- n/a
|
||||||
|
- Enable the kitty keyboard protocol.
|
||||||
|
- kitty
|
||||||
|
* - ``\e[6n``
|
||||||
|
- n/a
|
||||||
|
- Request cursor position report.
|
||||||
|
- VT100
|
||||||
|
* - ``\e[ \x20 q``
|
||||||
|
- Se
|
||||||
|
- Reset cursor style to the terminal's default. This is not used as of today but may be
|
||||||
|
in future.
|
||||||
|
- VT520
|
||||||
|
* - ``\e[ Ps \x20 q``
|
||||||
|
- Ss
|
||||||
|
- Set cursor style (DECSCUSR); Ps is 2, 4 or 6 for block, underscore or line shape.
|
||||||
|
- VT520
|
||||||
|
* - ``\e[ Ps q``
|
||||||
|
- n/a
|
||||||
|
- Request terminal name and version (XTVERSION).
|
||||||
|
- XTerm
|
||||||
|
* - ``\e[?25h``
|
||||||
|
- cvvis
|
||||||
|
- Enable cursor visibility (DECTCEM).
|
||||||
|
- VT220
|
||||||
|
* - ``\e[?1000l``
|
||||||
|
- n/a
|
||||||
|
- Disable mouse reporting.
|
||||||
|
- XTerm
|
||||||
|
* - ``\e[?1004h``
|
||||||
|
- n/a
|
||||||
|
- Enable focus reporting.
|
||||||
|
-
|
||||||
|
* - ``\e[?1004l``
|
||||||
|
- n/a
|
||||||
|
- Disable focus reporting.
|
||||||
|
-
|
||||||
|
* - ``\e[?1049h``
|
||||||
|
- n/a
|
||||||
|
- Enable alternate screen buffer.
|
||||||
|
- XTerm
|
||||||
|
* - ``\e[?1049l``
|
||||||
|
- n/a
|
||||||
|
- Disable alternate screen buffer.
|
||||||
|
- XTerm
|
||||||
|
* - ``\e[?2004h``
|
||||||
|
-
|
||||||
|
- Enable bracketed paste.
|
||||||
|
- XTerm
|
||||||
|
* - ``\e[?2004l``
|
||||||
|
-
|
||||||
|
- Disable bracketed paste.
|
||||||
|
- XTerm
|
||||||
|
* - ``\e]0; Pt \x07``
|
||||||
|
- ts
|
||||||
|
- Set window title (OSC 0).
|
||||||
|
- XTerm
|
||||||
|
* - ``\e]7;file:// Pt / Pt \x07``
|
||||||
|
-
|
||||||
|
- Report working directory (OSC 7).
|
||||||
|
Since the terminal may be running on a different system than a (remote) shell,
|
||||||
|
the hostname (first parameter) will *not* be ``localhost``.
|
||||||
|
- iTerm2
|
||||||
|
* - ``\e]8;; Pt \e\\``
|
||||||
|
-
|
||||||
|
- Create a `hyperlink (OSC 8) <https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda>`_.
|
||||||
|
This is used in fish's man pages.
|
||||||
|
- GNOME Terminal
|
||||||
|
* - ``\e]52;c; Pt \x07``
|
||||||
|
-
|
||||||
|
- Copy to clipboard (OSC 52).
|
||||||
|
- XTerm
|
||||||
|
* - .. _click-events:
|
||||||
|
|
||||||
|
``\e]133;A; click_events=1\x07``
|
||||||
|
-
|
||||||
|
- Mark prompt start (OSC 133), with kitty's ``click_events`` extension.
|
||||||
|
- FinalTerm, kitty
|
||||||
|
* - ``\e]133;C; cmdline_url= Pt \x07``
|
||||||
|
-
|
||||||
|
- Mark command start (OSC 133), with kitty's ``cmdline_url`` extension whose parameter is the URL-encoded command line.
|
||||||
|
- FinalTerm, kitty
|
||||||
|
* - ``\e]133;D; Ps \x07``
|
||||||
|
-
|
||||||
|
- Mark command end (OSC 133); Ps is the exit status.
|
||||||
|
- FinalTerm
|
||||||
|
* - ``\eP+q Pt \e\\``
|
||||||
|
-
|
||||||
|
- Request terminfo capability (XTGETTCAP). The parameter is the capability's hex-encoded terminfo code.
|
||||||
|
Specifically, fish asks for the ``indn`` string capability. At the time of writing string capabilities are supported by kitty and foot.
|
||||||
|
- XTerm, kitty, foot
|
||||||
@@ -650,7 +650,9 @@ This prompt would look like:
|
|||||||
:red:`/home/tutorial >` _
|
:red:`/home/tutorial >` _
|
||||||
|
|
||||||
|
|
||||||
You can choose among some sample prompts by running ``fish_config`` for a web UI or ``fish_config prompt`` for a simpler version inside your terminal.
|
See also :doc:`Writing your own prompt <prompt>`.
|
||||||
|
|
||||||
|
You can choose among sample prompts by running ``fish_config`` for a web UI or ``fish_config prompt`` for a simpler version inside your terminal.
|
||||||
|
|
||||||
$PATH
|
$PATH
|
||||||
-----
|
-----
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# This script is copied into the root directory of our Docker tests.
|
# This script is copied into the root directory of our Docker tests.
|
||||||
# It is the entry point for running Docker-based tests.
|
# It is the entry point for running Docker-based tests.
|
||||||
@@ -10,10 +12,10 @@ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug /fish-source "$@"
|
|||||||
# Spawn a shell if FISH_RUN_SHELL_BEFORE_TESTS is set.
|
# Spawn a shell if FISH_RUN_SHELL_BEFORE_TESTS is set.
|
||||||
if test -n "$FISH_RUN_SHELL_BEFORE_TESTS"
|
if test -n "$FISH_RUN_SHELL_BEFORE_TESTS"
|
||||||
then
|
then
|
||||||
bash -i || exit
|
bash -i
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ninja && ninja fish_run_tests
|
(set +e; ninja && ninja fish_run_tests)
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
# Drop the user into a shell if FISH_RUN_SHELL_AFTER_TESTS is set.
|
# Drop the user into a shell if FISH_RUN_SHELL_AFTER_TESTS is set.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
Usage: $(basename $0) [--shell-before] [--shell-after] DOCKERFILE
|
Usage: $(basename "$0") [--shell-before] [--shell-after] DOCKERFILE
|
||||||
Options:
|
Options:
|
||||||
--shell-before Before the tests start, run a bash shell
|
--shell-before Before the tests start, run a bash shell
|
||||||
--shell-after After the tests end, run a bash shell
|
--shell-after After the tests end, run a bash shell
|
||||||
@@ -18,7 +18,7 @@ export DOCKER_BUILDKIT=1
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Get fish source directory.
|
# Get fish source directory.
|
||||||
FISH_SRC_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )"/.. >/dev/null && pwd)
|
FISH_SRC_DIR=$(cd "$( dirname "$0" )"/.. >/dev/null && pwd)
|
||||||
|
|
||||||
# Parse args.
|
# Parse args.
|
||||||
while [ $# -gt 1 ]; do
|
while [ $# -gt 1 ]; do
|
||||||
@@ -36,7 +36,7 @@ while [ $# -gt 1 ]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
DOCKERFILE=${@:$OPTIND:1}
|
DOCKERFILE="$1"
|
||||||
test -n "$DOCKERFILE" || usage
|
test -n "$DOCKERFILE" || usage
|
||||||
|
|
||||||
# Construct a docker image.
|
# Construct a docker image.
|
||||||
@@ -47,6 +47,7 @@ docker build \
|
|||||||
"$FISH_SRC_DIR"/docker/context/
|
"$FISH_SRC_DIR"/docker/context/
|
||||||
|
|
||||||
# Run tests in it, allowing them to fail without failing this script.
|
# Run tests in it, allowing them to fail without failing this script.
|
||||||
|
# shellcheck disable=SC2086 # $DOCKER_EXTRA_ARGS should have globbing and splitting applied.
|
||||||
docker run -it \
|
docker run -it \
|
||||||
--mount type=bind,source="$FISH_SRC_DIR",target=/fish-source,readonly \
|
--mount type=bind,source="$FISH_SRC_DIR",target=/fish-source,readonly \
|
||||||
$DOCKER_EXTRA_ARGS \
|
$DOCKER_EXTRA_ARGS \
|
||||||
|
|||||||
12
fish.desktop
12
fish.desktop
@@ -1,12 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Type=Application
|
|
||||||
Terminal=true
|
|
||||||
# This file is for use in appimages, which rewrite the path.
|
|
||||||
# Other uses would have to replace these with the correct path.
|
|
||||||
Exec=fish
|
|
||||||
Name=fish
|
|
||||||
Comment=The user-friendly command line shell
|
|
||||||
Icon=fish
|
|
||||||
# "Shell" would be the proper category, but it's reserved so we can't use it.
|
|
||||||
Categories=ConsoleOnly;System;
|
|
||||||
@@ -17,7 +17,6 @@ BuildRequires: rust >= 1.70
|
|||||||
BuildRequires: cmake >= 3.15
|
BuildRequires: cmake >= 3.15
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: update-desktop-files
|
|
||||||
# for tests
|
# for tests
|
||||||
BuildRequires: groff
|
BuildRequires: groff
|
||||||
%else
|
%else
|
||||||
@@ -76,10 +75,6 @@ make %{?_smp_mflags}
|
|||||||
%make_install
|
%make_install
|
||||||
%endif
|
%endif
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
# OpenSUSE has strong opinions about categories which do not apply to other systems
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
%suse_update_desktop_file fish "System;TerminalEmulator"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# OpenSUSE does out-of-tree builds and defines __builddir
|
# OpenSUSE does out-of-tree builds and defines __builddir
|
||||||
@@ -130,7 +125,3 @@ fi
|
|||||||
|
|
||||||
# pkgconfig
|
# pkgconfig
|
||||||
%{_datadir}/pkgconfig/fish.pc
|
%{_datadir}/pkgconfig/fish.pc
|
||||||
|
|
||||||
# FreeDesktop entry
|
|
||||||
%{_datadir}/applications/fish.desktop
|
|
||||||
%{_datadir}/pixmaps/fish.png
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ set -e
|
|||||||
|
|
||||||
# Make sure we're run as root
|
# Make sure we're run as root
|
||||||
scriptname=$(basename "$0")
|
scriptname=$(basename "$0")
|
||||||
if [ "$UID" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo "${scriptname} must be run as root"
|
echo "${scriptname} must be run as root"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ fn to_arg(self) -> Arg<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> ToArg<'a> for &'a std::io::Error {
|
||||||
|
fn to_arg(self) -> Arg<'a> {
|
||||||
|
Arg::String(self.to_string())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a> ToArg<'a> for f32 {
|
impl<'a> ToArg<'a> for f32 {
|
||||||
fn to_arg(self) -> Arg<'a> {
|
fn to_arg(self) -> Arg<'a> {
|
||||||
Arg::Float(self.into())
|
Arg::Float(self.into())
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ pub fn round_to_fractional_digits(&mut self, desired_frac_digits: i32) {
|
|||||||
// Round up if necessary.
|
// Round up if necessary.
|
||||||
if self.should_round_up(last_digit_idx, remainder_to_round, mod_base) {
|
if self.should_round_up(last_digit_idx, remainder_to_round, mod_base) {
|
||||||
self[last_digit_idx] += mod_base;
|
self[last_digit_idx] += mod_base;
|
||||||
// Propogate carry.
|
// Propagate carry.
|
||||||
while self[last_digit_idx] >= DIGIT_BASE {
|
while self[last_digit_idx] >= DIGIT_BASE {
|
||||||
self[last_digit_idx] = 0;
|
self[last_digit_idx] = 0;
|
||||||
last_digit_idx -= 1;
|
last_digit_idx -= 1;
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ fn format_a(mut y: f64, params: FormatParams<'_, impl Write>) -> Result<usize, E
|
|||||||
|
|
||||||
// Compute the number of hex digits in the mantissa after the decimal.
|
// Compute the number of hex digits in the mantissa after the decimal.
|
||||||
// -1 for leading 1 bit (we are to the range [1, 2)), then divide by 4, rounding up.
|
// -1 for leading 1 bit (we are to the range [1, 2)), then divide by 4, rounding up.
|
||||||
|
#[allow(clippy::manual_div_ceil)]
|
||||||
const MANTISSA_HEX_DIGITS: usize = (MANTISSA_BITS - 1 + 3) / 4;
|
const MANTISSA_HEX_DIGITS: usize = (MANTISSA_BITS - 1 + 3) / 4;
|
||||||
if had_prec && prec < MANTISSA_HEX_DIGITS {
|
if had_prec && prec < MANTISSA_HEX_DIGITS {
|
||||||
// Decide how many least-significant bits to round off the mantissa.
|
// Decide how many least-significant bits to round off the mantissa.
|
||||||
|
|||||||
@@ -32,13 +32,12 @@ macro_rules! sprintf {
|
|||||||
// Write to a newly allocated String, and return it.
|
// Write to a newly allocated String, and return it.
|
||||||
// This panics if the format string or arguments are invalid.
|
// This panics if the format string or arguments are invalid.
|
||||||
(
|
(
|
||||||
$fmt:expr, // Format string, which should implement FormatString.
|
$fmt:expr // Format string, which should implement FormatString.
|
||||||
$($arg:expr),* // arguments
|
$(, $($arg:expr),*)? // arguments
|
||||||
$(,)? // optional trailing comma
|
|
||||||
) => {
|
) => {
|
||||||
{
|
{
|
||||||
let mut target = String::new();
|
let mut target = String::new();
|
||||||
$crate::sprintf!(=> &mut target, $fmt, $($arg),*);
|
$crate::sprintf!(=> &mut target, $fmt $(, $($arg),*)?);
|
||||||
target
|
target
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -47,9 +46,8 @@ macro_rules! sprintf {
|
|||||||
// The target should implement std::fmt::Write.
|
// The target should implement std::fmt::Write.
|
||||||
(
|
(
|
||||||
=> $target:expr, // target string
|
=> $target:expr, // target string
|
||||||
$fmt:expr, // format string
|
$fmt:expr // format string
|
||||||
$($arg:expr),* // arguments
|
$(, $($arg:expr),*)? // arguments
|
||||||
$(,)? // optional trailing comma
|
|
||||||
) => {
|
) => {
|
||||||
{
|
{
|
||||||
// May be no args!
|
// May be no args!
|
||||||
@@ -58,7 +56,7 @@ macro_rules! sprintf {
|
|||||||
$crate::printf_c_locale(
|
$crate::printf_c_locale(
|
||||||
$target,
|
$target,
|
||||||
$fmt,
|
$fmt,
|
||||||
&mut [$($arg.to_arg()),*],
|
&mut [$( $($arg.to_arg()),* )?],
|
||||||
).unwrap()
|
).unwrap()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -659,6 +659,18 @@ fn test_crate_macros() {
|
|||||||
|
|
||||||
target = crate::sprintf!("%d ok %d", 3, 4);
|
target = crate::sprintf!("%d ok %d", 3, 4);
|
||||||
assert_eq!(target, "3 ok 4");
|
assert_eq!(target, "3 ok 4");
|
||||||
|
|
||||||
|
let target = crate::sprintf!("noargs1");
|
||||||
|
assert_eq!(target, "noargs1");
|
||||||
|
let target = crate::sprintf!("noargs1",);
|
||||||
|
assert_eq!(target, "noargs1");
|
||||||
|
|
||||||
|
let mut target = String::new();
|
||||||
|
crate::sprintf!(=> &mut target, "noargs2");
|
||||||
|
assert_eq!(target, "noargs2");
|
||||||
|
let mut target = String::new();
|
||||||
|
crate::sprintf!(=> &mut target, "noargs2", );
|
||||||
|
assert_eq!(target, "noargs2");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
complete -c VBoxSDL -l startvm -x -d "Set virtual machine to start" -a "(__fish_print_VBox_vms)"
|
complete -c VBoxSDL -l startvm -x -d "Set virtual machine to start" -a "(__fish_print_VBox_vms)"
|
||||||
|
|
||||||
complete -c VBoxSDL -l seperate -d "Run separate VM process or attach to a running VM"
|
complete -c VBoxSDL -l separate -d "Run separate VM process or attach to a running VM"
|
||||||
complete -c VBoxSDL -l hda -f -d "Set temporary first hard disk"
|
complete -c VBoxSDL -l hda -f -d "Set temporary first hard disk"
|
||||||
complete -c VBoxSDL -l fda -f -d "Set temporary first floppy disk"
|
complete -c VBoxSDL -l fda -f -d "Set temporary first floppy disk"
|
||||||
complete -c VBoxSDL -l cdrom -r -d "Set temporary CDROM/DVD" -a "none\tunmount"
|
complete -c VBoxSDL -l cdrom -r -d "Set temporary CDROM/DVD" -a "none\tunmount"
|
||||||
@@ -18,7 +18,7 @@ complete -c VBoxSDL -l nograbonclick -d "Disable mouse/keyboard grabbing on mous
|
|||||||
complete -c VBoxSDL -l detecthostkey -d "Get hostkey identifier and modifier state"
|
complete -c VBoxSDL -l detecthostkey -d "Get hostkey identifier and modifier state"
|
||||||
complete -c VBoxSDL -l hostkey -r -d "Set host key to values obtained using --detecthostkey"
|
complete -c VBoxSDL -l hostkey -r -d "Set host key to values obtained using --detecthostkey"
|
||||||
complete -c VBoxSDL -l termacpi -d "Send APCI power button when closing window"
|
complete -c VBoxSDL -l termacpi -d "Send APCI power button when closing window"
|
||||||
complete -c VBoxSDL -l vrdp -d "Listen for VRDP connexions on if one of specified"
|
complete -c VBoxSDL -l vrdp -d "Listen for VRDP connections on if one of specified"
|
||||||
complete -c VBoxSDL -l discardstate -d "Discard saved state (if present) and revert to last snapshot (if present)"
|
complete -c VBoxSDL -l discardstate -d "Discard saved state (if present) and revert to last snapshot (if present)"
|
||||||
complete -c VBoxSDL -l settingspw -x -d "Specify settings password"
|
complete -c VBoxSDL -l settingspw -x -d "Specify settings password"
|
||||||
complete -c VBoxSDL -l settingspwfile -f -d "Specify file containing setting password"
|
complete -c VBoxSDL -l settingspwfile -f -d "Specify file containing setting password"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ complete -c acpi -s A -l without-ac-adapter -d 'Suppress ac-adapter information'
|
|||||||
complete -c acpi -s V -l everything -d 'Show every device, overrides above options'
|
complete -c acpi -s V -l everything -d 'Show every device, overrides above options'
|
||||||
complete -c acpi -s s -l show-empty -d 'Show non-operational devices'
|
complete -c acpi -s s -l show-empty -d 'Show non-operational devices'
|
||||||
complete -c acpi -s S -l hide-empty -d 'Hide non-operational devices'
|
complete -c acpi -s S -l hide-empty -d 'Hide non-operational devices'
|
||||||
complete -c acpi -s c -l celcius -d 'Use celsius as the temperature unit'
|
complete -c acpi -s c -l cooling -d 'Show cooling device information'
|
||||||
complete -c acpi -s f -l fahrenheit -d 'Use fahrenheit as the temperature unit'
|
complete -c acpi -s f -l fahrenheit -d 'Use fahrenheit as the temperature unit'
|
||||||
complete -c acpi -s k -l kelvin -d 'Use kelvin as the temperature unit'
|
complete -c acpi -s k -l kelvin -d 'Use kelvin as the temperature unit'
|
||||||
complete -c acpi -s d -l directory -d '<dir> path to ACPI info (/proc/acpi)'
|
complete -c acpi -s d -l directory -d '<dir> path to ACPI info (/proc/acpi)'
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ complete -c apt-get -l no-remove -d 'Abort if any packages are to be removed'
|
|||||||
complete -c apt-get -l only-source -d 'Only accept source packages'
|
complete -c apt-get -l only-source -d 'Only accept source packages'
|
||||||
complete -c apt-get -l diff-only -d 'Download only diff file'
|
complete -c apt-get -l diff-only -d 'Download only diff file'
|
||||||
complete -c apt-get -l tar-only -d 'Download only tar file'
|
complete -c apt-get -l tar-only -d 'Download only tar file'
|
||||||
complete -c apt-get -l arch-only -d 'Only process arch-dependant build-dependencies'
|
complete -c apt-get -l arch-only -d 'Only process arch-dependent build-dependencies'
|
||||||
complete -c apt-get -l allow-unauthenticated -d 'Ignore non-authenticated packages'
|
complete -c apt-get -l allow-unauthenticated -d 'Ignore non-authenticated packages'
|
||||||
complete -c apt-get -s v -l version -d 'Display version and exit'
|
complete -c apt-get -s v -l version -d 'Display version and exit'
|
||||||
complete -r -c apt-get -s c -l config-file -d 'Specify a config file'
|
complete -r -c apt-get -s c -l config-file -d 'Specify a config file'
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ end
|
|||||||
### Global options
|
### Global options
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l trace -d 'Debugging command'
|
complete -f -c arc -n __fish_arc_needs_command -l trace -d 'Debugging command'
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l no-ansi -d 'Don\'t use color or style for output'
|
complete -f -c arc -n __fish_arc_needs_command -l no-ansi -d 'Don\'t use color or style for output'
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l ansi -d 'Always use fromatting'
|
complete -f -c arc -n __fish_arc_needs_command -l ansi -d 'Always use formatting'
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l no-ansi -d 'Don\'t use color or style for output'
|
complete -f -c arc -n __fish_arc_needs_command -l no-ansi -d 'Don\'t use color or style for output'
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l load-phutil-library -d 'Specify which libraies to load'
|
complete -f -c arc -n __fish_arc_needs_command -l load-phutil-library -d 'Specify which libraries to load'
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l conduit-uri -d 'Specify the Conduit URI'
|
complete -f -c arc -n __fish_arc_needs_command -l conduit-uri -d 'Specify the Conduit URI'
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l conduit-token -d 'Specify the Conduit token'
|
complete -f -c arc -n __fish_arc_needs_command -l conduit-token -d 'Specify the Conduit token'
|
||||||
complete -f -c arc -n __fish_arc_needs_command -l conduit-version -d 'Force a version'
|
complete -f -c arc -n __fish_arc_needs_command -l conduit-version -d 'Force a version'
|
||||||
|
|||||||
1
share/completions/argocd.fish
Normal file
1
share/completions/argocd.fish
Normal file
@@ -0,0 +1 @@
|
|||||||
|
argocd completion fish | source
|
||||||
@@ -5,7 +5,7 @@ complete -c ark -s o -l destination -d 'Specify an extraction directory'
|
|||||||
complete -c ark -s c -l add -d 'Add files and directories to an archive interactively'
|
complete -c ark -s c -l add -d 'Add files and directories to an archive interactively'
|
||||||
complete -c ark -s t -l add-to -d 'Add files and directories to an archive'
|
complete -c ark -s t -l add-to -d 'Add files and directories to an archive'
|
||||||
complete -c ark -s p -l changetofirstpath -d 'Use a first argument as input path'
|
complete -c ark -s p -l changetofirstpath -d 'Use a first argument as input path'
|
||||||
complete -c ark -s f -l autofilename -d 'Specify suffix for automatically choosen filename'
|
complete -c ark -s f -l autofilename -d 'Specify suffix for automatically chosen filename'
|
||||||
|
|
||||||
complete -c ark -s b -l batch -d 'Use a batch interface'
|
complete -c ark -s b -l batch -d 'Use a batch interface'
|
||||||
complete -c ark -s e -l autodestination -d 'Use a first argument as output path'
|
complete -c ark -s e -l autodestination -d 'Use a first argument as output path'
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ else if string match -eiq -- habets $arping_version
|
|||||||
complete -c arping -s h -d "Displays a help message"
|
complete -c arping -s h -d "Displays a help message"
|
||||||
complete -c arping -s i -xa "(__fish_print_interfaces)" -d "Use the specified interface"
|
complete -c arping -s i -xa "(__fish_print_interfaces)" -d "Use the specified interface"
|
||||||
complete -c arping -s m -x -d "Type of timestamp to use for incoming packets"
|
complete -c arping -s m -x -d "Type of timestamp to use for incoming packets"
|
||||||
complete -c arping -s p -d "Turn on promiscious mode on interface"
|
complete -c arping -s p -d "Turn on promiscuous mode on interface"
|
||||||
complete -c arping -s P -d "Send ARP replies instead of requests"
|
complete -c arping -s P -d "Send ARP replies instead of requests"
|
||||||
complete -c arping -s q -d "Do not display messages, except errors"
|
complete -c arping -s q -d "Do not display messages, except errors"
|
||||||
complete -c arping -s Q -x -d "802.1p priority to set"
|
complete -c arping -s Q -x -d "802.1p priority to set"
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ complete -c as -o mavxscalar -a '128 256' -x -d 'Encode scalar AVX instructions
|
|||||||
complete -c as -o mevexlig -a '128 256 512' -x -d 'Encode scalar EVEX instructions with specific vector length'
|
complete -c as -o mevexlig -a '128 256 512' -x -d 'Encode scalar EVEX instructions with specific vector length'
|
||||||
complete -c as -o mevexwig -a '0 1' -x -d 'Encode EVEX instructions with specific EVEX.W'
|
complete -c as -o mevexwig -a '0 1' -x -d 'Encode EVEX instructions with specific EVEX.W'
|
||||||
complete -c as -o mevexrcig -a 'rne rd ru rz' -x -d 'Encode EVEX instructions with specific EVEX.RC'
|
complete -c as -o mevexrcig -a 'rne rd ru rz' -x -d 'Encode EVEX instructions with specific EVEX.RC'
|
||||||
complete -c as -o mmnemonic -a 'att\tAT\&T intel\tIntel' -x -d 'Use specfied mnemonic'
|
complete -c as -o mmnemonic -a 'att\tAT\&T intel\tIntel' -x -d 'Use specified mnemonic'
|
||||||
complete -c as -o msyntax -a 'att\tAT\&T intel\tIntel' -x -d 'Use specfied syntax'
|
complete -c as -o msyntax -a 'att\tAT\&T intel\tIntel' -x -d 'Use specified syntax'
|
||||||
complete -c as -o mindex-reg -d 'Support pseudo index registers'
|
complete -c as -o mindex-reg -d 'Support pseudo index registers'
|
||||||
complete -c as -o mnaked-reg -d 'Don\'t require \'%\' prefix for registers'
|
complete -c as -o mnaked-reg -d 'Don\'t require \'%\' prefix for registers'
|
||||||
complete -c as -o mold-gcc -d 'Support old (<= 2.8.1) versions of gcc'
|
complete -c as -o mold-gcc -d 'Support old (<= 2.8.1) versions of gcc'
|
||||||
|
|||||||
@@ -107,10 +107,10 @@ complete -c aura -n $aur -l build -r -d 'Specify a build location'
|
|||||||
complete -c aura -n $aur -l builduser -r -d 'User to build as'
|
complete -c aura -n $aur -l builduser -r -d 'User to build as'
|
||||||
complete -c aura -n $aur -l hotedit -d 'Prompt for PKGBUILD editing'
|
complete -c aura -n $aur -l hotedit -d 'Prompt for PKGBUILD editing'
|
||||||
complete -c aura -n $aur -l ignore -r -d 'Ignore a package upgrade'
|
complete -c aura -n $aur -l ignore -r -d 'Ignore a package upgrade'
|
||||||
complete -c aura -n $aur -l nocheck -d 'Do not run the check() functin of the PKGBUILD'
|
complete -c aura -n $aur -l nocheck -d 'Do not run the check() function of the PKGBUILD'
|
||||||
complete -c aura -n $aur -l shellcheck -d 'Run shellcheck on PKGBUILDs before building'
|
complete -c aura -n $aur -l shellcheck -d 'Run shellcheck on PKGBUILDs before building'
|
||||||
complete -c aura -n $aur -l skipdepcheck -d 'Perform no dependency resolution'
|
complete -c aura -n $aur -l skipdepcheck -d 'Perform no dependency resolution'
|
||||||
complete -c aura -n $aur -l skipinteg -d 'Do not perform any verifcation checks on source files'
|
complete -c aura -n $aur -l skipinteg -d 'Do not perform any verification checks on source files'
|
||||||
complete -c aura -n $aur -l skippgpcheck -d 'Do not verify source files with PGP signatures'
|
complete -c aura -n $aur -l skippgpcheck -d 'Do not verify source files with PGP signatures'
|
||||||
complete -c aura -n "$aur; and $search" -l abc -d 'Sort alphabetically'
|
complete -c aura -n "$aur; and $search" -l abc -d 'Sort alphabetically'
|
||||||
complete -c aura -n "$aur; and $search" -l limit -d 'Limit the results to N results'
|
complete -c aura -n "$aur; and $search" -l limit -d 'Limit the results to N results'
|
||||||
|
|||||||
@@ -64,16 +64,12 @@ function __fish_bind_complete
|
|||||||
a/all function-names list-modes e/erase -- (commandline -xpc)[2..] 2>/dev/null
|
a/all function-names list-modes e/erase -- (commandline -xpc)[2..] 2>/dev/null
|
||||||
or return 1
|
or return 1
|
||||||
set -l token (commandline -ct)
|
set -l token (commandline -ct)
|
||||||
if test (count $argv) = 0 && set -l prefix (string match -r -- '(.*,)?(ctrl-|alt-|shift-)*' $token)
|
if test (count $argv) = 0 && set -l prefix (string match -r -- '(.*,)?(ctrl-|alt-|shift-|super-)*' $token)
|
||||||
printf '%sctrl-\tCtrl modifier…\n' $prefix
|
|
||||||
printf '%sc-\tCtrl modifier…\n' $prefix
|
|
||||||
printf '%salt-\tAlt modifier…\n' $prefix
|
printf '%salt-\tAlt modifier…\n' $prefix
|
||||||
printf '%sa-\tAlt modifier…\n' $prefix
|
printf '%sctrl-\tCtrl modifier…\n' $prefix
|
||||||
printf '%sshift-\tShift modifier…\n' $prefix
|
printf '%sshift-\tShift modifier…\n' $prefix
|
||||||
set -l key_names minus comma backspace delete escape \
|
printf '%ssuper-\tSuper modifier…\n' $prefix
|
||||||
enter up down left right pageup pagedown home end insert tab \
|
printf '%s\tNamed key\n' $prefix(bind --key-names)
|
||||||
space menu printscreen f(seq 12)
|
|
||||||
printf '%s\tNamed key\n' $prefix$key_names
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
complete -c bind -k -a '(__fish_bind_complete)' -f
|
complete -c bind -k -a '(__fish_bind_complete)' -f
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ complete -c blender -n 'not __blender_player' -l debug-memory -d 'Enable fully g
|
|||||||
complete -c blender -n 'not __blender_player' -l debug-jobs -d 'Enable time profiling for background jobs'
|
complete -c blender -n 'not __blender_player' -l debug-jobs -d 'Enable time profiling for background jobs'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-python -d 'Enable debug messages for Python'
|
complete -c blender -n 'not __blender_player' -l debug-python -d 'Enable debug messages for Python'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-depsgraph -d 'Enable all debug messages for dependency graph'
|
complete -c blender -n 'not __blender_player' -l debug-depsgraph -d 'Enable all debug messages for dependency graph'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-depsgraph-eval -d 'Enable debug messages for dependency graph related on evalution'
|
complete -c blender -n 'not __blender_player' -l debug-depsgraph-eval -d 'Enable debug messages for dependency graph related on evaluation'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-depsgraph-build -d 'Enable debug messages for dependency graph related on its construction'
|
complete -c blender -n 'not __blender_player' -l debug-depsgraph-build -d 'Enable debug messages for dependency graph related on its construction'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-depsgraph-tag -d 'Enable debug messages for dependency graph related on tagging'
|
complete -c blender -n 'not __blender_player' -l debug-depsgraph-tag -d 'Enable debug messages for dependency graph related on tagging'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-depsgraph-no-threads -d 'Enable single treaded evaluation for dependency graph'
|
complete -c blender -n 'not __blender_player' -l debug-depsgraph-no-threads -d 'Enable single treaded evaluation for dependency graph'
|
||||||
@@ -136,7 +136,7 @@ complete -c blender -n 'not __blender_player' -l debug-depsgraph-pretty -d 'Enab
|
|||||||
complete -c blender -n 'not __blender_player' -l debug-depsgraph-uuid -d 'Enable virefication for dependency graph session-wide identifiers'
|
complete -c blender -n 'not __blender_player' -l debug-depsgraph-uuid -d 'Enable virefication for dependency graph session-wide identifiers'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-ghost -d 'Enable debug messages for Ghost'
|
complete -c blender -n 'not __blender_player' -l debug-ghost -d 'Enable debug messages for Ghost'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-wintab -d 'Enable debug messages for Wintab'
|
complete -c blender -n 'not __blender_player' -l debug-wintab -d 'Enable debug messages for Wintab'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-gpu -d 'Enable GPU debug context and infromation for OpenGL'
|
complete -c blender -n 'not __blender_player' -l debug-gpu -d 'Enable GPU debug context and information for OpenGL'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-gpu-force-workarounds -d 'Enable workarounds for typical GPU issues'
|
complete -c blender -n 'not __blender_player' -l debug-gpu-force-workarounds -d 'Enable workarounds for typical GPU issues'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-wm -d 'Enable debug messages for window manager'
|
complete -c blender -n 'not __blender_player' -l debug-wm -d 'Enable debug messages for window manager'
|
||||||
complete -c blender -n 'not __blender_player' -l debug-xr -d 'Enable debug messages for virtual reality contexts'
|
complete -c blender -n 'not __blender_player' -l debug-xr -d 'Enable debug messages for virtual reality contexts'
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
set -l commands status install update remove is-installed random-seed systemd-efi-options reboot-to-firmware list set-default set-oneshot set-timeout set-timeout-oneshot
|
set -l commands status install update remove is-installed random-seed systemd-efi-options reboot-to-firmware list set-default set-oneshot set-timeout set-timeout-oneshot
|
||||||
|
|
||||||
|
# Execute `bootctl list` and return entries
|
||||||
|
function __bootctl_entries
|
||||||
|
if not type -q jq
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
bootctl list --json short | jq '.[] | "\(.id)\t\(.showTitle)"' --raw-output
|
||||||
|
end
|
||||||
|
|
||||||
complete -c bootctl -f
|
complete -c bootctl -f
|
||||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a status -d 'Show status of EFI variables'
|
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a status -d 'Show status of EFI variables'
|
||||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a install -d 'Install systemd-boot'
|
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a install -d 'Install systemd-boot'
|
||||||
@@ -13,6 +22,7 @@ complete -c bootctl -n "__fish_seen_subcommand_from reboot-to-firmware" -a 'true
|
|||||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a list -d 'List boot loader entries'
|
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a list -d 'List boot loader entries'
|
||||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-default -d 'Set default boot loader entry'
|
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-default -d 'Set default boot loader entry'
|
||||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-oneshot -d 'Set default boot loader entry (Once)'
|
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-oneshot -d 'Set default boot loader entry (Once)'
|
||||||
|
complete -c bootctl -n "__fish_seen_subcommand_from set-default set-oneshot" -x -a '(__bootctl_entries)'
|
||||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout -d 'Set default boot loader timeout'
|
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout -d 'Set default boot loader timeout'
|
||||||
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout-oneshot -d 'Set default boot loader timeout (Once)'
|
complete -c bootctl -n "not __fish_seen_subcommand_from $commands" -a set-timeout-oneshot -d 'Set default boot loader timeout (Once)'
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ complete -c brightnessctl -n "test (__fish_number_of_cmd_args_wo_opts) = 1" -a m
|
|||||||
|
|
||||||
complete -c brightnessctl -s h -l help -d "Print help and exit"
|
complete -c brightnessctl -s h -l help -d "Print help and exit"
|
||||||
complete -c brightnessctl -s l -l list -d "List devices with available brightness controls"
|
complete -c brightnessctl -s l -l list -d "List devices with available brightness controls"
|
||||||
complete -c brightnessctl -s q -l quiet -d "Supress output"
|
complete -c brightnessctl -s q -l quiet -d "Suppress output"
|
||||||
complete -c brightnessctl -s p -l pretend -d "Do not perform write operations"
|
complete -c brightnessctl -s p -l pretend -d "Do not perform write operations"
|
||||||
complete -c brightnessctl -s m -l machine-readable -d "Produce machine-readable output"
|
complete -c brightnessctl -s m -l machine-readable -d "Produce machine-readable output"
|
||||||
complete -c brightnessctl -s n -l min-value -x -d "Set minimum brightness when using delta values"
|
complete -c brightnessctl -s n -l min-value -x -d "Set minimum brightness when using delta values"
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
complete -c bru -s h -l help -d "Show help"
|
complete -c bru -s h -l help -d "Show help"
|
||||||
complete -c bru -l version -d "Show version number"
|
complete -c bru -l version -d "Show version number"
|
||||||
|
|
||||||
|
|||||||
@@ -4,59 +4,59 @@ function __fish_btrbk_complete_filter
|
|||||||
end
|
end
|
||||||
|
|
||||||
# options with arguments
|
# options with arguments
|
||||||
complete -c btrbk -l format -x -d 'Change output format' -a "table long raw"
|
complete -c btrbk -l format -x -d 'Change output format' -a "table long raw"
|
||||||
complete -c btrbk -l loglevel -s l -x -d 'Set logging level' -a "error warn info debug trace"
|
complete -c btrbk -l loglevel -s l -x -d 'Set logging level' -a "error warn info debug trace"
|
||||||
complete -c btrbk -l exclude -x -d 'Exclude configured sections' -a "(__fish_btrbk_complete_filter)"
|
complete -c btrbk -l exclude -x -d 'Exclude configured sections' -a "(__fish_btrbk_complete_filter)"
|
||||||
complete -c btrbk -l override -x -d 'Globally override a configuration option'
|
complete -c btrbk -l override -x -d 'Globally override a configuration option'
|
||||||
|
|
||||||
# options with file completion
|
# options with file completion
|
||||||
complete -c btrbk -l config -r -s c -d 'Specify configuration file'
|
complete -c btrbk -l config -r -s c -d 'Specify configuration file'
|
||||||
complete -c btrbk -l lockfile -r -d 'Create and check lockfile'
|
complete -c btrbk -l lockfile -r -d 'Create and check lockfile'
|
||||||
|
|
||||||
# options without arguments
|
# options without arguments
|
||||||
complete -c btrbk -l help -s h -d 'Display this help message'
|
complete -c btrbk -l help -s h -d 'Display this help message'
|
||||||
complete -c btrbk -l version -d 'Display version information'
|
complete -c btrbk -l version -d 'Display version information'
|
||||||
complete -c btrbk -l dry-run -s n -d 'Perform a trial run with no changes made'
|
complete -c btrbk -l dry-run -s n -d 'Perform a trial run with no changes made'
|
||||||
complete -c btrbk -l preserve -s p -d 'Preserve all (do not delete anything)'
|
complete -c btrbk -l preserve -s p -d 'Preserve all (do not delete anything)'
|
||||||
complete -c btrbk -l preserve-snapshots -d 'Preserve snapshots (do not delete snapshots)'
|
complete -c btrbk -l preserve-snapshots -d 'Preserve snapshots (do not delete snapshots)'
|
||||||
complete -c btrbk -l preserve-backups -d 'Preserve backups (do not delete backups)'
|
complete -c btrbk -l preserve-backups -d 'Preserve backups (do not delete backups)'
|
||||||
complete -c btrbk -l wipe -d 'Delete all but latest snapshots'
|
complete -c btrbk -l wipe -d 'Delete all but latest snapshots'
|
||||||
complete -c btrbk -l verbose -s v -d 'Be more verbose (increase logging level)'
|
complete -c btrbk -l verbose -s v -d 'Be more verbose (increase logging level)'
|
||||||
complete -c btrbk -l quiet -s q -d 'Be quiet (do not print backup summary)'
|
complete -c btrbk -l quiet -s q -d 'Be quiet (do not print backup summary)'
|
||||||
complete -c btrbk -l table -s t -d 'Change output to table format'
|
complete -c btrbk -l table -s t -d 'Change output to table format'
|
||||||
complete -c btrbk -l long -s L -d 'Change output to long format'
|
complete -c btrbk -l long -s L -d 'Change output to long format'
|
||||||
complete -c btrbk -l print-schedule -s S -d 'Print scheduler details (for the "run" command)'
|
complete -c btrbk -l print-schedule -s S -d 'Print scheduler details (for the "run" command)'
|
||||||
complete -c btrbk -l progress -d 'Show progress bar on send-receive operation'
|
complete -c btrbk -l progress -d 'Show progress bar on send-receive operation'
|
||||||
|
|
||||||
# uncommon options from manpage
|
# uncommon options from manpage
|
||||||
complete -c btrbk -l single-column -s 1 -d 'Print output as a single column'
|
complete -c btrbk -l single-column -s 1 -d 'Print output as a single column'
|
||||||
complete -c btrbk -l pretty -d 'Print pretty table output with lowercase and underlined column headings'
|
complete -c btrbk -l pretty -d 'Print pretty table output with lowercase and underlined column headings'
|
||||||
complete -c btrbk -l raw -d 'Create raw targets for archive command'
|
complete -c btrbk -l raw -d 'Create raw targets for archive command'
|
||||||
|
|
||||||
# subcommands
|
# subcommands
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a run -d 'Run snapshot and backup operations'
|
complete -c btrbk -f -n __fish_use_subcommand -a run -d 'Run snapshot and backup operations'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a dryrun -d 'Show what would be executed without running btrfs commands'
|
complete -c btrbk -f -n __fish_use_subcommand -a dryrun -d 'Show what would be executed without running btrfs commands'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a snapshot -d 'Run snapshot operations only'
|
complete -c btrbk -f -n __fish_use_subcommand -a snapshot -d 'Run snapshot operations only'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a resume -d 'Run backup operations and delete snapshots'
|
complete -c btrbk -f -n __fish_use_subcommand -a resume -d 'Run backup operations and delete snapshots'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a prune -d 'Only delete snapshots and backups'
|
complete -c btrbk -f -n __fish_use_subcommand -a prune -d 'Only delete snapshots and backups'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a archive -d 'Recursively copy all subvolumes (src -> dst)'
|
complete -c btrbk -f -n __fish_use_subcommand -a archive -d 'Recursively copy all subvolumes (src -> dst)'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a clean -d 'Delete incomplete (garbled) backups'
|
complete -c btrbk -f -n __fish_use_subcommand -a clean -d 'Delete incomplete (garbled) backups'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a stats -d 'Print snapshot/backup statistics'
|
complete -c btrbk -f -n __fish_use_subcommand -a stats -d 'Print snapshot/backup statistics'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a usage -d 'Print filesystem usage'
|
complete -c btrbk -f -n __fish_use_subcommand -a usage -d 'Print filesystem usage'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a ls -d 'List all btrfs subvolumes below a given path'
|
complete -c btrbk -f -n __fish_use_subcommand -a ls -d 'List all btrfs subvolumes below a given path'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a origin -d 'Print origin information for a subvolume'
|
complete -c btrbk -f -n __fish_use_subcommand -a origin -d 'Print origin information for a subvolume'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a diff -d 'List file changes between related subvolumes'
|
complete -c btrbk -f -n __fish_use_subcommand -a diff -d 'List file changes between related subvolumes'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a extents -d 'Calculate accurate disk space usage for a path'
|
complete -c btrbk -f -n __fish_use_subcommand -a extents -d 'Calculate accurate disk space usage for a path'
|
||||||
complete -c btrbk -f -n __fish_use_subcommand -a list -d 'List snapshots and backups'
|
complete -c btrbk -f -n __fish_use_subcommand -a list -d 'List snapshots and backups'
|
||||||
|
|
||||||
# subsubcommands for "list"
|
# subsubcommands for "list"
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a all -d 'List all snapshots and backups'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a all -d 'List all snapshots and backups'
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a snapshots -d 'List snapshots only'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a snapshots -d 'List snapshots only'
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a backups -d 'List backups and correlated snapshots'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a backups -d 'List backups and correlated snapshots'
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a latest -d 'List most recent snapshots and backups'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a latest -d 'List most recent snapshots and backups'
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a config -d 'List configured source/snapshot/target relations'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a config -d 'List configured source/snapshot/target relations'
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a source -d 'List configured source/snapshot relations'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a source -d 'List configured source/snapshot relations'
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a volume -d 'List configured volume sections'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a volume -d 'List configured volume sections'
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a target -d 'List configured targets'
|
complete -c btrbk -n '__fish_seen_subcommand_from list' -f -a target -d 'List configured targets'
|
||||||
|
|
||||||
complete -c btrbk -n '__fish_seen_subcommand_from run dryrun snapshot resume prune clean' -x -a '(__fish_btrbk_complete_filter)'
|
complete -c btrbk -n '__fish_seen_subcommand_from run dryrun snapshot resume prune clean' -x -a '(__fish_btrbk_complete_filter)'
|
||||||
|
|||||||
@@ -102,33 +102,36 @@ complete -f -c btrfs -n $restore -s S -l symlink -d 'Restore symbolic links'
|
|||||||
complete -f -c btrfs -n $restore -s v -l verbose -d Verbose
|
complete -f -c btrfs -n $restore -s v -l verbose -d Verbose
|
||||||
complete -f -c btrfs -n $restore -s i -l ignore-errors -d 'Ignore errors'
|
complete -f -c btrfs -n $restore -s i -l ignore-errors -d 'Ignore errors'
|
||||||
complete -f -c btrfs -n $restore -s o -l overwrite -d Overwrite
|
complete -f -c btrfs -n $restore -s o -l overwrite -d Overwrite
|
||||||
complete -f -c btrfs -n $restore -s t -d 'Tree location'
|
complete -f -c btrfs -n $restore -s t -r -d 'Tree location'
|
||||||
complete -f -c btrfs -n $restore -s f -d 'Filesystem location'
|
complete -f -c btrfs -n $restore -s f -r -d 'Filesystem location'
|
||||||
complete -f -c btrfs -n $restore -s u -l super -d 'Super mirror'
|
complete -f -c btrfs -n $restore -s u -l super -r -d 'Super mirror'
|
||||||
complete -f -c btrfs -n $restore -s r -l root -d 'Root objectid'
|
complete -f -c btrfs -n $restore -s r -l root -r -d 'Root objectid'
|
||||||
complete -f -c btrfs -n $restore -s d -d 'Find dir'
|
complete -f -c btrfs -n $restore -s d -d 'Find dir'
|
||||||
complete -f -c btrfs -n $restore -s l -l list-roots -d 'List tree roots'
|
complete -f -c btrfs -n $restore -s l -l list-roots -d 'List tree roots'
|
||||||
complete -f -c btrfs -n $restore -s D -l dry-run -d 'Only list files that would be recovered'
|
complete -f -c btrfs -n $restore -s D -l dry-run -d 'Only list files that would be recovered'
|
||||||
complete -f -c btrfs -n $restore -l path-regex -d 'Restore only filenames matching regex'
|
complete -f -c btrfs -n $restore -l path-regex -r -d 'Restore only filenames matching regex'
|
||||||
complete -f -c btrfs -n $restore -s c -d 'Ignore case (--path-regex only)'
|
complete -f -c btrfs -n $restore -s c -d 'Ignore case (--path-regex only)'
|
||||||
|
|
||||||
# btrfs send
|
# btrfs send
|
||||||
complete -f -c btrfs -n $send -s e -d ''
|
complete -f -c btrfs -n $send -s e -d ''
|
||||||
complete -f -c btrfs -n $send -s p -d 'Send an incremental stream from <parent> to <subvol>'
|
complete -f -c btrfs -n $send -s p -r -d 'Send an incremental stream from <parent> to <subvol>'
|
||||||
complete -f -c btrfs -n $send -s c -d 'Use this snapshot as a clone source for an incremental send'
|
complete -f -c btrfs -n $send -s c -r -d 'Use this snapshot as a clone source for an incremental send'
|
||||||
complete -f -c btrfs -n $send -s f -d 'Output is normally written to stdout'
|
complete -f -c btrfs -n $send -s f -r -d 'Output is normally written to stdout'
|
||||||
complete -f -c btrfs -n $send -l no-data -d 'send in NO_FILE_DATA mode'
|
complete -f -c btrfs -n $send -l no-data -d 'send in NO_FILE_DATA mode'
|
||||||
complete -f -c btrfs -n $send -s v -l verbose -d 'Enable verbose output to stderr'
|
complete -f -c btrfs -n $send -s v -l verbose -d 'Enable verbose output to stderr'
|
||||||
complete -f -c btrfs -n $send -s q -l quiet -d 'Suppress all messages, except errors'
|
complete -f -c btrfs -n $send -s q -l quiet -d 'Suppress all messages, except errors'
|
||||||
|
complete -f -c btrfs -n $send -l proto -a '0 1 2' -r -d 'Use send protocol version'
|
||||||
|
complete -f -c btrfs -n $send -l proto -l compressed-data -d 'Send compressed data directly'
|
||||||
|
|
||||||
# btrfs receive
|
# btrfs receive
|
||||||
complete -f -c btrfs -n $receive -s v -d 'Increase verbosity about performed actions'
|
complete -f -c btrfs -n $receive -s v -d 'Increase verbosity about performed actions'
|
||||||
complete -f -c btrfs -n $receive -s q -l quiet -d 'Suppress all messages, except errors'
|
complete -f -c btrfs -n $receive -s q -l quiet -d 'Suppress all messages, except errors'
|
||||||
complete -f -c btrfs -n $receive -s f -d 'Read the stream from FILE instead of stdin'
|
complete -f -c btrfs -n $receive -s f -r -d 'Read the stream from FILE instead of stdin'
|
||||||
complete -f -c btrfs -n $receive -s e -d 'Terminate after receiving an <end cmd> marker in the stream'
|
complete -f -c btrfs -n $receive -s e -d 'Terminate after receiving an <end cmd> marker in the stream'
|
||||||
complete -f -c btrfs -n $receive -s C -l chroot -d 'Confine the process to <mount> using chroot'
|
complete -f -c btrfs -n $receive -s C -l chroot -d 'Confine the process to <mount> using chroot'
|
||||||
complete -f -c btrfs -n $receive -s E -l max-errors -d 'Terminate when NUMBER errors occur'
|
complete -f -c btrfs -n $receive -s E -l max-errors -r -d 'Terminate when NUMBER errors occur'
|
||||||
complete -f -c btrfs -n $receive -s m -d 'The root mount point of the destination filesystem'
|
complete -f -c btrfs -n $receive -s m -r -d 'The root mount point of the destination filesystem'
|
||||||
|
complete -f -c btrfs -n $receive -l force-decompress -r -d 'Always decompress data'
|
||||||
complete -f -c btrfs -n $receive -l dump -d 'Dump stream metadata'
|
complete -f -c btrfs -n $receive -l dump -d 'Dump stream metadata'
|
||||||
|
|
||||||
# btrfs help
|
# btrfs help
|
||||||
@@ -147,9 +150,11 @@ complete -f -c btrfs -n $subvolume -a show -d 'Show more information about the s
|
|||||||
complete -f -c btrfs -n $subvolume -a sync -d 'Wait until given subvolume(s) are completely removed from the filesystem.'
|
complete -f -c btrfs -n $subvolume -a sync -d 'Wait until given subvolume(s) are completely removed from the filesystem.'
|
||||||
# btrfs subvolume create
|
# btrfs subvolume create
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume create' -s i -d 'Add subvolume to a qgroup (can be given multiple times)'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume create' -s i -d 'Add subvolume to a qgroup (can be given multiple times)'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume create' -s p -d 'Create any missing parent directories'
|
||||||
# btrfs subvolume delete
|
# btrfs subvolume delete
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s c -l commit-after -d 'Wait for transaction commit at the end of the operation'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s c -l commit-after -d 'Wait for transaction commit at the end of the operation'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s C -l commit-each -d 'Wait for transaction commit after deleting each subvolume'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s C -l commit-each -d 'Wait for transaction commit after deleting each subvolume'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s R -l recursive -d 'Delete subvolumes beneath each subvolume recursively'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s v -l verbose -d 'Verbose output of operations'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume delete' -s v -l verbose -d 'Verbose output of operations'
|
||||||
# btrfs subvolume list
|
# btrfs subvolume list
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s o -d 'Print only subvolumes below specified path'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s o -d 'Print only subvolumes below specified path'
|
||||||
@@ -164,8 +169,8 @@ complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s s -d 'List on
|
|||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s r -d 'List readonly subvolumes (including snapshots)'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s r -d 'List readonly subvolumes (including snapshots)'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s d -d 'List deleted subvolumes that are not yet cleaned'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s d -d 'List deleted subvolumes that are not yet cleaned'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s t -d 'Print the result as a table'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s t -d 'Print the result as a table'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s G -d 'Filter the subvolumes by generation'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s G -r -d 'Filter the subvolumes by generation'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s C -d 'Filter the subvolumes by ogeneration'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -s C -r -d 'Filter the subvolumes by ogeneration'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -l sort -d 'List the subvolume in order' -a '{gen,ogen,rootid,path}'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume list' -l sort -d 'List the subvolume in order' -a '{gen,ogen,rootid,path}'
|
||||||
# btrfs subvolume snapshot
|
# btrfs subvolume snapshot
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups subvolume snapshot' -s r -d 'Create a readonly snapshot'
|
complete -f -c btrfs -n '__btrfs_command_groups subvolume snapshot' -s r -d 'Create a readonly snapshot'
|
||||||
@@ -194,6 +199,7 @@ complete -f -c btrfs -n $filesystem -a defragment -d 'Defragment a file or a dir
|
|||||||
complete -f -c btrfs -n $filesystem -a resize -d 'Resize a filesystem'
|
complete -f -c btrfs -n $filesystem -a resize -d 'Resize a filesystem'
|
||||||
complete -f -c btrfs -n $filesystem -a label -d 'Get or change the label of a filesystem'
|
complete -f -c btrfs -n $filesystem -a label -d 'Get or change the label of a filesystem'
|
||||||
complete -f -c btrfs -n $filesystem -a usage -d 'Show detailed information about internal filesystem usage.'
|
complete -f -c btrfs -n $filesystem -a usage -d 'Show detailed information about internal filesystem usage.'
|
||||||
|
complete -f -c btrfs -n $filesystem -a mkswapfile -d 'Create a new swapfile'
|
||||||
# btrfs filesystem df
|
# btrfs filesystem df
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem df' -s b -l raw -d 'Show raw numbers in bytes'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem df' -s b -l raw -d 'Show raw numbers in bytes'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem df' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem df' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||||
@@ -230,9 +236,12 @@ complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s v -d '
|
|||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s r -d 'Defragment files recursively'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s r -d 'Defragment files recursively'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s c -d 'Compress the file while defragmenting' -ra '{zlib,lzo,zstd}'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s c -d 'Compress the file while defragmenting' -ra '{zlib,lzo,zstd}'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s f -d 'Flush data to disk immediately after defragmenting'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s f -d 'Flush data to disk immediately after defragmenting'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s s -d 'Defragment only from NUMBER byte onward'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s s -r -d 'Defragment only from NUMBER byte onward'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s l -d 'Defragment only up to LEN bytes'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s l -r -d 'Defragment only up to LEN bytes'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s t -d 'Target extent SIZE hint'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s t -r -d 'Target extent SIZE hint'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -l step -r -d 'Defragment in steps of SIZE'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem defragment' -s L -l level -r -d 'Specify compression levels'
|
||||||
|
|
||||||
# btrfs filesystem usage
|
# btrfs filesystem usage
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s b -l raw -d 'Show raw numbers in bytes'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s b -l raw -d 'Show raw numbers in bytes'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||||
@@ -244,6 +253,11 @@ complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s m -l mbytes
|
|||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s g -l gbytes -d 'Show sizes in GiB, or GB with --si'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s g -l gbytes -d 'Show sizes in GiB, or GB with --si'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s t -l tbytes -d 'Show sizes in TiB, or TB with --si'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s t -l tbytes -d 'Show sizes in TiB, or TB with --si'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s T -d 'Show data in tabular format'
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem usage' -s T -d 'Show data in tabular format'
|
||||||
|
# btrfs filesystem mkswapfile
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem mkswapfile' -s s -l size -r -d 'Swapfile size'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem mkswapfile' -s U -l uuid -r -d 'UUID for the swapfile'
|
||||||
|
# btrfs filesystem resize
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups filesystem resize' -l enqueue -d 'Wait for other exclusive operations'
|
||||||
|
|
||||||
# btrfs balance
|
# btrfs balance
|
||||||
complete -f -c btrfs -n $balance -a start -d 'Balance chunks across the devices'
|
complete -f -c btrfs -n $balance -a start -d 'Balance chunks across the devices'
|
||||||
@@ -252,13 +266,23 @@ complete -f -c btrfs -n $balance -a cancel -d 'Cancel running or paused balance'
|
|||||||
complete -f -c btrfs -n $balance -a resume -d 'Resume interrupted balance'
|
complete -f -c btrfs -n $balance -a resume -d 'Resume interrupted balance'
|
||||||
complete -f -c btrfs -n $balance -a status -d 'Show status of running or paused balance'
|
complete -f -c btrfs -n $balance -a status -d 'Show status of running or paused balance'
|
||||||
# btrfs balance start
|
# btrfs balance start
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s d -d 'Act on data chunks with FILTERS'
|
function __btrfs_balance_filters
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s m -d 'Act on metadata chunks with FILTERS'
|
set -l profiles raid{0,1{,c3,c4},10,5,6} dup single
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s s -d 'Act on system chunks with FILTERS (only under -f)'
|
set -l btrfs_balance_filters \
|
||||||
|
profiles=$profiles\t"Balances only block groups with the given profiles" \
|
||||||
|
convert=$profiles\t"Convert selected block groups to given profile" \
|
||||||
|
usage= devid= vrange= limit= strips= soft
|
||||||
|
set -l prefix (commandline -tc | string replace -r '^-d' -- '' | string match -rg '^(.*?)?[^,]*$' -- $token)
|
||||||
|
printf "%s\n" "$prefix"$btrfs_balance_filters
|
||||||
|
end
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s d -ra '(__btrfs_balance_filters)' -d 'Act on data chunks with FILTERS'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s m -ra '(__btrfs_balance_filters)' -d 'Act on metadata chunks with FILTERS'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s s -ra '(__btrfs_balance_filters)' -d 'Act on system chunks with FILTERS (only under -f)'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s v -d 'Be verbose'
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s v -d 'Be verbose'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s f -d 'Force a reduction of metadata integrity'
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -s f -d 'Force a reduction of metadata integrity'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l full-balance -d 'Do not print warning and do not delay start'
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l full-balance -d 'Do not print warning and do not delay start'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l background -l bg -d 'Run the balance as a background process'
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l background -l bg -d 'Run the balance as a background process'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups balance start' -l enqueue -d 'Wait for other exclusive operations'
|
||||||
# btrfs balance status
|
# btrfs balance status
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups balance status' -s v -d 'Be verbose'
|
complete -f -c btrfs -n '__btrfs_command_groups balance status' -s v -d 'Be verbose'
|
||||||
|
|
||||||
@@ -279,6 +303,10 @@ complete -f -c btrfs -n '__btrfs_command_groups device scan' -s u -l forget -d '
|
|||||||
# btrfs device stats
|
# btrfs device stats
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s c -l check -d 'Return non-zero if any stat counter is not zero'
|
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s c -l check -d 'Return non-zero if any stat counter is not zero'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s z -l reset -d 'Show current stats and reset values to zero'
|
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s z -l reset -d 'Show current stats and reset values to zero'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups device stats' -s T -d "Print stats in a tabular form"
|
||||||
|
# btrfs device remove
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups device remove' -l enqueue -d 'Wait for other exclusive operations'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups device remove' -l force -d 'Skip the safety timeout for removing multiple devices'
|
||||||
# btrfs device usage
|
# btrfs device usage
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups device usage' -s b -l raw -d 'Show raw numbers in bytes'
|
complete -f -c btrfs -n '__btrfs_command_groups device usage' -s b -l raw -d 'Show raw numbers in bytes'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups device usage' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
complete -f -c btrfs -n '__btrfs_command_groups device usage' -s h -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||||
@@ -295,12 +323,18 @@ complete -f -c btrfs -n $scrub -a start -d 'Start a new scrub. If a scrub is alr
|
|||||||
complete -f -c btrfs -n $scrub -a cancel -d 'Cancel a running scrub'
|
complete -f -c btrfs -n $scrub -a cancel -d 'Cancel a running scrub'
|
||||||
complete -f -c btrfs -n $scrub -a resume -d 'Resume previously canceled or interrupted scrub'
|
complete -f -c btrfs -n $scrub -a resume -d 'Resume previously canceled or interrupted scrub'
|
||||||
complete -f -c btrfs -n $scrub -a status -d 'Show status of running or finished scrub'
|
complete -f -c btrfs -n $scrub -a status -d 'Show status of running or finished scrub'
|
||||||
|
complete -f -c btrfs -n $scrub -a limit -d 'Show or set scrub limits on devices of the given filesystem'
|
||||||
|
# btrfs scrub limit
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups scrub limit' -s d -l devid -d 'Select the device by DEVID to apply the limit'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups scrub limit' -s l -l limit -d 'Set the limit of the device'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups scrub limit' -s a -l all -d 'Apply the limit to all devices'
|
||||||
# btrfs scrub start
|
# btrfs scrub start
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s B -d 'Do not background'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s B -d 'Do not background'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s d -d 'Stats per device (-B only)'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s d -d 'Stats per device (-B only)'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s q -d 'Be quiet'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s q -d 'Be quiet'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s r -d 'Read only mode'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s r -d 'Read only mode'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s R -d 'Raw print mode, print full data instead of summary'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s R -d 'Raw print mode, print full data instead of summary'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -l limit -d 'Set the scrub throughput limit'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s c -d 'Set ioprio class (see ionice(1) manpage)'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s c -d 'Set ioprio class (see ionice(1) manpage)'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s n -d 'Set ioprio classdata (see ionice(1) manpage)'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s n -d 'Set ioprio classdata (see ionice(1) manpage)'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s f -d 'Force starting new scrub'
|
complete -f -c btrfs -n '__btrfs_command_groups scrub start' -s f -d 'Force starting new scrub'
|
||||||
@@ -321,6 +355,9 @@ complete -f -c btrfs -n $rescue -a chunk-recover -d 'Recover the chunk tree by s
|
|||||||
complete -f -c btrfs -n $rescue -a super-recover -d 'Recover bad superblocks from good copies'
|
complete -f -c btrfs -n $rescue -a super-recover -d 'Recover bad superblocks from good copies'
|
||||||
complete -f -c btrfs -n $rescue -a zero-log -d 'Clear the tree log. Usable if it\'s corrupted and prevents mount.'
|
complete -f -c btrfs -n $rescue -a zero-log -d 'Clear the tree log. Usable if it\'s corrupted and prevents mount.'
|
||||||
complete -f -c btrfs -n $rescue -a fix-device-size -d 'Re-align device and super block sizes'
|
complete -f -c btrfs -n $rescue -a fix-device-size -d 'Re-align device and super block sizes'
|
||||||
|
complete -f -c btrfs -n $rescue -a clear-ino-cache -d 'Remove leftover items pertaining to the deprecated inode cache feature'
|
||||||
|
complete -f -c btrfs -n $rescue -a clear-space-cache -d 'Completely remove the on-disk data of free space cache of given version'
|
||||||
|
complete -f -c btrfs -n $rescue -a clear-uuid-tree -d 'Clear the UUID tree'
|
||||||
# btrfs rescue chunk-recover
|
# btrfs rescue chunk-recover
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups rescue chunk-recover' -s y -d 'Assume an answer of YES to all questions'
|
complete -f -c btrfs -n '__btrfs_command_groups rescue chunk-recover' -s y -d 'Assume an answer of YES to all questions'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups rescue chunk-recover' -s v -d 'Verbose mode'
|
complete -f -c btrfs -n '__btrfs_command_groups rescue chunk-recover' -s v -d 'Verbose mode'
|
||||||
@@ -337,6 +374,8 @@ complete -f -c btrfs -n $inspect_internal -a min-dev-size -d 'Get the minimum si
|
|||||||
complete -f -c btrfs -n $inspect_internal -a dump-tree -d 'Dump tree structures from a given device'
|
complete -f -c btrfs -n $inspect_internal -a dump-tree -d 'Dump tree structures from a given device'
|
||||||
complete -f -c btrfs -n $inspect_internal -a dump-super -d 'Dump superblock from a device in a textual form'
|
complete -f -c btrfs -n $inspect_internal -a dump-super -d 'Dump superblock from a device in a textual form'
|
||||||
complete -f -c btrfs -n $inspect_internal -a tree-stats -d 'Print various stats for trees'
|
complete -f -c btrfs -n $inspect_internal -a tree-stats -d 'Print various stats for trees'
|
||||||
|
complete -f -c btrfs -n $inspect_internal -a list-chunks -d 'Enumerate chunks on all devices'
|
||||||
|
complete -f -c btrfs -n $inspect_internal -a map-swapfile -d 'Find device-specific physical offset of file that can be used for hibernation'
|
||||||
# btrfs inspect-internal inode-resolve
|
# btrfs inspect-internal inode-resolve
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal inode-resolve' -s v -d 'Verbose mode'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal inode-resolve' -s v -d 'Verbose mode'
|
||||||
# btrfs inspect-internal logical-resolve
|
# btrfs inspect-internal logical-resolve
|
||||||
@@ -351,20 +390,50 @@ complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s d
|
|||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s r -l roots -d 'Print only short root node info'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s r -l roots -d 'Print only short root node info'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s R -l backups -d 'Print short root node info and backup root info'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s R -l backups -d 'Print short root node info and backup root info'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s u -l uuid -d 'Print only the uuid tree'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s u -l uuid -d 'Print only the uuid tree'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s b -l block -d 'Print info from the specified BLOCK only'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s b -l block -r -d 'Print info from the specified BLOCK only'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s t -l tree -d 'Print only tree with the given ID'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -s t -l tree -r -d 'Print only tree with the given ID'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l follow -d 'Use with -b, to show all children tree blocks of <block_num>'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l follow -d 'Use with -b, to show all children tree blocks of <block_num>'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l noscan -d 'Do not scan the devices from the filesystem'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l noscan -d 'Do not scan the devices from the filesystem'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l bfs -d 'Breadth-first traversal of the trees, print nodes, then leaves'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l bfs -d 'Breadth-first traversal of the trees, print nodes, then leaves'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l dfs -d 'Depth-first traversal of the trees'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l dfs -d 'Depth-first traversal of the trees'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l hide-names -d 'Print placeholder instead of names'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l csum-headers -d 'Print b-tree node checksums in headers'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-tree' -l csum-items -d 'Print checksums stored in checksum items'
|
||||||
|
|
||||||
# btrfs inspect-internal dump-super
|
# btrfs inspect-internal dump-super
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s f -l full -d 'Print full superblock information, backup roots etc.'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s f -l full -d 'Print full superblock information, backup roots etc.'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s a -l all -d 'Print information about all superblocks'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s a -l all -d 'Print information about all superblocks'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s s -l super -d 'Specify which SUPER-BLOCK copy to print out' -ra '{0,1,2}'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s s -l super -d 'Specify which SUPER-BLOCK copy to print out' -ra '{0,1,2}'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s F -l force -d 'Attempt to dump superblocks with bad magic'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -s F -l force -d 'Attempt to dump superblocks with bad magic'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -l bytenr -d 'Specify alternate superblock OFFSET'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal dump-super' -l bytenr -d 'Specify alternate superblock OFFSET'
|
||||||
|
# btrfs inspect-internal logical-resolve
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups logical-resolve' -s P -d 'Print inodes instead of resolving paths'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups logical-resolve' -s o -d 'Ignore offsets, find all references to an extent'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups logical-resolve' -s s -r -d 'Set internal buffer size for storing file names'
|
||||||
# btrfs inspect-internal tree-stats
|
# btrfs inspect-internal tree-stats
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -s b -d 'Show raw numbers in bytes'
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -s b -d 'Show raw numbers in bytes'
|
||||||
|
# btrfs inspect-internal list-chunks
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l sort -ra 'devid pstart lstart usage length' -d 'Sort by a column (ascending)'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l raw -d 'Show raw numbers in bytes'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l iec -d 'Use 1024 as a base (KiB, MiB, GiB, TiB)'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l si -d 'Use 1000 as a base (kB, MB, GB, TB)'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l kbytes -d 'Show sizes in KiB, or kB with --si'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l mbytes -d 'Show sizes in MiB, or MB with --si'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l gbytes -d 'Show sizes in GiB, or GB with --si'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal list-chunks' -l tbytes -d 'Show sizes in TiB, or TB with --si'
|
||||||
|
# btrfs inspect-internal map-swapfile
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal map-swapfile' -l resume-offset -s r -d 'Print the value suitable as resume offset for /sys/power/resume_offset.'
|
||||||
|
# btrfs inspect-internal tree-stats
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -s t -r -d 'Print stats only for the given treeid'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l raw -s b -d 'Show raw numbers in bytes'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l human-readable -d 'Show human friendly numbers, base 1024'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l iec -d 'Use 1024 as a base (KiB, MiB, GiB, TiB)'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l si -d 'Use 1000 as a base (kB, MB, GB, TB)'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l kbytes -d 'Show sizes in KiB, or kB with --si'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l mbytes -d 'Show sizes in MiB, or MB with --si'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l gbytes -d 'Show sizes in GiB, or GB with --si'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups inspect-internal tree-stats' -l tbytes -d 'Show sizes in TiB, or TB with --si'
|
||||||
|
|
||||||
# btrfs property
|
# btrfs property
|
||||||
complete -f -c btrfs -n $property -a get -d 'Get a property value of a btrfs object'
|
complete -f -c btrfs -n $property -a get -d 'Get a property value of a btrfs object'
|
||||||
@@ -381,9 +450,12 @@ complete -f -c btrfs -n '__btrfs_command_groups property list' -s t -d 'List pro
|
|||||||
complete -f -c btrfs -n $quota -a enable -d 'Enable subvolume quota support for a filesystem.'
|
complete -f -c btrfs -n $quota -a enable -d 'Enable subvolume quota support for a filesystem.'
|
||||||
complete -f -c btrfs -n $quota -a disable -d 'Disable subvolume quota support for a filesystem.'
|
complete -f -c btrfs -n $quota -a disable -d 'Disable subvolume quota support for a filesystem.'
|
||||||
complete -f -c btrfs -n $quota -a rescan -d 'Trash all qgroup numbers and scan the metadata again with the current config.'
|
complete -f -c btrfs -n $quota -a rescan -d 'Trash all qgroup numbers and scan the metadata again with the current config.'
|
||||||
|
# btrfs quota enable
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups quota enable' -s s -l simple -d 'Use simple quotas'
|
||||||
# btrfs quota rescan
|
# btrfs quota rescan
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s s -d 'Show status of a running rescan operation'
|
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s s -l status -d 'Show status of a running rescan operation'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s w -d 'Wait for rescan operation to finish'
|
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s w -l wait -d 'Wait for rescan operation to finish'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups quota rescan' -s W -l wait-norescan -d 'Wait for rescan to finish without starting it'
|
||||||
|
|
||||||
# btrfs qgroup
|
# btrfs qgroup
|
||||||
complete -f -c btrfs -n $qgroup -a assign -d 'Assign SRC as the child qgroup of DST'
|
complete -f -c btrfs -n $qgroup -a assign -d 'Assign SRC as the child qgroup of DST'
|
||||||
@@ -391,6 +463,7 @@ complete -f -c btrfs -n $qgroup -a remove -d 'Remove a child qgroup SRC from DST
|
|||||||
complete -f -c btrfs -n $qgroup -a create -d 'Create a subvolume quota group.'
|
complete -f -c btrfs -n $qgroup -a create -d 'Create a subvolume quota group.'
|
||||||
complete -f -c btrfs -n $qgroup -a destroy -d 'Destroy a quota group.'
|
complete -f -c btrfs -n $qgroup -a destroy -d 'Destroy a quota group.'
|
||||||
complete -f -c btrfs -n $qgroup -a show -d 'Show subvolume quota groups.'
|
complete -f -c btrfs -n $qgroup -a show -d 'Show subvolume quota groups.'
|
||||||
|
complete -f -c btrfs -n $qgroup -a clear-stale -d 'Clear all stale qgroups whose subvolume does not exist'
|
||||||
complete -f -c btrfs -n $qgroup -a limit -d 'Set the limits a subvolume quota group.'
|
complete -f -c btrfs -n $qgroup -a limit -d 'Set the limits a subvolume quota group.'
|
||||||
# btrfs qgroup assign
|
# btrfs qgroup assign
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups qgroup assign' -l rescan -d 'Schedule qutoa rescan if needed'
|
complete -f -c btrfs -n '__btrfs_command_groups qgroup assign' -l rescan -d 'Schedule qutoa rescan if needed'
|
||||||
@@ -424,5 +497,7 @@ complete -f -c btrfs -n $replace -a cancel -d 'Cancel a running device replace o
|
|||||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s r -d 'Only read from <srcdev> if no other zero-defect mirror exists'
|
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s r -d 'Only read from <srcdev> if no other zero-defect mirror exists'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s f -d 'Force using and overwriting <targetdev>'
|
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s f -d 'Force using and overwriting <targetdev>'
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s B -d 'Do not background'
|
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s B -d 'Do not background'
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups replace start' -l enqueue -d "Wait if there's another exclusive operation running"
|
||||||
|
complete -f -c btrfs -n '__btrfs_command_groups replace start' -s K -l nodiscard -d 'Do not perform TRIM on DEVICES'
|
||||||
# btrfs replace status
|
# btrfs replace status
|
||||||
complete -f -c btrfs -n '__btrfs_command_groups replace status' -s 1 -d 'Only print once until the replace operation finishes'
|
complete -f -c btrfs -n '__btrfs_command_groups replace status' -s 1 -d 'Only print once until the replace operation finishes'
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ complete -f -n '__fish_bundle_using_command install' -c bundle -l system -d 'Ins
|
|||||||
complete -f -n '__fish_bundle_using_command install' -c bundle -l without -d 'A space-separated list of groups to skip installing'
|
complete -f -n '__fish_bundle_using_command install' -c bundle -l without -d 'A space-separated list of groups to skip installing'
|
||||||
complete -f -n '__fish_bundle_using_command install' -c bundle -l local -d 'Use cached gems instead of connecting to rubygems.org'
|
complete -f -n '__fish_bundle_using_command install' -c bundle -l local -d 'Use cached gems instead of connecting to rubygems.org'
|
||||||
complete -f -n '__fish_bundle_using_command install' -c bundle -l deployment -d "Switches bundler's defaults into deployment mode."
|
complete -f -n '__fish_bundle_using_command install' -c bundle -l deployment -d "Switches bundler's defaults into deployment mode."
|
||||||
complete -f -n '__fish_bundle_using_command install' -c bundle -l binstubs -d 'Create a directory containing executabes that run in the context of the bundle'
|
complete -f -n '__fish_bundle_using_command install' -c bundle -l binstubs -d 'Create a directory containing executables that run in the context of the bundle'
|
||||||
complete -f -n '__fish_bundle_using_command install' -c bundle -l shebang -d 'Specify a ruby executable to use with generated binstubs'
|
complete -f -n '__fish_bundle_using_command install' -c bundle -l shebang -d 'Specify a ruby executable to use with generated binstubs'
|
||||||
complete -f -n '__fish_bundle_using_command install' -c bundle -l standalone -d 'Make a bundle that can work without RubyGems or Bundler at run-time'
|
complete -f -n '__fish_bundle_using_command install' -c bundle -l standalone -d 'Make a bundle that can work without RubyGems or Bundler at run-time'
|
||||||
complete -f -n '__fish_bundle_using_command install' -c bundle -s P -l trust-policy -d 'Apply a RubyGems security policy: {High,Medium,Low,No}Security'
|
complete -f -n '__fish_bundle_using_command install' -c bundle -s P -l trust-policy -d 'Apply a RubyGems security policy: {High,Medium,Low,No}Security'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Fish completions for systemd's "busctl" dbus tool
|
# Fish completions for systemd's "busctl" dbus tool
|
||||||
# TODO:
|
# TODO:
|
||||||
# One issue is that sometimes these will come to a dead-end e.g. when a particular interface has no properties
|
# One issue is that sometimes these will come to a dead-end e.g. when a particular interface has no properties
|
||||||
# Another is that some busnames aren't accesible by the current user
|
# Another is that some busnames aren't accessible by the current user
|
||||||
# but this can't be predicted via the user that owns that name, e.g. `org.freedesktop.login1`
|
# but this can't be predicted via the user that owns that name, e.g. `org.freedesktop.login1`
|
||||||
# is usually owned by a root-owned process, yet accessible (at least in part) by normal users
|
# is usually owned by a root-owned process, yet accessible (at least in part) by normal users
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l pull -d 'If destina
|
|||||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l remember -d 'Remember the specified location as a default'
|
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l remember -d 'Remember the specified location as a default'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l force -d 'Merge even if the destination tree has uncommitted changes'
|
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l force -d 'Merge even if the destination tree has uncommitted changes'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l reprocess -d 'Reprocess to reduce spurious conflicts'
|
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l reprocess -d 'Reprocess to reduce spurious conflicts'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l uncommited -d 'Apply uncommitted changes from a working copy, instead of branch changes'
|
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l uncommitted -d 'Apply uncommitted changes from a working copy, instead of branch changes'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l show-base -d 'Show base revision text in conflicts'
|
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l show-base -d 'Show base revision text in conflicts'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l preview -d 'Instead of merging, show a diff of the merge'
|
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l preview -d 'Instead of merging, show a diff of the merge'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l interactive -s i -d 'Select changes interactively'
|
complete -f -c bzr -n '__fish_seen_subcommand_from merge' -l interactive -s i -d 'Select changes interactively'
|
||||||
@@ -75,7 +75,7 @@ complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l show-diff -s p -d
|
|||||||
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l file -s F -d 'Take commit message from this file'
|
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l file -s F -d 'Take commit message from this file'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l exclude -s x -d 'Do not consider changes made to a given path'
|
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l exclude -s x -d 'Do not consider changes made to a given path'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l message -s m -d 'Description of the new revision'
|
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l message -s m -d 'Description of the new revision'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l author -d 'Set the author\'s name, if it\'s different from the commiter'
|
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l author -d 'Set the author\'s name, if it\'s different from the committer'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l commit-time -d 'Manually set a commit time using commit date format'
|
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l commit-time -d 'Manually set a commit time using commit date format'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l unchanged -d 'Commit even if nothing has changed'
|
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l unchanged -d 'Commit even if nothing has changed'
|
||||||
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l fixes -d 'Mark a bug as being fixed by this revision'
|
complete -f -c bzr -n '__fish_seen_subcommand_from commit' -l fixes -d 'Mark a bug as being fixed by this revision'
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
## --- WRITTEN MANUALLY ---
|
## --- WRITTEN MANUALLY ---
|
||||||
set -l __fish_cargo_subcommands (cargo --list 2>&1 | string replace -rf '^\s+([^\s]+)\s*(.*)' '$1\t$2' | string escape)
|
set -l __fish_cargo_subcommands (cargo --list 2>&1 | string replace -rf '^\s+([^\s]+)\s*(.*)' '$1\t$2' | string escape)
|
||||||
|
|
||||||
# Append user-installed extensions (e.g. cargo-foo, invokable as `cargo foo`) to the list of subcommands (à la git)
|
|
||||||
set -la __fish_cargo_subcommands (complete -C'cargo-' | string replace -rf '^cargo-(\w+).*' '$1')
|
|
||||||
|
|
||||||
complete -c cargo -f -c cargo -n __fish_use_subcommand -a "$__fish_cargo_subcommands"
|
complete -c cargo -f -c cargo -n __fish_use_subcommand -a "$__fish_cargo_subcommands"
|
||||||
complete -c cargo -x -c cargo -n '__fish_seen_subcommand_from help' -a "$__fish_cargo_subcommands"
|
complete -c cargo -x -c cargo -n '__fish_seen_subcommand_from help' -a "$__fish_cargo_subcommands"
|
||||||
|
|
||||||
@@ -32,7 +29,7 @@ end
|
|||||||
# have an easy way to do that in the `complete` machinery at this time.
|
# have an easy way to do that in the `complete` machinery at this time.
|
||||||
function __fish_cargo_targets
|
function __fish_cargo_targets
|
||||||
if command -q rustup
|
if command -q rustup
|
||||||
functions -q __rustup_installed_targets || source (path dirname (status current-filename))/rustup.fish
|
functions -q __rustup_installed_targets || complete -C"rustup " &>/dev/null
|
||||||
__rustup_installed_targets
|
__rustup_installed_targets
|
||||||
else
|
else
|
||||||
rustc --print target-list
|
rustc --print target-list
|
||||||
@@ -48,38 +45,22 @@ function __fish_cargo_features
|
|||||||
end
|
end
|
||||||
|
|
||||||
function __fish_cargo_packages
|
function __fish_cargo_packages
|
||||||
find . -name Cargo.toml | string replace -rf '.*/([^/]+)/?Cargo.toml' '$1'
|
if command -q jq
|
||||||
end
|
cargo metadata --no-deps --format-version 1 | jq -r '.packages | .[] | .name' | __fish_concat_completions
|
||||||
complete -c cargo -n '__fish_seen_subcommand_from run test build debug check' -l package \
|
else if set -l python (__fish_anypython)
|
||||||
-xa "(__fish_cargo_packages)"
|
cargo metadata --no-deps --format-version 1 |
|
||||||
|
command $python -Sc "import sys, json"\n"print(*[x['name'] for x in json.load(sys.stdin)['packages']], sep='\n')"
|
||||||
# Look up crates.io crates matching the single argument provided to this function
|
|
||||||
function __fish_cargo_search
|
|
||||||
if test (string length -- "$argv[1]") -le 2
|
|
||||||
# Don't waste time searching for strings with too many results to realistically
|
|
||||||
# provide a meaningful completion within our results limit.
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# This doesn't do a prefix search, so bump up the limit a tiny bit to try and
|
|
||||||
# get enough results to show something.
|
|
||||||
cargo search --color never --quiet --limit 20 -- $argv[1] 2>/dev/null |
|
|
||||||
# Filter out placeholders and "... and xxx more crates"
|
|
||||||
string match -rvi '^\.\.\.|= "0.0.0"|# .*(reserved|yanked)' |
|
|
||||||
# Remove the version number and map the description
|
|
||||||
string replace -rf '^([^ ]+).*# (.*)' '$1\t$2'
|
|
||||||
end
|
end
|
||||||
|
complete -c cargo -n '__fish_seen_subcommand_from run test build debug check clippy' -s p -l package \
|
||||||
# Complete possible crate names by search the crates.io index
|
-xa "(__fish_cargo_packages)"
|
||||||
complete -c cargo -n '__fish_seen_subcommand_from add install' -n '__fish_is_nth_token 2' \
|
|
||||||
-a "(__fish_cargo_search (commandline -ct))"
|
|
||||||
|
|
||||||
## --- AUTO-GENERATED WITH `cargo complete fish` ---
|
## --- AUTO-GENERATED WITH `cargo complete fish` ---
|
||||||
# Manually massaged to improve some descriptions
|
# Manually massaged to improve some descriptions
|
||||||
complete -c cargo -n __fish_use_subcommand -l explain -d 'Run `rustc --explain CODE`'
|
complete -c cargo -n __fish_use_subcommand -l explain -d 'Run `rustc --explain CODE`'
|
||||||
complete -c cargo -n __fish_use_subcommand -l color -d 'Coloring: auto, always, never'
|
complete -c cargo -n __fish_use_subcommand -l color -d 'Coloring: auto, always, never'
|
||||||
complete -c cargo -n __fish_use_subcommand -l config -d 'Override a configuration value (unstable)'
|
complete -c cargo -n __fish_use_subcommand -l config -d 'Override a configuration value (unstable)'
|
||||||
complete -c cargo -n __fish_use_subcommand -s Z -d 'Unstable (nightly-only) flags to Cargo, see \'cargo -Z help\' for details'
|
complete -c cargo -n __fish_use_subcommand -s Z -d 'Unstable (nightly-only) flags to Cargo, see \'cargo -Z help\' for details' -xa '(cargo -Z help | string replace -rf \'^\s*-Z (\S+)\s+(.*)\' \'$1\t$2\')'
|
||||||
complete -c cargo -n __fish_use_subcommand -s V -l version -d 'Print version info and exit'
|
complete -c cargo -n __fish_use_subcommand -s V -l version -d 'Print version info and exit'
|
||||||
complete -c cargo -n __fish_use_subcommand -l list -d 'List installed commands'
|
complete -c cargo -n __fish_use_subcommand -l list -d 'List installed commands'
|
||||||
complete -c cargo -n __fish_use_subcommand -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
|
complete -c cargo -n __fish_use_subcommand -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
|
||||||
@@ -614,7 +595,7 @@ complete -c cargo -n "__fish_seen_subcommand_from rustc" -l all-features -d 'Act
|
|||||||
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l no-default-features -d 'Do not activate the `default` feature'
|
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l no-default-features -d 'Do not activate the `default` feature'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l unit-graph -d 'Output build graph in JSON (unstable)'
|
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l unit-graph -d 'Output build graph in JSON (unstable)'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l ignore-rust-version -d 'Ignore `rust-version` specification in packages (unstable)'
|
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l ignore-rust-version -d 'Ignore `rust-version` specification in packages (unstable)'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l future-incompat-report -d 'Ouputs a future incompatibility report at the end of the build (unstable)'
|
complete -c cargo -n "__fish_seen_subcommand_from rustc" -l future-incompat-report -d 'Outputs a future incompatibility report at the end of the build (unstable)'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from rustc" -s h -l help -d 'Prints help information'
|
complete -c cargo -n "__fish_seen_subcommand_from rustc" -s h -l help -d 'Prints help information'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from rustc" -s V -l version -d 'Prints version information'
|
complete -c cargo -n "__fish_seen_subcommand_from rustc" -s V -l version -d 'Prints version information'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from rustc" -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
|
complete -c cargo -n "__fish_seen_subcommand_from rustc" -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
|
||||||
@@ -700,7 +681,7 @@ complete -c cargo -n "__fish_seen_subcommand_from test" -l all-features -d 'Acti
|
|||||||
complete -c cargo -n "__fish_seen_subcommand_from test" -l no-default-features -d 'Do not activate the `default` feature'
|
complete -c cargo -n "__fish_seen_subcommand_from test" -l no-default-features -d 'Do not activate the `default` feature'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from test" -l ignore-rust-version -d 'Ignore `rust-version` specification in packages (unstable)'
|
complete -c cargo -n "__fish_seen_subcommand_from test" -l ignore-rust-version -d 'Ignore `rust-version` specification in packages (unstable)'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from test" -l unit-graph -d 'Output build graph in JSON (unstable)'
|
complete -c cargo -n "__fish_seen_subcommand_from test" -l unit-graph -d 'Output build graph in JSON (unstable)'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from test" -l future-incompat-report -d 'Ouputs a future incompatibility report at the end of the build (unstable)'
|
complete -c cargo -n "__fish_seen_subcommand_from test" -l future-incompat-report -d 'Outputs a future incompatibility report at the end of the build (unstable)'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from test" -s h -l help -d 'Prints help information'
|
complete -c cargo -n "__fish_seen_subcommand_from test" -s h -l help -d 'Prints help information'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from test" -s V -l version -d 'Prints version information'
|
complete -c cargo -n "__fish_seen_subcommand_from test" -s V -l version -d 'Prints version information'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from test" -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
|
complete -c cargo -n "__fish_seen_subcommand_from test" -s v -l verbose -d 'Use verbose output (-vv very verbose/build.rs output)'
|
||||||
@@ -767,6 +748,7 @@ complete -c cargo -n "__fish_seen_subcommand_from update" -s v -l verbose -d 'Us
|
|||||||
complete -c cargo -n "__fish_seen_subcommand_from update" -l frozen -d 'Require Cargo.lock and cache are up to date'
|
complete -c cargo -n "__fish_seen_subcommand_from update" -l frozen -d 'Require Cargo.lock and cache are up to date'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from update" -l locked -d 'Require Cargo.lock is up to date'
|
complete -c cargo -n "__fish_seen_subcommand_from update" -l locked -d 'Require Cargo.lock is up to date'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from update" -l offline -d 'Run without accessing the network'
|
complete -c cargo -n "__fish_seen_subcommand_from update" -l offline -d 'Run without accessing the network'
|
||||||
|
complete -c cargo -n "__fish_seen_subcommand_from update" -l ignore-rust-version -d 'Ignore MSRV when checking updates'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from vendor" -l manifest-path -d 'Path to Cargo.toml'
|
complete -c cargo -n "__fish_seen_subcommand_from vendor" -l manifest-path -d 'Path to Cargo.toml'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from vendor" -s s -l sync -d 'Additional `Cargo.toml` to sync and vendor'
|
complete -c cargo -n "__fish_seen_subcommand_from vendor" -s s -l sync -d 'Additional `Cargo.toml` to sync and vendor'
|
||||||
complete -c cargo -n "__fish_seen_subcommand_from vendor" -l color -d 'Coloring: auto, always, never'
|
complete -c cargo -n "__fish_seen_subcommand_from vendor" -l color -d 'Coloring: auto, always, never'
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ complete -c cdrecord -o setdropts -d "Set driver specific options"
|
|||||||
complete -c cdrecord -o checkdrive -d "Checks if a driver for the current drive is present"
|
complete -c cdrecord -o checkdrive -d "Checks if a driver for the current drive is present"
|
||||||
complete -c cdrecord -o prcap -d "Print the drive capabilities for SCSI-3/mmc compliant drives"
|
complete -c cdrecord -o prcap -d "Print the drive capabilities for SCSI-3/mmc compliant drives"
|
||||||
complete -c cdrecord -o inq -d "Do an inquiry for the drive, print the inquiry info"
|
complete -c cdrecord -o inq -d "Do an inquiry for the drive, print the inquiry info"
|
||||||
complete -c cdrecord -o scanbus -d "Scan all SCSI devices on all SCSI busses and print the inquiry strings"
|
complete -c cdrecord -o scanbus -d "Scan all SCSI devices on all SCSI buses and print the inquiry strings"
|
||||||
complete -c cdrecord -o reset -d "Try to reset the SCSI bus where the CD recorder is located"
|
complete -c cdrecord -o reset -d "Try to reset the SCSI bus where the CD recorder is located"
|
||||||
complete -c cdrecord -o abort -d "Try to send an abort sequence to the drive"
|
complete -c cdrecord -o abort -d "Try to send an abort sequence to the drive"
|
||||||
complete -c cdrecord -o overburn -d "Allow writing more than the official size of a medium"
|
complete -c cdrecord -o overburn -d "Allow writing more than the official size of a medium"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ complete -c checkinstall -x -l maintainer -d "The package maintainer (.deb)"
|
|||||||
complete -c checkinstall -x -l provides -d "Features provided by this package"
|
complete -c checkinstall -x -l provides -d "Features provided by this package"
|
||||||
complete -c checkinstall -x -l requires -d "Features required by this package"
|
complete -c checkinstall -x -l requires -d "Features required by this package"
|
||||||
complete -c checkinstall -x -l recommends -d "Features recommended by this package"
|
complete -c checkinstall -x -l recommends -d "Features recommended by this package"
|
||||||
complete -c checkinstall -x -l sggests -d "Featues suggested by this package"
|
complete -c checkinstall -x -l sggests -d "Features suggested by this package"
|
||||||
complete -c checkinstall -x -l conflicts -d "Packages that this package cannot be installed with (.deb)"
|
complete -c checkinstall -x -l conflicts -d "Packages that this package cannot be installed with (.deb)"
|
||||||
complete -c checkinstall -x -l replaces -d "Packages that this package replaces (.deb)"
|
complete -c checkinstall -x -l replaces -d "Packages that this package replaces (.deb)"
|
||||||
complete -c checkinstall -x -l rpmflags -d "Pass these flags to the rpm installer"
|
complete -c checkinstall -x -l rpmflags -d "Pass these flags to the rpm installer"
|
||||||
@@ -57,7 +57,7 @@ complete -c checkinstall -x -l reset-uids -a "$yn" -d "Reset perms for all files
|
|||||||
complete -c checkinstall -x -l gzman -a "$yn" -d "Compress any man pages found inside the package"
|
complete -c checkinstall -x -l gzman -a "$yn" -d "Compress any man pages found inside the package"
|
||||||
complete -c checkinstall -x -l docdir -a "(__fish_complete_directories)" -d "Where to put documentation files"
|
complete -c checkinstall -x -l docdir -a "(__fish_complete_directories)" -d "Where to put documentation files"
|
||||||
complete -c checkinstall -x -l umask -d "Set the umask value"
|
complete -c checkinstall -x -l umask -d "Set the umask value"
|
||||||
complete -c checkinstall -x -l exclude -a "(__fish_complete_path)" -d "Excluse these files/directories from the package"
|
complete -c checkinstall -x -l exclude -a "(__fish_complete_path)" -d "Exclude these files/directories from the package"
|
||||||
complete -c checkinstall -F -r -l include -d "Include file/directories in this file in the package"
|
complete -c checkinstall -F -r -l include -d "Include file/directories in this file in the package"
|
||||||
complete -c checkinstall -f -l inspect -d "Inspect the package's file list"
|
complete -c checkinstall -f -l inspect -d "Inspect the package's file list"
|
||||||
complete -c checkinstall -f -l review-spec -d "Review the dpec file before creating a .rpm"
|
complete -c checkinstall -f -l review-spec -d "Review the dpec file before creating a .rpm"
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ complete -n __fish_climate_has_no_argument -c climate -a dir-size -d 'Find direc
|
|||||||
complete -n __fish_climate_has_no_argument -c climate -a remove-empty-dirs -d 'Remove empty directories'
|
complete -n __fish_climate_has_no_argument -c climate -a remove-empty-dirs -d 'Remove empty directories'
|
||||||
complete -n __fish_climate_has_no_argument -c climate -a extract -d 'Extract any given archive'
|
complete -n __fish_climate_has_no_argument -c climate -a extract -d 'Extract any given archive'
|
||||||
complete -n __fish_climate_has_no_argument -c climate -a find-duplicates -d 'Report duplicate files in a directory'
|
complete -n __fish_climate_has_no_argument -c climate -a find-duplicates -d 'Report duplicate files in a directory'
|
||||||
complete -n __fish_climate_has_no_argument -c climate -a count -d 'Count the number of occurences'
|
complete -n __fish_climate_has_no_argument -c climate -a count -d 'Count the number of occurrences'
|
||||||
complete -n __fish_climate_has_no_argument -c climate -a monitor -d 'Monitor file for changes'
|
complete -n __fish_climate_has_no_argument -c climate -a monitor -d 'Monitor file for changes'
|
||||||
complete -f -n __fish_climate_has_no_argument -c climate -a grep -d 'Search for the given pattern recursively'
|
complete -f -n __fish_climate_has_no_argument -c climate -a grep -d 'Search for the given pattern recursively'
|
||||||
complete -f -n __fish_climate_has_no_argument -c climate -a replace -d 'Replace all occurences'
|
complete -f -n __fish_climate_has_no_argument -c climate -a replace -d 'Replace all occurrences'
|
||||||
complete -f -n __fish_climate_has_no_argument -c climate -a ramfs -d 'Create a ramfs of size (in MB) at path'
|
complete -f -n __fish_climate_has_no_argument -c climate -a ramfs -d 'Create a ramfs of size (in MB) at path'
|
||||||
|
|
||||||
# Network
|
# Network
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user