Compare commits
2165 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
7a7ed4ea32 | |
|
|
d215391952 | |
|
|
d4d30592c2 | |
|
|
7a2db2fe49 | |
|
|
21621f3458 | |
|
|
8dd06dfaaf | |
|
|
96420d8c73 | |
|
|
32cff31cca | |
|
|
41d22dc6e4 | |
|
|
4be40305ba | |
|
|
9a94ecb9c9 | |
|
|
f916eeb8a3 | |
|
|
ef53598cbd | |
|
|
c4d76587ae | |
|
|
5879b07714 | |
|
|
d5bf7ae200 | |
|
|
cf98cc27ba | |
|
|
8d536db182 | |
|
|
d3578edb5f | |
|
|
d862f3b114 | |
|
|
dbaeafd96c | |
|
|
8b1b94a0d5 | |
|
|
47e40c923c | |
|
|
fbdd3b36b6 | |
|
|
ed67fbb8ee | |
|
|
72d91588a3 | |
|
|
b546f87141 | |
|
|
b988a84e1e | |
|
|
cc3181fcaa | |
|
|
5464333f29 | |
|
|
8b97eaf521 | |
|
|
959c0fa665 | |
|
|
3bf359f3cb | |
|
|
673251514c | |
|
|
7fa1a78810 | |
|
|
adad765241 | |
|
|
44be5b104f | |
|
|
dbad2d3a85 | |
|
|
f0b1a348a1 | |
|
|
60966d8044 | |
|
|
c288ac1660 | |
|
|
fd4a16961f | |
|
|
012017166b | |
|
|
109a9c809d | |
|
|
64487c7f40 | |
|
|
47d0792461 | |
|
|
748efd8af7 | |
|
|
519f6d6cee | |
|
|
748d11083a | |
|
|
a5d34d3aef | |
|
|
b1ffb771c9 | |
|
|
77ec5ecd6b | |
|
|
118705c01a | |
|
|
6879291030 | |
|
|
41fb750ec0 | |
|
|
601aa61311 | |
|
|
e118561a37 | |
|
|
2fdd13ab92 | |
|
|
9c0e68a83b | |
|
|
fab6ac22ff | |
|
|
5993fc38e7 | |
|
|
e4006dea72 | |
|
|
e461417f4e | |
|
|
97654f2813 | |
|
|
87378081ee | |
|
|
bb21390881 | |
|
|
be63667ca5 | |
|
|
986177c01f | |
|
|
bce05f9352 | |
|
|
504b84f000 | |
|
|
84d9053354 | |
|
|
51025ba738 | |
|
|
83748eefc0 | |
|
|
8ef1a35c32 | |
|
|
f1cd0e8940 | |
|
|
31236f26de | |
|
|
8758ee4809 | |
|
|
45f8084e70 | |
|
|
d1180f126a | |
|
|
96316552ea | |
|
|
0dce3a833b | |
|
|
da6814a485 | |
|
|
b9c943a9e8 | |
|
|
5c4fd5c1c5 | |
|
|
e534d39076 | |
|
|
8e505348f3 | |
|
|
309d615eb5 | |
|
|
9240b691d0 | |
|
|
003afbe513 | |
|
|
f1153d7a9d | |
|
|
ce3bdfed22 | |
|
|
fe94956940 | |
|
|
b5da595150 | |
|
|
7ea6b7a971 | |
|
|
32210c83c5 | |
|
|
867fb5a09c | |
|
|
28c5bdcaf8 | |
|
|
9dfdcf43c3 | |
|
|
fc2ebff046 | |
|
|
8c58e5f118 | |
|
|
83ac2d1e89 | |
|
|
71ac28d2e0 | |
|
|
c2ecb21e86 | |
|
|
0b0867f708 | |
|
|
6a445e594b | |
|
|
b9cd906208 | |
|
|
586a4eb4a8 | |
|
|
002a11fdb7 | |
|
|
970077590a | |
|
|
d330cb594f | |
|
|
eca213e017 | |
|
|
5f2fad31ae | |
|
|
370c7e4e58 | |
|
|
fe05ed6ed6 | |
|
|
95b96b10ba | |
|
|
a535d6d789 | |
|
|
eeb33f99ce | |
|
|
d9dd3f1a56 | |
|
|
eeda4af31d | |
|
|
c1b7ac5bf0 | |
|
|
ee1514fc41 | |
|
|
5d8642a3e8 | |
|
|
cf3aafe66c | |
|
|
1f058a345f | |
|
|
6a282fe7fa | |
|
|
c7f779e025 | |
|
|
0737ba0f1e | |
|
|
81438c5a2e | |
|
|
1fd073d384 | |
|
|
4a9df2bdc8 | |
|
|
ce1145e8ad | |
|
|
a110107c61 | |
|
|
5021b01fd3 | |
|
|
68549429e8 | |
|
|
5988583ac4 | |
|
|
271e06295a | |
|
|
7b58f23040 | |
|
|
88527a2778 | |
|
|
85543dcb35 | |
|
|
324622c0d7 | |
|
|
047e1a84fd | |
|
|
d6e87d4bb0 | |
|
|
81a016309d | |
|
|
63fb9ca323 | |
|
|
96821fc50a | |
|
|
3acc91b1d6 | |
|
|
3f222623a2 | |
|
|
189ee541a1 | |
|
|
9b16dadea5 | |
|
|
b835a4a76e | |
|
|
95b7c563b2 | |
|
|
53e705a257 | |
|
|
d5ac886499 | |
|
|
84e54cb11a | |
|
|
3fefbee79e | |
|
|
c852be29ac | |
|
|
759f22227d | |
|
|
d101590b86 | |
|
|
1b5eb7da8c | |
|
|
0b18ad83fc | |
|
|
fc4f116cec | |
|
|
bff5ba4c7a | |
|
|
d736522d58 | |
|
|
f6d745a6ef | |
|
|
8a714f0ab2 | |
|
|
2bcf6ca857 | |
|
|
6a6e4a9d5f | |
|
|
41aee557c2 | |
|
|
ae43a3a125 | |
|
|
106235197b | |
|
|
a54108c932 | |
|
|
769b2aac92 | |
|
|
410498264d | |
|
|
0f350f3bdb | |
|
|
cc7816fefc | |
|
|
66dd5eb527 | |
|
|
18e6e3557a | |
|
|
530a4f68ed | |
|
|
f103e01de0 | |
|
|
e4c9b686cd | |
|
|
9d7f1bd8b6 | |
|
|
ba9b7bb7d3 | |
|
|
48cd968441 | |
|
|
d255543a98 | |
|
|
14d065df4f | |
|
|
fb925c30a5 | |
|
|
f4b2b49aa2 | |
|
|
84615f3d0b | |
|
|
06a81722f1 | |
|
|
3a218ab0ec | |
|
|
a083ff773d | |
|
|
684021f2a1 | |
|
|
8d5f60cf38 | |
|
|
80613d862a | |
|
|
b5a9ce4b37 | |
|
|
79da59126e | |
|
|
b302f21ed9 | |
|
|
4c84ebad53 | |
|
|
39bbdda416 | |
|
|
f344c2ca77 | |
|
|
fbddce1074 | |
|
|
ea15ee250e | |
|
|
4375bc3e03 | |
|
|
532813bd3b | |
|
|
f6c262ad83 | |
|
|
9c17cce4ef | |
|
|
a5f0a52034 | |
|
|
8d93e4c1ee | |
|
|
3429cd2c1f | |
|
|
4dbdbd4f8b | |
|
|
5a5edf6914 | |
|
|
39b0b06c15 | |
|
|
d4af3659cc | |
|
|
46c88449e6 | |
|
|
989d044545 | |
|
|
318dc0bec5 | |
|
|
a83d61b6c6 | |
|
|
ad47c4a28f | |
|
|
7dd26c5d5c | |
|
|
8794fdca69 | |
|
|
d41e237045 | |
|
|
93dc422070 | |
|
|
6370f5a58f | |
|
|
8ecee23cab | |
|
|
8a994c20d7 | |
|
|
672ae69366 | |
|
|
7288768da6 | |
|
|
1ba992dcde | |
|
|
c31ad08eff | |
|
|
05a1cf8a8a | |
|
|
9f8413696d | |
|
|
2733ff9818 | |
|
|
d88254ecc8 | |
|
|
d20ceda628 | |
|
|
f5a724c6b4 | |
|
|
3a6b825648 | |
|
|
7fb495cab5 | |
|
|
779f02a78b | |
|
|
2cff35a45d | |
|
|
64484169e2 | |
|
|
dcb4a996ad | |
|
|
0db1486d27 | |
|
|
b5e4884e5f | |
|
|
727876e7f6 | |
|
|
5a51b45f36 | |
|
|
6ceec63710 | |
|
|
9cade7e492 | |
|
|
80e1300bfa | |
|
|
a179824294 | |
|
|
daa3d5a888 | |
|
|
531d8ce5e7 | |
|
|
9a54b251df | |
|
|
c72e40337a | |
|
|
053d03a42c | |
|
|
b940cdb555 | |
|
|
434e2fae7a | |
|
|
e673a26633 | |
|
|
75a4f7b2a4 | |
|
|
65e43503f7 | |
|
|
5f3b8a0f7d | |
|
|
02f3cfd280 | |
|
|
35ffa5016d | |
|
|
44672f36f4 | |
|
|
c838dc990b | |
|
|
b9f1efca5b | |
|
|
0677484d25 | |
|
|
9c57177447 | |
|
|
7fdc6c0fa2 | |
|
|
0cc8dfaea5 | |
|
|
0f6ab54b85 | |
|
|
91256ebd52 | |
|
|
b07586490b | |
|
|
1f7907894f | |
|
|
8ec4565397 | |
|
|
d59350592b | |
|
|
96cdf49da3 | |
|
|
737bce8e4b | |
|
|
c939857cbe | |
|
|
cb55f8a4d3 | |
|
|
51e5c047c2 | |
|
|
b45ffc1c8a | |
|
|
7dd5752396 | |
|
|
2f81ccb55e | |
|
|
5991654348 | |
|
|
04b4ec2af7 | |
|
|
e776d2c430 | |
|
|
76bdbc994e | |
|
|
c3b2ff2d8f | |
|
|
d2ab32cce6 | |
|
|
6d3a599fe9 | |
|
|
ffab2ffe78 | |
|
|
c0be9df951 | |
|
|
c6c20a469e | |
|
|
80e347f791 | |
|
|
4e767d9139 | |
|
|
d71f2edbc7 | |
|
|
1dbde8a199 | |
|
|
c1445ca6ce | |
|
|
7e8118e466 | |
|
|
c32a6d756b | |
|
|
8ddc4416dd | |
|
|
ff28a2686d | |
|
|
f20012f35f | |
|
|
584dfd5d30 | |
|
|
c0200438ed | |
|
|
46317b36e2 | |
|
|
8cecc84fb3 | |
|
|
508f2971c2 | |
|
|
094a7e79b0 | |
|
|
e4072c73ba | |
|
|
c30c5509e1 | |
|
|
7e671b08d1 | |
|
|
572ed9638f | |
|
|
c16614f37e | |
|
|
10147cfb99 | |
|
|
b664a1e7f3 | |
|
|
48203e84ae | |
|
|
863c0116e1 | |
|
|
7fbdd25526 | |
|
|
55cf78b510 | |
|
|
8433d73097 | |
|
|
97621528c6 | |
|
|
1262853ed3 | |
|
|
5a79f8c721 | |
|
|
59e36ba77b | |
|
|
7f461a9a40 | |
|
|
0b9424d0c8 | |
|
|
5384be72c5 | |
|
|
7c4d643f58 | |
|
|
d1478b05be | |
|
|
a8fcd0402f | |
|
|
b2d0232473 | |
|
|
b66a1aba63 | |
|
|
667494f334 | |
|
|
215780cd9c | |
|
|
20423a74f8 | |
|
|
55e9d8e6eb | |
|
|
e51f50f5a5 | |
|
|
1b97a1492b | |
|
|
4a7179ffff | |
|
|
7aeefd0020 | |
|
|
9e2a5239dc | |
|
|
c47e10641a | |
|
|
c49bb88997 | |
|
|
5fd23d5376 | |
|
|
e74df1347f | |
|
|
41a21a4d57 | |
|
|
1cbda7f841 | |
|
|
26e54f9772 | |
|
|
d682198a7b | |
|
|
4e8c09fa83 | |
|
|
a5f749cd4a | |
|
|
483c208156 | |
|
|
173a14c436 | |
|
|
1ffeeec3b6 | |
|
|
d08cee09ce | |
|
|
058383dc2d | |
|
|
d3d42e70ec | |
|
|
07ad869b7a | |
|
|
b48b5de9d8 | |
|
|
cd3cd0ab3b | |
|
|
35228e5ac0 | |
|
|
3c89229e0e | |
|
|
8d5a945c93 | |
|
|
cafb93cd93 | |
|
|
e94efecefa | |
|
|
1587db0b96 | |
|
|
5884510698 | |
|
|
cc16a51600 | |
|
|
faa7c0f755 | |
|
|
90be2a206f | |
|
|
cc18accaac | |
|
|
f55325505d | |
|
|
6ba76c84eb | |
|
|
ee6a2d0416 | |
|
|
1488badf72 | |
|
|
73b5b78d70 | |
|
|
50611e5b99 | |
|
|
3ef170ff4f | |
|
|
dee6427296 | |
|
|
f21d28a4a1 | |
|
|
420a3d78c9 | |
|
|
0032bac859 | |
|
|
bdee8a976c | |
|
|
331e0ab9fa | |
|
|
d9b1b2bfa9 | |
|
|
8a7515adc8 | |
|
|
3e05c06501 | |
|
|
0867c7fe93 | |
|
|
5f24f3bc42 | |
|
|
fb87bc486f | |
|
|
dc58df104d | |
|
|
06b7c9bc38 | |
|
|
12c780b2b1 | |
|
|
922abfe707 | |
|
|
ed034970c2 | |
|
|
fe11bbe8b0 | |
|
|
1ee071125e | |
|
|
6ba54212d0 | |
|
|
932c16fd0e | |
|
|
e07f6fb780 | |
|
|
d326bdc241 | |
|
|
335af5c72d | |
|
|
c29efd0bc3 | |
|
|
4625071e98 | |
|
|
21789376b8 | |
|
|
a221bd2653 | |
|
|
ab95699400 | |
|
|
99d000d880 | |
|
|
d1469c6e4f | |
|
|
77cad16cc7 | |
|
|
8af769e5f1 | |
|
|
67e6bdbc3c | |
|
|
98dd809126 | |
|
|
c4fca6525a | |
|
|
4f6441f9ee | |
|
|
4e0cdee2e7 | |
|
|
e5507e0d0c | |
|
|
370253ca8c | |
|
|
e61c9c14d6 | |
|
|
00cf14deaa | |
|
|
6ea205dc14 | |
|
|
fc979f7a3e | |
|
|
42e9e1e563 | |
|
|
ee50f24411 | |
|
|
0adf2f053e | |
|
|
b84082e664 | |
|
|
7f0a0c4451 | |
|
|
f9c7cbe31f | |
|
|
85e041be36 | |
|
|
bb09f70830 | |
|
|
a7f01622f7 | |
|
|
681bd4bff8 | |
|
|
1819f7aefc | |
|
|
4201e3ca77 | |
|
|
c160d09fdd | |
|
|
59184db64a | |
|
|
6ff1a671a8 | |
|
|
3f00e7cf9b | |
|
|
a169722fb3 | |
|
|
97804d9b97 | |
|
|
375d578d84 | |
|
|
bb6d6ba990 | |
|
|
1ae4ab5dc2 | |
|
|
e7068f9923 | |
|
|
a9c9c72fae | |
|
|
8f1b90cd4b | |
|
|
b97fdbd1a6 | |
|
|
a0effab950 | |
|
|
1b16b6c697 | |
|
|
874917fa56 | |
|
|
509d844cc8 | |
|
|
f607e941cb | |
|
|
8d42717387 | |
|
|
610aef9f12 | |
|
|
692e96ce54 | |
|
|
360ee98d66 | |
|
|
6dec4885d3 | |
|
|
df14fc4a66 | |
|
|
fdc290d417 | |
|
|
2c2d87889a | |
|
|
8f3baa3b1e | |
|
|
c791de1006 | |
|
|
9df3345fe4 | |
|
|
072561b06f | |
|
|
dedc7871fd | |
|
|
b6a32c0053 | |
|
|
e2e529a7fa | |
|
|
066b069150 | |
|
|
16dd307a93 | |
|
|
d24f58d2f1 | |
|
|
139dc0e2d9 | |
|
|
10dd51ded3 | |
|
|
06e2f14637 | |
|
|
19ddc7f7cf | |
|
|
dbf4d71d5f | |
|
|
f96778edad | |
|
|
53d5876cfe | |
|
|
b5e87b9a1a | |
|
|
3b824c596e | |
|
|
e897589c96 | |
|
|
35f2ed45dd | |
|
|
5e40b7ba09 | |
|
|
4dfb7a51c5 | |
|
|
8abb801db2 | |
|
|
3ce9d453ae | |
|
|
4145b89b06 | |
|
|
f8a220d657 | |
|
|
77005bb0dc | |
|
|
22222832d8 | |
|
|
f036321bc4 | |
|
|
ef50c3a7b9 | |
|
|
9380071ffb | |
|
|
580b096df4 | |
|
|
da937c9124 | |
|
|
a8dacc93aa | |
|
|
238d3b0749 | |
|
|
13b8ba55e2 | |
|
|
89d7a5ec24 | |
|
|
78c0ab5f95 | |
|
|
aac56495ba | |
|
|
61c84a203c | |
|
|
937cd0fcea | |
|
|
f475c1322f | |
|
|
057d9a9940 | |
|
|
5a4bbc1ad8 | |
|
|
b4c970619b | |
|
|
91fce88036 | |
|
|
177fadadba | |
|
|
4b55f149e6 | |
|
|
f8c41dbdbb | |
|
|
499e5be22e | |
|
|
a50d486f6d | |
|
|
14160839cb | |
|
|
7a884c75b4 | |
|
|
7313f8360b | |
|
|
0a8eb1b0b7 | |
|
|
0bd94fb993 | |
|
|
6621b9fa2f | |
|
|
0a66357930 | |
|
|
978e79e12c | |
|
|
fce3599932 | |
|
|
b1cf651870 | |
|
|
a46f3ffca2 | |
|
|
efaa595ae9 | |
|
|
542e80beee | |
|
|
a830cb4229 | |
|
|
7e78199771 | |
|
|
8ded919b3f | |
|
|
c48586fd04 | |
|
|
4fc8c131ba | |
|
|
a458210c1d | |
|
|
83cbd81082 | |
|
|
7666b5fe6d | |
|
|
2f951267cd | |
|
|
c1f23ccd02 | |
|
|
507f1f8715 | |
|
|
9f7a83c0ac | |
|
|
10d8919acb | |
|
|
42c6d28610 | |
|
|
06bda0b3e9 | |
|
|
f34f9d915d | |
|
|
0cfa4990ac | |
|
|
9a23ac3509 | |
|
|
25691f59b5 | |
|
|
1a5f36cdc4 | |
|
|
f7c3173886 | |
|
|
11e5579d35 | |
|
|
9da7488c11 | |
|
|
719d72d025 | |
|
|
634736c009 | |
|
|
e12430589c | |
|
|
9e341f6a20 | |
|
|
d04e01fce3 | |
|
|
a0f027a1de | |
|
|
e097ee8b0c | |
|
|
ac96055f0c | |
|
|
fee1c475af | |
|
|
7f84cdaf9c | |
|
|
bd6f7d8c5b | |
|
|
8a06b24ae1 | |
|
|
5979928262 | |
|
|
903b9b7134 | |
|
|
fd6ac7bd64 | |
|
|
e969ea6f6e | |
|
|
660b7e4963 | |
|
|
1e80d3c1bf | |
|
|
9d358ae351 | |
|
|
8fed2d1e83 | |
|
|
9a59a71911 | |
|
|
1f93068627 | |
|
|
2c1e9af195 | |
|
|
4351e11484 | |
|
|
88d1bceafb | |
|
|
81013dbbc1 | |
|
|
1fab982047 | |
|
|
41e7188db5 | |
|
|
5e6f4da967 | |
|
|
d88edeed35 | |
|
|
c05d0fdfe0 | |
|
|
e7ccc55947 | |
|
|
2c5bfabb5e | |
|
|
7a19598927 | |
|
|
1a9467fdff | |
|
|
8068693aee | |
|
|
d7f6a06e1a | |
|
|
9f9c4dec36 | |
|
|
0a1a8b89d9 | |
|
|
c0fe16fdad | |
|
|
b57558b024 | |
|
|
bed209ca64 | |
|
|
c118ed452d | |
|
|
0d26ab80ed | |
|
|
fb7078044b | |
|
|
bc8cdc6b79 | |
|
|
7e9e14517d | |
|
|
07fe4030a6 | |
|
|
6cbfc1b942 | |
|
|
facf918250 | |
|
|
0cee6ab508 | |
|
|
35b2bfe90c | |
|
|
1ec2fd373f | |
|
|
76dde7cb7b | |
|
|
c8c09241eb | |
|
|
898dbaf873 | |
|
|
9dfd82bc78 | |
|
|
c23b29fff8 | |
|
|
da36aa8710 | |
|
|
28f602902e | |
|
|
ae3a2e4400 | |
|
|
db79320716 | |
|
|
abbd91220b | |
|
|
ab99231c26 | |
|
|
31845d56b2 | |
|
|
43a0fd3b44 | |
|
|
a2dae495f7 | |
|
|
67921bc125 | |
|
|
796ee337fa | |
|
|
7603240219 | |
|
|
5ccec94b18 | |
|
|
5794f18e01 | |
|
|
4172b053de | |
|
|
7494992bab | |
|
|
955ac75daf | |
|
|
2a2efae5f6 | |
|
|
fdcb0ef6f3 | |
|
|
ba54f170a6 | |
|
|
75094d7275 | |
|
|
5e0f32e676 | |
|
|
2732408990 | |
|
|
b44635f0d9 | |
|
|
30fd820805 | |
|
|
05fd700404 | |
|
|
5328eb7c01 | |
|
|
3a817b893e | |
|
|
97c9884255 | |
|
|
e359dcb1d3 | |
|
|
83f09c4615 | |
|
|
e8814323ff | |
|
|
aa5af8f991 | |
|
|
cfc3d2a207 | |
|
|
323231ac9d | |
|
|
302f477e10 | |
|
|
66c4b6fe72 | |
|
|
543f122195 | |
|
|
744af1910b | |
|
|
b9d86204bb | |
|
|
a7bdfdf56e | |
|
|
128f6dec82 | |
|
|
8990e74097 | |
|
|
212b0d50f1 | |
|
|
0ebf45ba93 | |
|
|
4516f61d96 | |
|
|
4f59353fe1 | |
|
|
7427f0a294 | |
|
|
449cc702dc | |
|
|
90471c3877 | |
|
|
64ec7994dc | |
|
|
ec557e1fed | |
|
|
45a37bc26f | |
|
|
e797437fe5 | |
|
|
820aaba911 | |
|
|
889db4f8f6 | |
|
|
cd3b8a4657 | |
|
|
c20d6e9212 | |
|
|
98ea8e685c | |
|
|
40ae92e112 | |
|
|
92dc417c3e | |
|
|
d71ddaa6eb | |
|
|
ddb66cf14c | |
|
|
ec3fc086c3 | |
|
|
234e5d3e61 | |
|
|
9fa28becba | |
|
|
b030b22f64 | |
|
|
348187fac2 | |
|
|
4de5a8cc6a | |
|
|
60699cd07d | |
|
|
7f2beb4fd3 | |
|
|
04a65a56de | |
|
|
86d55972f5 | |
|
|
a2c3a97252 | |
|
|
828fe2bd3c | |
|
|
e936451b03 | |
|
|
874bd4d323 | |
|
|
b07000ca5f | |
|
|
3e3e2f97f2 | |
|
|
c156a2a548 | |
|
|
e9191ffa95 | |
|
|
54156de9cb | |
|
|
14817f4f11 | |
|
|
4f5a896b96 | |
|
|
dd686f35d1 | |
|
|
865fd86d2e | |
|
|
1204f45161 | |
|
|
4ac9173088 | |
|
|
45d07f79b0 | |
|
|
8c6ffb73e9 | |
|
|
61e6ab29ba | |
|
|
5310fa6f33 | |
|
|
852e1f35b2 | |
|
|
f178a3b36b | |
|
|
1d492c7151 | |
|
|
7a3387ed46 | |
|
|
d368e2a3b8 | |
|
|
3acaeebfcb | |
|
|
b46602db39 | |
|
|
ed5394d671 | |
|
|
0682649330 | |
|
|
0491bd2cbe | |
|
|
756831c818 | |
|
|
b3eb781837 | |
|
|
62e0e74083 | |
|
|
eecf5d5c10 | |
|
|
2df4d30003 | |
|
|
9035bfb0a8 | |
|
|
4c66875a7b | |
|
|
337c43064e | |
|
|
46e5e95405 | |
|
|
d54db07dd5 | |
|
|
fa57596f67 | |
|
|
8d40ac67bf | |
|
|
a6f3ed2616 | |
|
|
2e02fa2bc4 | |
|
|
bf30efa147 | |
|
|
793c77ece9 | |
|
|
428473bcc5 | |
|
|
a5cc26eee1 | |
|
|
e2aeee4ba5 | |
|
|
01c0875bb5 | |
|
|
c4c820a54a | |
|
|
eff72eacf6 | |
|
|
2c8261ee2f | |
|
|
4f8614d0ac | |
|
|
a7b82b0199 | |
|
|
6ec58b685e | |
|
|
6fe5f8a46a | |
|
|
2228daef0e | |
|
|
a9ae3899b7 | |
|
|
61ccfe353f | |
|
|
38e1989e64 | |
|
|
7aba5946ca | |
|
|
259eec99ba | |
|
|
a2d4ea00d9 | |
|
|
317a63bc03 | |
|
|
0211e566da | |
|
|
f0af8a58bf | |
|
|
7ec9280e88 | |
|
|
5ba8f9c405 | |
|
|
021da0cde5 | |
|
|
b215131217 | |
|
|
9a1ec0e9ee | |
|
|
7b8bb64cbb | |
|
|
12e788f4a5 | |
|
|
07a062b77e | |
|
|
f9373c96c7 | |
|
|
10a706d337 | |
|
|
d6e8817991 | |
|
|
3b0477499e | |
|
|
3d26c20452 | |
|
|
a09284a734 | |
|
|
ccac058058 | |
|
|
fa0b8386b4 | |
|
|
fc35e4e6c3 | |
|
|
59560d43a4 | |
|
|
3b7609ad4f | |
|
|
92eae00fa1 | |
|
|
2a284cfefa | |
|
|
55a3314a2d | |
|
|
0439726d19 | |
|
|
fc9ff87d12 | |
|
|
17f57c2b2e | |
|
|
e8f1574203 | |
|
|
b96a310c96 | |
|
|
2b16b33a10 | |
|
|
b263de0778 | |
|
|
fddcae4a29 | |
|
|
0b6e064850 | |
|
|
e6cb409135 | |
|
|
3c49fc1f15 | |
|
|
256e21a314 | |
|
|
4527ea4c64 | |
|
|
3a9bc83c91 | |
|
|
92199f20b2 | |
|
|
6a5b7245be | |
|
|
bffb7ef747 | |
|
|
703b877bac | |
|
|
141d79e67b | |
|
|
09efd4c547 | |
|
|
bec6ca01b1 | |
|
|
6e7478967f | |
|
|
0f4dddf7d8 | |
|
|
df1bba9803 | |
|
|
df4f71fb8c | |
|
|
6b33831ab3 | |
|
|
8840190985 | |
|
|
ba6f1e662e | |
|
|
8052a7ef0b | |
|
|
1de72da1df | |
|
|
83842b03d6 | |
|
|
e001c1e523 | |
|
|
b920d83b9a | |
|
|
8f55f16f8d | |
|
|
c6fdfc6cfa | |
|
|
bfe43af637 | |
|
|
7483c68a70 | |
|
|
00dca0baf8 | |
|
|
6f259a706e | |
|
|
e7d3f4c6c6 | |
|
|
6569c7df34 | |
|
|
812d2202c0 | |
|
|
3eec22b0f6 | |
|
|
b293a95465 | |
|
|
dd7a1378d0 | |
|
|
47e55a8715 | |
|
|
80f7f13d6d | |
|
|
c41e744e14 | |
|
|
da7339b4b2 | |
|
|
100a9171ff | |
|
|
c39f496be3 | |
|
|
710e0c19a6 | |
|
|
789db31745 | |
|
|
789054ed27 | |
|
|
7cea53d40d | |
|
|
8c8c42e123 | |
|
|
d62dcaf896 | |
|
|
63a275bc2e | |
|
|
6de723fd36 | |
|
|
01ff97e2fe | |
|
|
4fbbe31928 | |
|
|
3e07b1e030 | |
|
|
22f873dc5e | |
|
|
645936e055 | |
|
|
fd462fc4dc | |
|
|
4ab4eaea2d | |
|
|
90fc2e1c44 | |
|
|
7916ba50ed | |
|
|
b0206148f1 | |
|
|
28070aa9e4 | |
|
|
c3ff722d2e | |
|
|
45b5a8a78d | |
|
|
2d9d1ffa60 | |
|
|
ec65b307c7 | |
|
|
6470db93fb | |
|
|
c03ee3f617 | |
|
|
28affc5c80 | |
|
|
08cff30f4d | |
|
|
27e61dfbaf | |
|
|
1db9015d76 | |
|
|
d45e52f607 | |
|
|
23e63a98c2 | |
|
|
20edd70f84 | |
|
|
4e63f4566a | |
|
|
6310817eb4 | |
|
|
b736f2679c | |
|
|
0913143538 | |
|
|
52188442a4 | |
|
|
bfc56a2e4c | |
|
|
14da57e8e2 | |
|
|
1794788d69 | |
|
|
4bf24327ba | |
|
|
57c868face | |
|
|
3e46a875d4 | |
|
|
b4ec85ede7 | |
|
|
1d13f2ad9b | |
|
|
aedae136e7 | |
|
|
2dfe3ca220 | |
|
|
655576f336 | |
|
|
79b3418462 | |
|
|
10b46f923a | |
|
|
879f4b6515 | |
|
|
e64e3c2d02 | |
|
|
527c3d3d79 | |
|
|
57330ba11b | |
|
|
6a33c3f666 | |
|
|
acd4de5268 | |
|
|
e6fdabb97d | |
|
|
c1de68a88f | |
|
|
53f2eab090 | |
|
|
11ad45a66e | |
|
|
9571c507f4 | |
|
|
87f190da85 | |
|
|
f360827b88 | |
|
|
b131623ee4 | |
|
|
ae63b5ae41 | |
|
|
85a0874060 | |
|
|
88b284dc6d | |
|
|
b5ba0051dc | |
|
|
40c1e44216 | |
|
|
11258bcd48 | |
|
|
061f09cd53 | |
|
|
073379d908 | |
|
|
7f84f65d60 | |
|
|
0331b2908f | |
|
|
cc2df4217e | |
|
|
f193f0d4fb | |
|
|
12a73d0200 | |
|
|
07c37ce8c4 | |
|
|
fc517dd8ad | |
|
|
f230d3cf81 | |
|
|
bacf79fc34 | |
|
|
dd45d21d06 | |
|
|
af030b381f | |
|
|
6f407f5287 | |
|
|
45cb3becd8 | |
|
|
263c14d969 | |
|
|
28ef391e35 | |
|
|
fcf490292e | |
|
|
63d333ce88 | |
|
|
2e3c3f6cf0 | |
|
|
14de4f5b13 | |
|
|
7a72511f7b | |
|
|
19b03c3b2d | |
|
|
ca484eac40 | |
|
|
20b3e087fd | |
|
|
00a7cc2200 | |
|
|
03731671e3 | |
|
|
3d394ebaa1 | |
|
|
ac3e08c9d4 | |
|
|
6db5ddc655 | |
|
|
4371e1a831 | |
|
|
55d07cc577 | |
|
|
3933b18fb3 | |
|
|
51a663f0d6 | |
|
|
e17d424462 | |
|
|
6fbf5fc9a7 | |
|
|
d9e81e08f2 | |
|
|
ff6031a8ea | |
|
|
fa5a3843f4 | |
|
|
b34650ea31 | |
|
|
83d9ea9218 | |
|
|
3fb84ee9cc | |
|
|
530ee90b48 | |
|
|
81cd07bb9e | |
|
|
298020e4e3 | |
|
|
406167058b | |
|
|
1f1962e867 | |
|
|
2c3b218d24 | |
|
|
b3469afc24 | |
|
|
c83b6a505b | |
|
|
f20a81f813 | |
|
|
546fa7e5bb | |
|
|
97093ddac6 | |
|
|
20f3cd5f5d | |
|
|
1b1b0c7c8f | |
|
|
bffff37c3e | |
|
|
d84a6d3b21 | |
|
|
b3876c5982 | |
|
|
da037c4ba7 | |
|
|
e4090f1baa | |
|
|
790890e256 | |
|
|
839df66922 | |
|
|
2f54f2b212 | |
|
|
c6bce7358c | |
|
|
1a0808696c | |
|
|
ac3ceba238 | |
|
|
536bd1d3d4 | |
|
|
1f5e5ff471 | |
|
|
392487b0fa | |
|
|
da42a24a07 | |
|
|
b5de3d53e0 | |
|
|
a1a11caf4f | |
|
|
0fd25cda7a | |
|
|
bebaa6126e | |
|
|
cd18e471bb | |
|
|
32732916a0 | |
|
|
99a6b6cb6e | |
|
|
f52061cd68 | |
|
|
b49f300934 | |
|
|
394239d746 | |
|
|
ae82a1efae | |
|
|
00b5130b26 | |
|
|
8ed1a90bde | |
|
|
d4511c2365 | |
|
|
f996cf93ed | |
|
|
a736cfe8e5 | |
|
|
5025527880 | |
|
|
9dfd5c6670 | |
|
|
11ad0a45ff | |
|
|
c4b8c83315 | |
|
|
e14d47010a | |
|
|
876e972fe0 | |
|
|
773ead6ea7 | |
|
|
67ced04c7f | |
|
|
252c7a995b | |
|
|
78fb97c24d | |
|
|
d7959bb716 | |
|
|
fea56d1a7b | |
|
|
57ba534a6a | |
|
|
d930094f84 | |
|
|
901a787b2d | |
|
|
b65eb5d64e | |
|
|
cb4b721ada | |
|
|
43fecdfe87 | |
|
|
98cb234270 | |
|
|
f0c856912c | |
|
|
cec348209c | |
|
|
788926ffba | |
|
|
24834255e9 | |
|
|
f1ab6110ce | |
|
|
b152a4901f | |
|
|
aa98bc593f | |
|
|
23ce4b9085 | |
|
|
322d5f24f7 | |
|
|
d16c8aea54 | |
|
|
c7baec49d3 | |
|
|
37a9a485ee | |
|
|
6fe9995fd9 | |
|
|
4c5a8ef41e | |
|
|
ab80ddd379 | |
|
|
a1d53f8824 | |
|
|
c90c27f8fc | |
|
|
b8cc3b9b67 | |
|
|
19a412373f | |
|
|
00c7e28e4a | |
|
|
3511fb04db | |
|
|
244cbfc832 | |
|
|
17d92b0a8e | |
|
|
5922465d53 | |
|
|
9def41ae64 | |
|
|
7a4574cd45 | |
|
|
43a6b81308 | |
|
|
44c5bce312 | |
|
|
118cc8b544 | |
|
|
6dff9453ca | |
|
|
19e65b20dd | |
|
|
f5d179b0b5 | |
|
|
7246533baa | |
|
|
990e604652 | |
|
|
2dc84783fe | |
|
|
63b470243b | |
|
|
2e009c7ab8 | |
|
|
2d5a8a3ef1 | |
|
|
454d236d3a | |
|
|
17ba32f8e2 | |
|
|
55026f8ed9 | |
|
|
4407a48b96 | |
|
|
84c523505e | |
|
|
c6621bb692 | |
|
|
31c76d90a7 | |
|
|
231db68806 | |
|
|
16b89473a7 | |
|
|
afcaccd3ca | |
|
|
74a316cca8 | |
|
|
3b247d3071 | |
|
|
3eea79e9e6 | |
|
|
76efcab2f9 | |
|
|
f371431619 | |
|
|
cfb2dc47db | |
|
|
0bd08521f9 | |
|
|
786d0f5758 | |
|
|
ae19ab20f5 | |
|
|
d3c3df0f2e | |
|
|
787ea7a719 | |
|
|
ed4ff5384b | |
|
|
23614ea318 | |
|
|
d0a060841d | |
|
|
6daa0849e2 | |
|
|
47ee32aa2e | |
|
|
c13c3ce7f8 | |
|
|
a2fa9788b6 | |
|
|
c69a1a00a1 | |
|
|
b7bc314a82 | |
|
|
c65ddb6621 | |
|
|
582c6f3454 | |
|
|
b43531a749 | |
|
|
5ab4025cc5 | |
|
|
7a23291f66 | |
|
|
013f6ac258 | |
|
|
bbfdc2635a | |
|
|
815f3808a0 | |
|
|
346c1a38e5 | |
|
|
836d9e27bb | |
|
|
8a47b2dd97 | |
|
|
cafbd76037 | |
|
|
bb61ca2a97 | |
|
|
9db043ca96 | |
|
|
ce6e7b8f89 | |
|
|
07c5f46eea | |
|
|
d2e61b4f4a | |
|
|
fe8e9a0d29 | |
|
|
8e04c962d0 | |
|
|
ba0cc35915 | |
|
|
6b3869cd32 | |
|
|
ab17b682be | |
|
|
af2e596fa8 | |
|
|
8b7e37acce | |
|
|
bb23316a9f | |
|
|
ffaa7d5b67 | |
|
|
7efa6b7987 | |
|
|
769585ecb3 | |
|
|
c66b651f1f | |
|
|
2c2cc6cc43 | |
|
|
2441475f56 | |
|
|
f46cc5639f | |
|
|
61ef747cd2 | |
|
|
18a6415967 | |
|
|
1e42bda442 | |
|
|
a2b542f687 | |
|
|
0928b14409 | |
|
|
8292501ae1 | |
|
|
e9e8e8f322 | |
|
|
f816c920c5 | |
|
|
a36eb3b7cb | |
|
|
9dc327a19b | |
|
|
f7b828d2c2 | |
|
|
e60485263b | |
|
|
a91e86106d | |
|
|
aea74be9a4 | |
|
|
91c7785937 | |
|
|
580905588b | |
|
|
3d6bbc108e | |
|
|
73505e4768 | |
|
|
a500a4e5d2 | |
|
|
fd64c85cf7 | |
|
|
bb8d024b65 | |
|
|
1a420d3839 | |
|
|
44e1c1ed9c | |
|
|
4601310ac2 | |
|
|
195bdb40c7 | |
|
|
4817a6afba | |
|
|
d57ce3b635 | |
|
|
378d08d82d | |
|
|
44b3d21dd7 | |
|
|
565d378f00 | |
|
|
864db6690a | |
|
|
86995a135e | |
|
|
41828e2df4 | |
|
|
48550b5ec5 | |
|
|
e6eb268a07 | |
|
|
6599edabdc | |
|
|
9f5aa05a75 | |
|
|
376c51ca59 | |
|
|
d4e54f1e04 | |
|
|
e8781a252e | |
|
|
7e614ffb9a | |
|
|
bc51049d99 | |
|
|
9e9bee7066 | |
|
|
578d1d59c2 | |
|
|
bb376aee80 | |
|
|
e928ee1764 | |
|
|
6e16420828 | |
|
|
72b1b8f8c1 | |
|
|
3b36dcfe77 | |
|
|
0b2d06f012 | |
|
|
99780ec53d | |
|
|
e1523b4d68 | |
|
|
dc00f90ff7 | |
|
|
bf24777aa1 | |
|
|
78d8744642 | |
|
|
a264c2d123 | |
|
|
d9690b1a67 | |
|
|
ed0c7a75df | |
|
|
dcd7c63c3e | |
|
|
10a79ec71a | |
|
|
b9256a9942 | |
|
|
dddbea879b | |
|
|
724cb01511 | |
|
|
d1d7e6eefa | |
|
|
2f2b027085 | |
|
|
a71b924b83 | |
|
|
f46ec9befb | |
|
|
7455d602a4 | |
|
|
a6e641b977 | |
|
|
152abee68a | |
|
|
493984e7f1 | |
|
|
e32536a208 | |
|
|
4bf0ed4049 | |
|
|
2b34796cb6 | |
|
|
a9d0a2cda6 | |
|
|
1eb4759854 | |
|
|
f6eff10118 | |
|
|
8def5f1583 | |
|
|
87e131334f | |
|
|
bbc8bada78 | |
|
|
6e6468d51f | |
|
|
c9b335769c | |
|
|
4b5da4cbe0 | |
|
|
0d8db2fb32 | |
|
|
21aa84dba2 | |
|
|
a47b58ef97 | |
|
|
c6bdbc69e1 | |
|
|
922eee0706 | |
|
|
4add7f4dfb | |
|
|
09ab278312 | |
|
|
ed44d39efa | |
|
|
1000d2ea8b | |
|
|
a3fab81aec | |
|
|
ef31690c88 | |
|
|
40c6c768ea | |
|
|
a9704678f8 | |
|
|
9a461c7c9d | |
|
|
ca24e66278 | |
|
|
0a0894d07c | |
|
|
17239cec96 | |
|
|
c8647517f3 | |
|
|
1133c0c82d | |
|
|
4001cd83cf | |
|
|
725c65cc4c | |
|
|
c5a45e3e3f | |
|
|
e73235f0df | |
|
|
b512d57b6d | |
|
|
303c6c532d | |
|
|
2f2cca8db9 | |
|
|
be210396fa | |
|
|
c4e71acece | |
|
|
3ffe3e2cc5 | |
|
|
2ab70accf4 | |
|
|
1c41bbef29 | |
|
|
90aab6796d | |
|
|
facb6f40fb | |
|
|
ae17c53a4b | |
|
|
3cf94eef32 | |
|
|
46666e519a | |
|
|
d06d3f75a5 | |
|
|
4f939ade9a | |
|
|
95e107f1bb | |
|
|
23ade7b6eb | |
|
|
fe6c149653 | |
|
|
b585ff1f2f | |
|
|
5b5e9fda12 | |
|
|
d1c0b5d50d | |
|
|
a879b3b23e | |
|
|
f68950a304 | |
|
|
ba7ae00cce | |
|
|
bdb5503c95 | |
|
|
cf565254e2 | |
|
|
dd76d8064e | |
|
|
840272c0b9 | |
|
|
5f5d2bb51c | |
|
|
6215de5d9c | |
|
|
bc1dbe6b02 | |
|
|
570a0dfb73 | |
|
|
084d60da5a | |
|
|
28679cf7c3 | |
|
|
6eda4d8276 | |
|
|
5fdcec1bef | |
|
|
ecd02cf5ba | |
|
|
0f0b1d8184 | |
|
|
9aaf2e64fb | |
|
|
d4d55235da | |
|
|
f8cede57f0 | |
|
|
9edc47d5a3 | |
|
|
c614accc90 | |
|
|
e11fbae88e | |
|
|
a1b138c34e | |
|
|
5f34afa1bf | |
|
|
9384691702 | |
|
|
8ec8c8c5c6 | |
|
|
ddda39de92 | |
|
|
69c94a7a4e | |
|
|
4c700530b7 | |
|
|
b03195e636 | |
|
|
84a820a798 | |
|
|
c299511237 | |
|
|
9a0dde3d49 | |
|
|
02479c2fb0 | |
|
|
53e2c3c22d | |
|
|
4235fe5d69 | |
|
|
5bef032398 | |
|
|
2a1350a60d | |
|
|
98cae97aa1 | |
|
|
09ab969e20 | |
|
|
3875707119 | |
|
|
779da41063 | |
|
|
34e36dfc9b | |
|
|
c0eedafd93 | |
|
|
c97cb23593 | |
|
|
c4587d5cf7 | |
|
|
b97156b51e | |
|
|
a617b745cf | |
|
|
9a215c194c | |
|
|
955645c22b | |
|
|
8e5db9fcb1 | |
|
|
f3b38922bf | |
|
|
69d7166518 | |
|
|
55bedff245 | |
|
|
3924ee7cc4 | |
|
|
577e98372e | |
|
|
94ad3f32ba | |
|
|
94e1d2be9b | |
|
|
eec18e681e | |
|
|
df4a398d0c | |
|
|
742d2f1c08 | |
|
|
1a7b8f486c | |
|
|
c059bbdfe6 | |
|
|
df7e44c685 | |
|
|
8c08f6396c | |
|
|
639d209d62 | |
|
|
07b4d49b18 | |
|
|
0aa0a2d222 | |
|
|
c66a6b1c27 | |
|
|
e1273aa5b5 | |
|
|
8bf4ffe900 | |
|
|
4b1e7502fd | |
|
|
5c3264b391 | |
|
|
2527ac9c03 | |
|
|
9f5c2796d7 | |
|
|
0b151f1749 | |
|
|
66f1f211b9 | |
|
|
543c22cb63 | |
|
|
d3a273cedf | |
|
|
5bf2eeb6de | |
|
|
dd540537ba | |
|
|
362421b5ce | |
|
|
4b2d83c18b | |
|
|
18db5b0611 | |
|
|
18b82d97bb | |
|
|
32875bed4b | |
|
|
6096495651 | |
|
|
1b4d48ef8f | |
|
|
7d963814db | |
|
|
264856830f | |
|
|
fc44d851ea | |
|
|
e0290834ac | |
|
|
ff73f4064f | |
|
|
01c8d6282e | |
|
|
5e1439f17e | |
|
|
399dd48d22 | |
|
|
e91b9fbe10 | |
|
|
1a71e0a1a3 | |
|
|
95ed61ffc2 | |
|
|
b1b095cb16 | |
|
|
9362cc2e82 | |
|
|
4508695cb2 | |
|
|
21617af144 | |
|
|
70a7a5cdee | |
|
|
ebdf22fe84 | |
|
|
4e2edad24f | |
|
|
c1bf29df01 | |
|
|
7d6d555910 | |
|
|
e41dfffc0b | |
|
|
51592ac5a6 | |
|
|
f615a1b518 | |
|
|
a9ca8f5fd9 | |
|
|
c3b41b338b | |
|
|
155c2a9939 | |
|
|
372f9b47e9 | |
|
|
f70c416f7d | |
|
|
1d0b4b71ea | |
|
|
538f2a0287 | |
|
|
29ce259ea5 | |
|
|
831d89694d | |
|
|
2b58cdfdeb | |
|
|
70f69c15f9 | |
|
|
38212a77ee | |
|
|
7ec52769d3 | |
|
|
46294bd01f | |
|
|
f6ee0a0c8f | |
|
|
ed7ba0a71c | |
|
|
9e61938193 | |
|
|
a86e06b336 | |
|
|
e7132b01c4 | |
|
|
839f50f8a8 | |
|
|
d0dcdb632e | |
|
|
630edf185b | |
|
|
f13a8d454a | |
|
|
a22fe39009 | |
|
|
80eca0f068 | |
|
|
03dce094a6 | |
|
|
e2a80bca25 | |
|
|
28d94cc3cf | |
|
|
59f97c36c9 | |
|
|
d0eed71d9b | |
|
|
7bcd6810cb | |
|
|
93b3a91233 | |
|
|
6a2895b7f5 | |
|
|
7ca3815ebc | |
|
|
8a190214ae | |
|
|
64bc23271b | |
|
|
bbd0fe91f4 | |
|
|
2a331231c5 | |
|
|
2653bb59a6 | |
|
|
48f3bb5beb | |
|
|
41bc851b84 | |
|
|
506972a1d6 | |
|
|
c0f96253a4 | |
|
|
16cf3ed1f9 | |
|
|
01a444f5e4 | |
|
|
97ae4a914e | |
|
|
36f40092b0 | |
|
|
2a30b05a5c | |
|
|
6dadd2ad9f | |
|
|
1f590a0e50 | |
|
|
bfab968525 | |
|
|
ac2da3b050 | |
|
|
746c3cfc15 | |
|
|
467c32a602 | |
|
|
8535e97184 | |
|
|
d387453efa | |
|
|
b8d9450388 | |
|
|
199076e104 | |
|
|
c053e7d05e | |
|
|
f37dad97cd | |
|
|
aa4c6d0abc | |
|
|
cdcbe19a9e | |
|
|
01c69f3ce2 | |
|
|
8afa476126 | |
|
|
f02423840c | |
|
|
10609c16ec | |
|
|
32b4770dab | |
|
|
89dcaeb562 | |
|
|
e31fcdcced | |
|
|
de1508d194 | |
|
|
5cc1c31d0e | |
|
|
8cdf60b71c | |
|
|
f9d7d9de78 | |
|
|
9feab3990c | |
|
|
a63a098071 | |
|
|
fa1c720584 | |
|
|
6285e0e019 | |
|
|
0ed2e86399 | |
|
|
df5a3a1b6c | |
|
|
d7a29723a1 | |
|
|
a185e55af6 | |
|
|
6410565bce | |
|
|
322fa63d3a | |
|
|
b0cb2ad747 | |
|
|
e98a138269 | |
|
|
b7c11f4020 | |
|
|
907cba3fd9 | |
|
|
ccb53f441f | |
|
|
f02dc8f680 | |
|
|
45aed46671 | |
|
|
ceaff68d65 | |
|
|
58dbeb46cc | |
|
|
72af5d08f1 | |
|
|
8855715806 | |
|
|
425c193364 | |
|
|
48d620dcb2 | |
|
|
fb28eaf1d6 | |
|
|
9a7bf55661 | |
|
|
e88b3bcfa7 | |
|
|
8c037ae0e8 | |
|
|
3ae23b8996 | |
|
|
688562c987 | |
|
|
bb32e9eb90 | |
|
|
3bdf1dd44a | |
|
|
8a0cbb62fa | |
|
|
01760c8d21 | |
|
|
2e79ec885b | |
|
|
2f7763e9f2 | |
|
|
53d0e3fea5 | |
|
|
75b70de1f9 | |
|
|
2606e51b6a | |
|
|
6965917e6d | |
|
|
75bbd4b155 | |
|
|
1e1c48e37b | |
|
|
9839d2917c | |
|
|
8318b8a3b4 | |
|
|
e5bd16f740 | |
|
|
d170ef1363 | |
|
|
6c61261d93 | |
|
|
fd176b1ccf | |
|
|
c011691455 | |
|
|
c802f5348b | |
|
|
080d0b70f1 | |
|
|
febd404323 | |
|
|
50cb5d1196 | |
|
|
4c93cb02ec | |
|
|
f67a6bbc44 | |
|
|
1c4d9c8660 | |
|
|
f662c85978 | |
|
|
047c265240 | |
|
|
7a24a5e561 | |
|
|
41f3e87c39 | |
|
|
d820d70234 | |
|
|
44e821b703 | |
|
|
0d5cceb9d4 | |
|
|
cd61ca5054 | |
|
|
06b09147eb | |
|
|
61ce68a26a | |
|
|
116eebfedb | |
|
|
2d1f793d94 | |
|
|
04f4722da9 | |
|
|
a727af2c5c | |
|
|
ac5deec761 | |
|
|
09ac4b4722 | |
|
|
c822cd07a5 | |
|
|
b58606046a | |
|
|
b9ab8f5c5c | |
|
|
d7b0bc8fb2 | |
|
|
8d643ceaa5 | |
|
|
9c17dea89a | |
|
|
116c85a7d7 | |
|
|
d9fc96f6a3 | |
|
|
76a62e82f9 | |
|
|
b1b04b8d1a | |
|
|
fffe5f114f | |
|
|
90662e912f | |
|
|
a98235687e | |
|
|
6db432153e | |
|
|
3c98c2d308 | |
|
|
62592134de | |
|
|
7145daaeed | |
|
|
b1b142620c | |
|
|
f0438a05ed | |
|
|
0713143ec8 | |
|
|
3d6fb8c708 | |
|
|
c941533edb | |
|
|
2063ac3079 | |
|
|
d04a31c48d | |
|
|
5233dbed36 | |
|
|
4696b8e99c | |
|
|
12b0137289 | |
|
|
23968059f9 | |
|
|
adebe610b5 | |
|
|
3c7788c909 | |
|
|
fc617458c1 | |
|
|
1ecc42490e | |
|
|
e09fa74f2d | |
|
|
8199c63da4 | |
|
|
db301d4b32 | |
|
|
80bee25a20 | |
|
|
99713ff544 | |
|
|
8c7c094558 | |
|
|
e81c1ec00f | |
|
|
c94729ac5c | |
|
|
4312917036 | |
|
|
61d7fe987c | |
|
|
24d3bd1c7c | |
|
|
4195d4f6ee | |
|
|
41ccde3637 | |
|
|
0441cdb5b1 | |
|
|
753ad965d3 | |
|
|
1c95ef8afd | |
|
|
675dc38100 | |
|
|
644caff81f | |
|
|
551934dee2 | |
|
|
9f10736c48 | |
|
|
9f2fea9180 | |
|
|
0f883ba365 | |
|
|
7aa6322377 | |
|
|
b40b89e00b | |
|
|
d8fb351fa2 | |
|
|
6ea83298e6 | |
|
|
39e1b752f0 | |
|
|
e0f10867e0 | |
|
|
1441017b61 | |
|
|
324eab5a8c | |
|
|
562c4516d3 | |
|
|
383f6efa1f | |
|
|
69e89c5e4a | |
|
|
ce25039de3 | |
|
|
f20a910a74 | |
|
|
5a51750491 | |
|
|
ccb92df731 | |
|
|
1cfc9a7743 | |
|
|
17743e1e17 | |
|
|
f60d445ae2 | |
|
|
56f1f77f3d | |
|
|
7c5adfe84f | |
|
|
66bc74123f | |
|
|
f0c92cef8b | |
|
|
7b86b613b3 | |
|
|
825837152d | |
|
|
654252ff21 | |
|
|
af8865165c | |
|
|
6a0e2f7f8f | |
|
|
b74a9b8d64 | |
|
|
8d8ceb5155 | |
|
|
7177f78c35 | |
|
|
37109f1ea2 | |
|
|
fe5b1379fa | |
|
|
6f2744a955 | |
|
|
3e81c156e7 | |
|
|
4de2ff25fb | |
|
|
efab91370f | |
|
|
de17e99788 | |
|
|
fb0760318d | |
|
|
196a217413 | |
|
|
2082c7573f | |
|
|
7209a0f675 | |
|
|
3d4abf5bf1 | |
|
|
a38ddf9ebb | |
|
|
ee2ae5583d | |
|
|
27cee0f99b | |
|
|
53ecfbe098 | |
|
|
9b471ede68 | |
|
|
a0f8e1f6a5 | |
|
|
82280cdd24 | |
|
|
3a2bb8781d | |
|
|
ab327651b0 | |
|
|
2cd2548f5b | |
|
|
50c9457497 | |
|
|
6d900a065f | |
|
|
89a6c71e16 | |
|
|
6953a4f892 | |
|
|
4b94fd2662 | |
|
|
99cc7ea060 | |
|
|
85fa640195 | |
|
|
1739324f8f | |
|
|
3f46f9bd36 | |
|
|
529cde136d | |
|
|
b10a35134a | |
|
|
797785c347 | |
|
|
e2bd26229c | |
|
|
c8a5f15c60 | |
|
|
a866596e36 | |
|
|
87ace5ca43 | |
|
|
3de7464aa1 | |
|
|
d8bee4223f | |
|
|
066d9cc5cc | |
|
|
2c1f61140b | |
|
|
4a148e01df | |
|
|
7c5ed681f8 | |
|
|
735ce19eae | |
|
|
708d19f64e | |
|
|
c8eb8691e7 | |
|
|
7a93f82859 | |
|
|
e58d9f5f1f | |
|
|
6e9afe4892 | |
|
|
173ae7249a | |
|
|
a6371f0ae9 | |
|
|
0e525e9093 | |
|
|
12e3dd2d5f | |
|
|
e70e7f8941 | |
|
|
209a3aefb3 | |
|
|
e6354e099e | |
|
|
a673e172bb | |
|
|
7a3d28ecae | |
|
|
4a23910f59 | |
|
|
92b2d86dd4 | |
|
|
b394898a48 | |
|
|
bbd25b4838 | |
|
|
9477811555 | |
|
|
550a261d97 | |
|
|
ad14cfb6e7 | |
|
|
62cdfbb7a3 | |
|
|
fd9da825c1 | |
|
|
5ba4006336 | |
|
|
5f2d959a48 | |
|
|
6c0afe156f | |
|
|
aa30277bfb | |
|
|
97a35412f5 | |
|
|
a5e0d78647 | |
|
|
d4048769b3 | |
|
|
e32dadb9af | |
|
|
7cc7b92810 | |
|
|
3b08409a77 | |
|
|
e644452637 | |
|
|
a38b49aa4c | |
|
|
e9fd99a1cc | |
|
|
460fdafd78 | |
|
|
9f3a538414 | |
|
|
ccd4bbf0ea | |
|
|
0ce85b45a2 | |
|
|
7bbf2ef5c6 | |
|
|
8805d1d982 | |
|
|
47ba50d992 | |
|
|
d2682f69e8 | |
|
|
0280621bc9 | |
|
|
08bead065a | |
|
|
a812877745 | |
|
|
bc82365a3e | |
|
|
b0b0f1c85b | |
|
|
ff3182eff4 | |
|
|
9ca66cf7d4 | |
|
|
e2ab16ac90 | |
|
|
73b1140d41 | |
|
|
28a94a97e8 | |
|
|
468b8d5c00 | |
|
|
dada11cdda | |
|
|
b87cc49d5a | |
|
|
91d8928293 | |
|
|
2aef6131c2 | |
|
|
c2dde89fb3 | |
|
|
37622ff583 | |
|
|
2ab6ea9748 | |
|
|
693ce2b477 | |
|
|
c0b6e2e510 | |
|
|
5dea5df508 | |
|
|
fb1bf12319 | |
|
|
091ef8a74e | |
|
|
b1d9c1ba6f | |
|
|
4894cf8c5f | |
|
|
520922c227 | |
|
|
ea729a975b | |
|
|
e11bd776bb | |
|
|
c5c5fe7f37 | |
|
|
11215f13c9 | |
|
|
25d1555535 | |
|
|
06df54dc4b | |
|
|
665e2f29ce | |
|
|
705800ca20 | |
|
|
3d32977b0f | |
|
|
3ffbe650c1 | |
|
|
044c4018d1 | |
|
|
d723fe922a | |
|
|
d6fdb720e2 | |
|
|
687d0aed3c | |
|
|
a231af1dab | |
|
|
73b3d62408 | |
|
|
9759359e7a | |
|
|
1f074882a4 | |
|
|
3f05ec8e54 | |
|
|
6d1ecb7d7e | |
|
|
dc5fa36566 | |
|
|
8975ac4dc6 | |
|
|
eb65f43207 | |
|
|
47a63cdfa3 | |
|
|
b16fc9b44f | |
|
|
d6e67e6acf | |
|
|
02f573b8fd | |
|
|
bc2c9112b6 | |
|
|
8509bcaab6 | |
|
|
2dc253f82d | |
|
|
495833c379 | |
|
|
2df5d243cf | |
|
|
ec0535a255 | |
|
|
3bfd530fda | |
|
|
5903ef0e7b | |
|
|
759b19b54d | |
|
|
6d3d38bae1 | |
|
|
a466260c7c | |
|
|
33b5333653 | |
|
|
8169cf1935 | |
|
|
68c949470e | |
|
|
c604f6ce63 | |
|
|
215dcdd32e | |
|
|
98d2806723 | |
|
|
ae67d3c525 | |
|
|
ccc2bd5703 | |
|
|
027943eda6 | |
|
|
6cc78eb382 | |
|
|
0fd21c99dc | |
|
|
ed964013e2 | |
|
|
5089cd661b | |
|
|
d6561fcaa4 | |
|
|
61f24a63ea | |
|
|
dd23e319ee | |
|
|
dfa1f7c6aa | |
|
|
36a54e16e1 | |
|
|
b23dd4b3b6 | |
|
|
dbe105b3e0 | |
|
|
651b6e7b40 | |
|
|
5300336e77 | |
|
|
d9a96f4274 | |
|
|
6f7a7bda5e | |
|
|
4faaed9f6c | |
|
|
e5ea9c45be | |
|
|
9d118e8e3b | |
|
|
fea591f41e | |
|
|
84ac7e1dcb | |
|
|
d81be8c787 | |
|
|
9f0a0e907a | |
|
|
c731dbe311 | |
|
|
f9ac8cfb7c | |
|
|
123a400720 | |
|
|
31645f0545 | |
|
|
ea4576cdd2 | |
|
|
94e9631d59 | |
|
|
86dbad26c5 | |
|
|
eefc2ff7ed | |
|
|
aad31f4468 | |
|
|
08afea0e23 | |
|
|
4251bd8bb4 | |
|
|
595be660c6 | |
|
|
0a1b2212fd | |
|
|
890f370145 | |
|
|
5e3151d03a | |
|
|
9cb3b5c2d5 | |
|
|
9dc7328011 | |
|
|
56ab24b3c1 | |
|
|
be061e6715 | |
|
|
5658941cad | |
|
|
bc87980ffd | |
|
|
45ce272126 | |
|
|
0c35a85dca | |
|
|
9309a82d84 | |
|
|
1bcfd00579 | |
|
|
18330b0137 | |
|
|
29c11456af | |
|
|
b405c9fae4 | |
|
|
732cbc81e2 | |
|
|
21768854d8 | |
|
|
e5112fa532 | |
|
|
ee85a0ad72 | |
|
|
8d3c8e6541 | |
|
|
f3a4bdac44 | |
|
|
8d966828d3 | |
|
|
e5977a5ddb | |
|
|
235c9b7590 | |
|
|
409c9763f1 | |
|
|
44f06a846b | |
|
|
561ab23750 | |
|
|
56e55bb3ee | |
|
|
b917aff935 | |
|
|
8c431f76ea | |
|
|
b73beab621 | |
|
|
0aa199e91f | |
|
|
552d7c2ef0 | |
|
|
33edc548de | |
|
|
97402d4ab8 | |
|
|
03869b1157 | |
|
|
c75296de9c | |
|
|
d5d057ba72 | |
|
|
01aca13747 | |
|
|
15c71ec31e | |
|
|
d124d0f097 | |
|
|
c74b5816ad | |
|
|
d849e52fb5 | |
|
|
e3137cbb6d | |
|
|
a117a33263 | |
|
|
c9ace578af | |
|
|
509a6fba8c | |
|
|
d050dc04d4 | |
|
|
059df4ec05 | |
|
|
15cb792fa5 | |
|
|
44553eaaeb | |
|
|
de9abc631e | |
|
|
e580a15f99 | |
|
|
062e23c1bf | |
|
|
8daa84f28f | |
|
|
04e2e85de8 | |
|
|
77df22a969 | |
|
|
0b791a2f50 | |
|
|
8dc4b8a490 | |
|
|
a2765bc27c | |
|
|
42aace253f | |
|
|
8842103478 | |
|
|
571a0031a6 | |
|
|
ff5a0d6d5f | |
|
|
3280bc4274 | |
|
|
3bc7485252 | |
|
|
9f3ee864c9 | |
|
|
ac32fd2e63 | |
|
|
6fda37dcb1 | |
|
|
f48b3e3096 | |
|
|
090a9b0044 | |
|
|
a6d6234058 | |
|
|
8a5d1a7768 | |
|
|
3c55bfa02a | |
|
|
37f5ebaf04 | |
|
|
5aa086d25f | |
|
|
6952f96ee2 | |
|
|
1a51c426ed | |
|
|
3340251b18 | |
|
|
75b4c450d5 | |
|
|
7c23834890 | |
|
|
2822ce5c73 | |
|
|
eac824a161 | |
|
|
217c35e1fa | |
|
|
d34904f725 | |
|
|
ecd3631650 | |
|
|
dae8cb844a | |
|
|
68046d83d7 | |
|
|
cf9135e1e6 | |
|
|
16e38f8f2e | |
|
|
f12c638bd7 | |
|
|
6ef029c3cc | |
|
|
7f813c193e | |
|
|
1c18daf1d5 | |
|
|
818fe9c8e1 | |
|
|
468ae11b7d | |
|
|
d3fa6d9fb2 | |
|
|
0e553f729e | |
|
|
0e6e4d5507 | |
|
|
0265542b64 | |
|
|
4ab5826a5d | |
|
|
74ee44cb42 | |
|
|
6f79c98502 | |
|
|
a1fa7768a6 | |
|
|
acff08bec8 | |
|
|
072ad18eb7 | |
|
|
6b0f09ddb2 | |
|
|
deb6a6fa4e | |
|
|
f64b1183a3 | |
|
|
48d1cb8e9c | |
|
|
545c7b6d6b | |
|
|
05483ab4c2 | |
|
|
107bdaba20 | |
|
|
d3e55a2c1a | |
|
|
c0ebcbe56b | |
|
|
5edeb23f10 | |
|
|
74cd5edbf4 | |
|
|
a4492f0f25 | |
|
|
abc6dccadc | |
|
|
14232ac66d | |
|
|
7187ffd3b7 | |
|
|
2b6e045b24 | |
|
|
4bd7b7547f | |
|
|
4ffedd4ac8 | |
|
|
538ac13e48 | |
|
|
6d05992de1 | |
|
|
a46792b006 | |
|
|
7bf946eba1 | |
|
|
24ead6192e | |
|
|
1d6a2aa024 | |
|
|
6ea9474bae | |
|
|
3c3e6a653b | |
|
|
475587dc97 | |
|
|
49d925054a | |
|
|
2791693ece | |
|
|
270e7e102d | |
|
|
f46c990c40 | |
|
|
85cf623d7e | |
|
|
35b5cf0152 | |
|
|
820772a839 | |
|
|
88b268e1a9 | |
|
|
cb059a45ae | |
|
|
fc1249fc78 | |
|
|
dba027f91a | |
|
|
6384a4ea3d | |
|
|
cfc4738ad9 | |
|
|
78478451bb | |
|
|
062a0734c3 | |
|
|
c2bf84027c | |
|
|
de603da79a | |
|
|
0ad97c79dd | |
|
|
918b318cc5 | |
|
|
5524dac94d | |
|
|
512b6357e1 | |
|
|
dbd9c214fc | |
|
|
b94ba8198c | |
|
|
90be119649 | |
|
|
15690458fd | |
|
|
4ea8b2548e | |
|
|
210b3c1304 | |
|
|
3f401f5a1d | |
|
|
39fe5829d1 | |
|
|
897060e332 | |
|
|
54eed22221 | |
|
|
ec3b9c8954 | |
|
|
d992bd0ab9 | |
|
|
43a3bc1b96 | |
|
|
f1434c0983 | |
|
|
951823c68c | |
|
|
9609ebb826 | |
|
|
ac57d0737d | |
|
|
cd9bde7846 | |
|
|
0cab208c4f | |
|
|
835b564b04 | |
|
|
b3d8ee87a5 | |
|
|
af8ee4b78d | |
|
|
d6dd5f1d89 | |
|
|
632a949a27 | |
|
|
4a0e577c45 | |
|
|
ab126e1aa5 | |
|
|
5b15bec0e4 | |
|
|
bfb970cad3 | |
|
|
4963f12ff3 | |
|
|
662229f6f0 | |
|
|
a427edeaa4 | |
|
|
bd2698727d | |
|
|
578b93093e | |
|
|
b6e091d7e6 | |
|
|
d2a96dbe02 | |
|
|
c6c78792d1 | |
|
|
c918fb80fe | |
|
|
5188228749 | |
|
|
c35a6318b6 | |
|
|
2d222b5325 | |
|
|
b91db13f5c | |
|
|
52c096280e | |
|
|
23b74941a4 | |
|
|
0cd7ec957b | |
|
|
80ca790ee5 | |
|
|
9325fb1c03 | |
|
|
c0a2c0c933 | |
|
|
bf701062de | |
|
|
5e499ab416 | |
|
|
4f16845159 | |
|
|
9cab90cf96 | |
|
|
b588bd4065 | |
|
|
ad361c5abd | |
|
|
a83eb6e0fb | |
|
|
abd8ca4b05 | |
|
|
169e3dee9f | |
|
|
ebadc245c8 | |
|
|
156f94c5e4 | |
|
|
d068f2858b | |
|
|
53dd086f56 | |
|
|
8b51f48221 | |
|
|
6d10579ba0 | |
|
|
0de5be492d | |
|
|
f2d0ee66c2 | |
|
|
a45c2760bf | |
|
|
0a46b6d482 | |
|
|
2daa8c6d1d | |
|
|
f038f70214 | |
|
|
f43b425224 | |
|
|
1c667bfebb | |
|
|
e737b496a7 | |
|
|
a59f5c3a0a | |
|
|
b1aa5e2f1e | |
|
|
1f177e5680 | |
|
|
aa58f2f8b9 | |
|
|
7ecc156ef7 | |
|
|
dab8775218 | |
|
|
5977c94275 | |
|
|
2a8463b814 | |
|
|
bd5f9232db | |
|
|
75bf6f64c2 | |
|
|
d3a6d8fbcc | |
|
|
d2ce821cc8 | |
|
|
d94703edf8 | |
|
|
92238046cc | |
|
|
9cbd2b6762 | |
|
|
d29381c6fa | |
|
|
d516916824 | |
|
|
7e02122470 | |
|
|
779b6020b6 | |
|
|
3ebbd136df | |
|
|
5a4ab02e40 | |
|
|
28a2710f99 | |
|
|
4fc0541ad1 | |
|
|
7f739d0f1b | |
|
|
590ba19ead | |
|
|
6c0e222b0c | |
|
|
513546f59f | |
|
|
8d9cdfc589 | |
|
|
7b412ed1ba | |
|
|
3e6040e01d | |
|
|
54ed122d25 | |
|
|
810840e0e0 | |
|
|
1168563524 | |
|
|
4aa41e2267 | |
|
|
ef8d5806c4 | |
|
|
2b9822ef8f | |
|
|
f2cff3dbf3 | |
|
|
d8a2e94fa0 | |
|
|
2224f3ae71 | |
|
|
1ddccf7dc6 | |
|
|
6502b28815 | |
|
|
a017d3f212 | |
|
|
6483c0c3a1 | |
|
|
d5674edf44 | |
|
|
4ed5855317 | |
|
|
37d227ce42 | |
|
|
19e8985f8e | |
|
|
75bca1455c | |
|
|
b938075ef8 | |
|
|
47fac212e6 | |
|
|
e1e89ad4f8 | |
|
|
c597ff8f2e | |
|
|
6958a4b251 | |
|
|
2314bc327a | |
|
|
a182b009d0 | |
|
|
dfb3eaa2f6 | |
|
|
c7cdfaad3d | |
|
|
c73f8b0c80 | |
|
|
09fa1239d8 | |
|
|
8b651e577c | |
|
|
285b2e2494 | |
|
|
13715a7e50 | |
|
|
3e76c561f5 | |
|
|
ea348969fa | |
|
|
095a8b7080 | |
|
|
2166ab8a6c | |
|
|
b5aca65b2a | |
|
|
0d4c8712b0 | |
|
|
144967fe69 | |
|
|
aad3ce6ca7 | |
|
|
47bc3f75c8 | |
|
|
0783dccfac | |
|
|
8934613b1c | |
|
|
c9d9512df4 | |
|
|
09ced5f209 | |
|
|
b15dbf4cd5 | |
|
|
f7c0f031ca | |
|
|
af82b11240 | |
|
|
b70c7f9799 | |
|
|
0c587caa36 | |
|
|
6b8d711aec | |
|
|
3c833c6491 | |
|
|
31ec2904f0 | |
|
|
5031fbd255 | |
|
|
104562a111 | |
|
|
9ef8d2f088 | |
|
|
3bea535045 | |
|
|
1fe53ac70c | |
|
|
0d0bc8c8b5 | |
|
|
e9f3294210 | |
|
|
fc4c46365a | |
|
|
9cca892132 | |
|
|
1b2dabcd2e | |
|
|
625eaa58ce | |
|
|
d1e2e96be8 | |
|
|
bc8ef15557 | |
|
|
5921809d49 | |
|
|
b46f6e74e8 | |
|
|
79f156f5cd | |
|
|
42d34118a0 | |
|
|
f01ede0bf8 | |
|
|
603bd2f4e1 | |
|
|
6b1c882e9d | |
|
|
cfb8da6fb2 | |
|
|
c5a5033e08 | |
|
|
98f5f1abc1 | |
|
|
9966dd96a0 | |
|
|
47a175cbcf | |
|
|
fd7749f79f | |
|
|
56d914b8c8 | |
|
|
b0e171924e | |
|
|
b6f3d51dc7 | |
|
|
a89cb91318 | |
|
|
b015709f56 | |
|
|
0f7eebbfac | |
|
|
589938ffc9 | |
|
|
99a1daad2f | |
|
|
8520b72484 | |
|
|
aefaacabe7 | |
|
|
ef646cc5ab | |
|
|
9027ad4101 | |
|
|
ed52808629 | |
|
|
3f55429b0e | |
|
|
ebd708b7a4 | |
|
|
7b12d0beaa | |
|
|
adf4e09e0a | |
|
|
3a74489124 | |
|
|
4f68928aa4 | |
|
|
fccb9239f5 | |
|
|
f5821e8c31 | |
|
|
2cbf15cbb3 | |
|
|
42ec986b4e | |
|
|
10ffeb0c15 | |
|
|
c06401e300 | |
|
|
4442d006d6 | |
|
|
5c8baef01d | |
|
|
0e501fdcbf | |
|
|
8c04b8c79c | |
|
|
618761bbda | |
|
|
3d81e4323f | |
|
|
6b4e21e5dc | |
|
|
365eb78252 | |
|
|
520443eb3b | |
|
|
a5b8979631 | |
|
|
650f504207 | |
|
|
1f97a6ad01 | |
|
|
d54358a43c | |
|
|
36b5408672 | |
|
|
bc3a1c59d1 | |
|
|
e64e7256c5 | |
|
|
84ae6d1db8 | |
|
|
75ba199845 | |
|
|
39e26ca01f | |
|
|
c3b4d582a0 | |
|
|
3497b4841c | |
|
|
d560a7f533 | |
|
|
23dbcc0da9 | |
|
|
8b89dd9d10 | |
|
|
b877df4e70 | |
|
|
f6108b8c42 | |
|
|
ebd6d9ec4d | |
|
|
4009c2ace4 | |
|
|
7996968eb3 | |
|
|
b5d080b9ee | |
|
|
9a4be2bba9 | |
|
|
62436acb8a | |
|
|
418ebb8937 | |
|
|
2f0db77593 | |
|
|
d88a9c92ba | |
|
|
fb687a7a98 | |
|
|
07ce97ed85 | |
|
|
9e44356668 | |
|
|
72d41f3ac5 | |
|
|
737d13e7f7 | |
|
|
abc09e5b64 | |
|
|
6afcb9b355 | |
|
|
649c6cea33 | |
|
|
3afa1b5b44 | |
|
|
502c32fb6b | |
|
|
fc4a93fa83 | |
|
|
9494b74067 | |
|
|
bb5c342ce0 |
|
|
@ -0,0 +1,10 @@
|
|||
; This file is for unifying the coding style for different editors and IDEs.
|
||||
; More information at https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[_*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
tab_width = 2
|
||||
end_of_line = LF
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<!-- Thank you so much for your PR! -->
|
||||
<!-- Please provide a general summary of your changes in the title above. -->
|
||||
<!-- If submitting a new compdef, please check it is compliant with our contributing guidelines and tick the boxes: -->
|
||||
|
||||
- [ ] This compdef is not already available in zsh.
|
||||
- [ ] This compdef is not already available in their original project.
|
||||
- [ ] I am the original author, or I have authorization to submit this work.
|
||||
- [ ] This is a finished work.
|
||||
- [ ] It has a header containing authors, status and origin of the script.
|
||||
- [ ] It has a license header or I accept that it will be licensed under the terms of the Zsh license.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# zsh word code files
|
||||
*.zwc
|
||||
|
||||
# IDE files
|
||||
.vscode/
|
||||
.idea/
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# Contributing
|
||||
|
||||
## How to Contribute to zsh-completions
|
||||
|
||||
Contributions are welcome, just make sure you follow the guidelines:
|
||||
|
||||
* Completions are not accepted when already available in zsh.
|
||||
* Completions are not accepted when already available in their original project.
|
||||
* Please do not just copy/paste someone else's completion, ask before.
|
||||
* Partially implemented completions are not accepted.
|
||||
* Please add a header containing authors, status and origin of the script and license header if you do not wish to use the Zsh license (example [here](src/_tox)).
|
||||
* Any reasonable open source license is acceptable but note that we recommend the use of the Zsh license and that you should use it if you hope for the function to migrate to zsh itself.
|
||||
* Please try to follow the [Zsh completion style guide](https://github.com/zsh-users/zsh/blob/master/Etc/completion-style-guide).
|
||||
* Please send one separate pull request per file.
|
||||
* Send a pull request or ask for committer access.
|
||||
|
||||
## Contributing Completion Functions to Zsh
|
||||
|
||||
The zsh project itself welcomes completion function contributions via
|
||||
[github pull requests](https://github.com/zsh-users/zsh/),
|
||||
[gitlab merge requests](https://gitlab.com/zsh-org/zsh/) or via patch
|
||||
files sent to its mailing list, `zsh-workers@zsh.org`.
|
||||
|
||||
Contributing to zsh has the advantage of reaching the most users.
|
||||
|
||||
## Including Completion Functions in Upstream Projects
|
||||
|
||||
Many upstream projects include zsh completions.
|
||||
|
||||
If well maintained, this has the advantage that users get a completion
|
||||
function that matches the installed version of their software.
|
||||
|
||||
If you are the upstream maintainer this is a good choice. If the project
|
||||
already includes completions for bash, fish, tcsh, etc then they are
|
||||
likely open to including zsh's too. It can also be a good option for
|
||||
completions handling commands that are system or distribution specific.
|
||||
|
||||
Ideally, arrange for the project's build system to install the
|
||||
completion function in `$prefix/share/zsh/site-functions`.
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
The Z Shell is copyright (c) 1992-2017 Paul Falstad, Richard Coleman,
|
||||
Zoltán Hidvégi, Andrew Main, Peter Stephenson, Sven Wischnowsky, and
|
||||
others. All rights reserved. Individual authors, whether or not
|
||||
specifically named, retain copyright in all changes; in what follows, they
|
||||
are referred to as `the Zsh Development Group'. This is for convenience
|
||||
only and this body has no legal status. The Z shell is distributed under
|
||||
the following licence; any provisions made in individual files take
|
||||
precedence.
|
||||
|
||||
Permission is hereby granted, without written agreement and without
|
||||
licence or royalty fees, to use, copy, modify, and distribute this
|
||||
software and to distribute modified versions of this software for any
|
||||
purpose, provided that the above copyright notice and the following
|
||||
two paragraphs appear in all copies of this software.
|
||||
|
||||
In no event shall the Zsh Development Group be liable to any party for
|
||||
direct, indirect, special, incidental, or consequential damages arising out
|
||||
of the use of this software and its documentation, even if the Zsh
|
||||
Development Group have been advised of the possibility of such damage.
|
||||
|
||||
The Zsh Development Group specifically disclaim any warranties, including,
|
||||
but not limited to, the implied warranties of merchantability and fitness
|
||||
for a particular purpose. The software provided hereunder is on an "as is"
|
||||
basis, and the Zsh Development Group have no obligation to provide
|
||||
maintenance, support, updates, enhancements, or modifications.
|
||||
96
README.md
96
README.md
|
|
@ -1,47 +1,95 @@
|
|||
zsh-completions
|
||||
===============
|
||||
zsh-completions   [](irc://irc.freenode.net/#zsh-completions) [](https://gitter.im/zsh-users/zsh-completions?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
=============
|
||||
|
||||
**Additional completion definitions for [Zsh](http://www.zsh.org).**
|
||||
**Additional completion definitions for [Zsh](https://www.zsh.org/).**
|
||||
|
||||
*This projects aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts are meant to be contributed to the Zsh project when stable enough.*
|
||||
*This project aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts may be contributed to the Zsh project when stable enough.*
|
||||
|
||||
---
|
||||
|
||||
Status
|
||||
------
|
||||
See [issues](zsh-completions/issues) for details on each completion definition.
|
||||
## Usage
|
||||
|
||||
### Using packages
|
||||
|
||||
Usage
|
||||
-----
|
||||
| System | Package |
|
||||
| ------------- | ------------- |
|
||||
| Debian / Ubuntu | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) |
|
||||
| Fedora / CentOS / RHEL / Scientific Linux | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) |
|
||||
| OpenSUSE / SLE | [zsh-completions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-completions&package=zsh-completions) |
|
||||
| Arch Linux / Manjaro / Antergos / Hyperbola | [zsh-completions](https://www.archlinux.org/packages/zsh-completions), [zsh-completions-git](https://aur.archlinux.org/packages/zsh-completions-git) |
|
||||
| Gentoo / Funtoo | [app-shells/zsh-completions](https://packages.gentoo.org/packages/app-shells/zsh-completions) |
|
||||
| NixOS | [zsh-completions](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/zs/zsh-completions/package.nix) |
|
||||
| Void Linux | [zsh-completions](https://github.com/void-linux/void-packages/blob/master/srcpkgs/zsh-completions/template) |
|
||||
| Slackware | [Slackbuilds](https://slackbuilds.org/repository/14.2/system/zsh-completions/) |
|
||||
| macOS | [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zsh-completions.rb), [MacPorts](https://github.com/macports/macports-ports/blob/master/sysutils/zsh-completions/Portfile) |
|
||||
| NetBSD | [pkgsrc](https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-completions/README.html) |
|
||||
| FreeBSD | [shells/zsh-completions](https://www.freshports.org/shells/zsh-completions) |
|
||||
|
||||
#### Using packages
|
||||
---
|
||||
|
||||
* ArchLinux: a [package is available in AUR](https://aur.archlinux.org/packages.php?ID=51001).
|
||||
### Using zsh frameworks
|
||||
|
||||
#### Manual installation
|
||||
#### [antigen](https://github.com/zsh-users/antigen)
|
||||
|
||||
Add `antigen bundle zsh-users/zsh-completions` to your `~/.zshrc`.
|
||||
|
||||
#### [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
|
||||
|
||||
To avoid issues with redundant `.zcompdump` cache generation (see [#603](https://github.com/zsh-users/zsh-completions/issues/603)), do **not** load `zsh-completions` as a standard plugin.
|
||||
Instead, follow this optimized approach:
|
||||
|
||||
1. Clone the repository into your custom plugins directory:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/zsh-users/zsh-completions.git \
|
||||
${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
|
||||
```
|
||||
|
||||
2. Update your `~/.zshrc` configuration **before** sourcing oh-my-zsh:
|
||||
|
||||
```bash
|
||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||
autoload -U compinit && compinit
|
||||
source "$ZSH/oh-my-zsh.sh"
|
||||
```
|
||||
|
||||
This prevents `compinit` from being called twice and significantly improves shell startup time.
|
||||
|
||||
#### [zinit](https://github.com/zdharma-continuum/zinit)
|
||||
|
||||
Add `zinit light zsh-users/zsh-completions` to your `~/.zshrc`.
|
||||
|
||||
---
|
||||
|
||||
### Manual installation
|
||||
|
||||
* Clone the repository:
|
||||
|
||||
git clone git://github.com/zsh-users/zsh-completions.git
|
||||
```bash
|
||||
git clone https://github.com/zsh-users/zsh-completions.git
|
||||
```
|
||||
|
||||
* Include the directory in your `$fpath`, for example by adding in `~/.zshrc`:
|
||||
|
||||
fpath=(path/to/zsh-completions $fpath)
|
||||
```bash
|
||||
fpath=(path/to/zsh-completions/src $fpath)
|
||||
```
|
||||
|
||||
* You may have to force rebuild `zcompdump`:
|
||||
|
||||
rm -f ~/.zcompdump; compinit
|
||||
```bash
|
||||
rm -f ~/.zcompdump; compinit
|
||||
```
|
||||
|
||||
Contributing
|
||||
------------
|
||||
---
|
||||
|
||||
Contributions are welcome, just make sure you follow the guidelines:
|
||||
### Contributing
|
||||
|
||||
* Please add a header containing authors, license info, status and origin of the script (example [here](https://github.com/zsh-users/zsh-completions/blob/master/_ack)).
|
||||
* Please try to follow [Zsh completion style guide](https://github.com/zsh-users/zsh/blob/master/Etc/completion-style-guide).
|
||||
* Send a pull request or ask for committer access.
|
||||
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
|
||||
|
||||
---
|
||||
|
||||
License
|
||||
-------
|
||||
See each file for license details.
|
||||
## License
|
||||
|
||||
Completions use the Zsh license, unless explicitly mentioned in the file header.
|
||||
See [LICENSE](https://github.com/zsh-users/zsh-completions/blob/master/LICENSE) for more information.
|
||||
|
|
|
|||
173
_ack
173
_ack
|
|
@ -1,173 +0,0 @@
|
|||
#compdef ack ack-grep
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for ack 1.94 (http://betterthangrep.com).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_ack() {
|
||||
local curcontext="$curcontext" state line cmds update_policy ret=1
|
||||
|
||||
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
|
||||
[[ -z "$update_policy" ]] && zstyle ":completion:${curcontext}:" cache-policy _ack_types_caching_policy
|
||||
|
||||
unset _ack_raw_types
|
||||
if ( [[ ${+_ack_raw_types} -eq 0 ]] || _cache_invalid "ack-grep" ) && ! _retrieve_cache "ack-grep"; then
|
||||
_ack_raw_types=(${(S)${(f)${${"$(_call_program types $words[1] --help=types)"}#*--\[no\]}}#*no\]})
|
||||
[[ $#_ack_raw_types -gt 0 ]] && _store_cache "ack-grep" _ack_raw_types
|
||||
fi
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)--version[display version and copyright information]' \
|
||||
'(- 1 *)--help[print a short help statement]' \
|
||||
'(- 1 *)--man[print the manual page]' \
|
||||
'(-a --all -u --unrestricted)'{-a,--all}'[operate on all files, regardless of type (but still skip directories like blib, CVS, etc.)]' \
|
||||
'(-A --after-context -C --context)'{-A,--after-context}'[print N lines of trailing context after matching lines]:number' \
|
||||
'(-B --before-context -C --context)'{-B,--before-context}'[print N lines of leading context before matching lines]:number' \
|
||||
'(-C --context -A --after-context -B --before-context)'{-C,--context}'[print N lines (default 2) of context around matching lines]:number' \
|
||||
'(-c --count)'{-c,--count}'[suppress normal output; instead print a count of matching lines for each input file]' \
|
||||
'(--nocolor)--color[highlight the matching text]' \
|
||||
'(--color --color-filename --color-match --color-lineno)--nocolor[supress the color]' \
|
||||
'(--nocolor --color)--color-filename[sets the color to be used for filenames]:color:->colors' \
|
||||
'(--nocolor --color)--color-match[sets the color to be used for matches]:color:->colors' \
|
||||
'(--nocolor --color)--color-lineno[sets the color to be used for line numbers]:color:->colors' \
|
||||
'--column[show the column number of the first match]' \
|
||||
'(--noenv)--env[enable environment processing]' \
|
||||
'(--env)--noenv[disable all environment processing, no .ackrc is read and all environment variables are ignored]' \
|
||||
'--flush[flush output immediately]' \
|
||||
'-f[only print the files that would be searched, without actually doing any searching]' \
|
||||
'(--nofollow)--follow[follow symlinks]' \
|
||||
'(--follow)--nofollow[don'\''t follow symlinks]' \
|
||||
'-G[only paths matching the given regex are included in the search]:regex' \
|
||||
'-g[print files where the relative path + filename matches the given regex]:regex' \
|
||||
'(--nogroup)--group[group matches by file name]' \
|
||||
'(--group)--nogroup[do not group matches by file name]' \
|
||||
'(-H --with-filename -h --no-filename)'{-H,--with-filename}'[print the filename for each match]' \
|
||||
'(-h --no-filename -H --with-filename)'{-h,--no-filename}'[suppress the prefixing of filenames on output when multiple files are searched]' \
|
||||
'(-i --ignore-case)'{-i,--ignore-case}'[ignore case in the search strings]' \
|
||||
'*--ignore-dir[ignore directory]:directory:_files -/' \
|
||||
'*--noignore-dir[don'\''t ignore directory]:directory:_files -/' \
|
||||
'--line[only print given line of each file]:number' \
|
||||
'(-l --files-with-matches -L --files-without-matches)'{-l,--files-with-matches}'[only print the filenames of matching files, instead of the matching text]' \
|
||||
'(-L --files-without-matches -l --files-with-matches)'{-L,--files-without-matches}'[only print the filenames of files that do NOT match]' \
|
||||
'--match[specify the regular expression explicitly]:regex' \
|
||||
'(-m --max-count)'{-m,--max-count}'[stop reading a file after N matches]:number' \
|
||||
'(-r -R --recurse -n --no-recurse)'{-r,-R,--recurse}'[recurse into sub-directories]' \
|
||||
'(-n --no-recurse -r -R --recurse)'{-n,--no-recurse}'[no descending into subdirectories]' \
|
||||
'-o[show only the part of each line matching PATTERN (turns off text highlighting)]:pattern' \
|
||||
'--output[output the evaluation of expr for each line (turns off text highlighting)]:expression' \
|
||||
'--pager[direct ack'\''s output through program]:pager program:_command_names' \
|
||||
'--passthru[prints all lines, whether or not they match the expression]' \
|
||||
'--print0[the filenames are output separated with a null byte instead of the usual newline]' \
|
||||
'(-Q --literal)'{-Q,--literal}'[quote all metacharacters in the pattern, it is treated as a literal]' \
|
||||
'(--no-smart-case)--smart-case[ignore case in the search strings if pattern contains no uppercase characters]' \
|
||||
'(--smart-case)--no-smart-case[disable --smart-case option]' \
|
||||
'--sort-files[sorts the found files lexically]' \
|
||||
'--show-types[outputs the filetypes that ack associates with each file]' \
|
||||
'--thpppt[display the all-important Bill The Cat logo]' \
|
||||
'*--type[specify the types of files to include or exclude from a search]:type:->types' \
|
||||
'*--type-add[files with the given extensions are recognized as being of the given type]:type-def:->type-defs' \
|
||||
'*--type-set[files with the given extensions are recognized as being of the given type]:type-def:->type-defs' \
|
||||
'(-u --unrestricted -a --all)'{-u,--unrestricted}'[all files and directories (including blib/, core.*, ...) are searched, nothing is skipped]' \
|
||||
'(-v --invert-match)'{-v,--invert-match}'[invert match: select non-matching lines]' \
|
||||
'(-w --word-regexp)'{-w,--word-regexp}'[force the given pattern to match only whole words]' \
|
||||
'-1[stops after reporting first match of any kind]' \
|
||||
{'--','--no'}${_ack_raw_types/ ##/\[}']' \
|
||||
'1: :->patterns' \
|
||||
'*: :_files' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
patterns)
|
||||
_message -e patterns 'pattern' && ret=0
|
||||
;;
|
||||
colors)
|
||||
local colors; colors=(
|
||||
'black' 'on_black'
|
||||
'red' 'on_red'
|
||||
'green' 'on_green'
|
||||
'yellow' 'on_yellow'
|
||||
'blue' 'on_blue'
|
||||
'magenta' 'on_magenta'
|
||||
'cyan' 'on_cyan'
|
||||
'white' 'on_white'
|
||||
'clear'
|
||||
'reset'
|
||||
'dark'
|
||||
'bold'
|
||||
'underline'
|
||||
'underscore'
|
||||
'blink'
|
||||
'reverse'
|
||||
'concealed'
|
||||
)
|
||||
_describe -t 'colors' 'color' colors && ret=0
|
||||
;;
|
||||
type-defs)
|
||||
if compset -P '*='; then
|
||||
local extensions; extensions=(*.*(:e))
|
||||
_values -s ',' 'file extension' '.'$extensions && ret=0
|
||||
else
|
||||
_message -e type-name 'type name' && ret=0
|
||||
fi
|
||||
;;
|
||||
types)
|
||||
local types; types=({'','no'}${_ack_raw_types/ ##/:})
|
||||
_describe -t 'types' 'type' types
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_ack_types_caching_policy() {
|
||||
|
||||
# Rebuild if ackrc more recent than cache.
|
||||
[[ -f $HOME/.ackrc && $$HOME/.ackrc -nt "$1" ]] && return 0
|
||||
|
||||
# Rebuild if cache is older than one week.
|
||||
local -a oldp
|
||||
oldp=( "$1"(Nmw+1) )
|
||||
(( $#oldp )) && return 0
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
_ack "$@"
|
||||
412
_adb
412
_adb
|
|
@ -1,412 +0,0 @@
|
|||
#compdef adb
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for adb (Android Debug Bridge) 1.0.26
|
||||
# (http://developer.android.com/guide/developing/tools/adb.html).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext" adb_args
|
||||
|
||||
_adb() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(-e -s)-d[directs command to the only connected USB device, returns an error if more than one USB device is present]' \
|
||||
'(-d -s)-e[directs command to the only running emulator, returns an error if more than one emulator is running]' \
|
||||
'(-d -e)-s[directs command to the USB device or emulator with the given serial number]: :_adb_serial_numbers' \
|
||||
'-p[simple product name or a relative/absolute path to a product out directory]: :_adb_products' \
|
||||
'1: :_adb_cmds' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
adb_args="${(fkv)opt_args[(I)-d|-e|-s|-p]}"
|
||||
|
||||
case "$state" in
|
||||
(args)
|
||||
curcontext="${curcontext%:*:*}:adb-cmd-$words[1]:"
|
||||
case $words[1] in
|
||||
(help|version|devices|jdwp|bugreport|wait-for-device|start-server|kill-server|get-state|get-serialno|status-window|remount|reboot-bootloader|root|usb)
|
||||
_message 'no more arguments' && ret=0
|
||||
;;
|
||||
(connect|disconnect)
|
||||
_arguments \
|
||||
'1: :_adb_host_colon_ports' \
|
||||
&& ret=0
|
||||
;;
|
||||
(push)
|
||||
_arguments \
|
||||
'1:local directory:_files -/' \
|
||||
'2: :_adb_remote_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(pull)
|
||||
_arguments \
|
||||
'1: :_adb_remote_files -/' \
|
||||
'2:local directory:_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(sync)
|
||||
_arguments \
|
||||
'-l[list but do not copy]' \
|
||||
'1: :_adb_sync_directories' \
|
||||
&& ret=0
|
||||
;;
|
||||
(shell|emu)
|
||||
_arguments -C \
|
||||
'1: :_adb_remote_commands' \
|
||||
'*::remote-command-arg:->remote-command-args' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(remote-command-args)
|
||||
curcontext="${curcontext%:*:*}:adb-remote-cmd-$words[1]:"
|
||||
if (( $+functions[_adb_remote_command_$words[1]_args] )); then
|
||||
_adb_remote_command_$words[1] && ret=0
|
||||
# TODO Write handlers for following commands:
|
||||
# * am (Activity Manager)
|
||||
# * pm (Package Manager)
|
||||
# TODO Reuse existing compdefs for standard commands (ls, id, ifconfig, kill, etc) ?
|
||||
# How do we tell them to use _remote_ files/pids/users/etc ?
|
||||
else
|
||||
_adb_remote_command_default && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(logcat)
|
||||
local -a rotation_opts
|
||||
[[ -n ${(M)words:#"-f"} ]] && rotation_opts+=('-r[rotates the log file every kbytes of output. The default value is 16]:value (in kb)')
|
||||
[[ -n ${(M)words:#"-r"} ]] && rotation_opts+=('-n[sets the maximum number of rotated logs. The default value is 4]:count')
|
||||
_arguments \
|
||||
'-b[loads an alternate log buffer for viewing, such as event or radio. The main buffer is used by default]: :_adb_logcat_buffers' \
|
||||
'-c[clears (flushes) the entire log and exits]' \
|
||||
'-d[dumps the log to the screen and exits]' \
|
||||
'-f[writes log message output to file. The default is stdout]: :_files' \
|
||||
'-g[prints the size of the specified log buffer and exits]' \
|
||||
'-s[sets the default filter spec to silent]' \
|
||||
'-v[sets the output format for log messages]: :_adb_logcat_output_formats' \
|
||||
"${rotation_opts[@]}" \
|
||||
'*: :_adb_logcat_filter_specs' \
|
||||
&& ret=0
|
||||
;;
|
||||
(forward)
|
||||
_arguments \
|
||||
'1: :_adb_local_forward_specs' \
|
||||
'2: :_adb_remote_forward_specs' \
|
||||
&& ret=0
|
||||
;;
|
||||
(install)
|
||||
_arguments \
|
||||
'-l[forward-lock the app]' \
|
||||
'-r[reinstall the app, keeping its data]' \
|
||||
'-s[install on SD card instead of internal storage]' \
|
||||
'1: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(uninstall)
|
||||
_arguments \
|
||||
'-k[keep the data and cache directories]' \
|
||||
'1: :_adb_packages' \
|
||||
&& ret=0
|
||||
;;
|
||||
(reboot)
|
||||
_arguments \
|
||||
'1:program:((bootloader:reboot\ into\ the\ bootloader\ program recovery:reboot\ into\ the\ recovery\ program))' \
|
||||
&& ret=0
|
||||
;;
|
||||
(tcpip)
|
||||
_arguments \
|
||||
'1::port' \
|
||||
&& ret=0
|
||||
;;
|
||||
(ppp)
|
||||
# TODO Complete tty (See http://developer.android.com/guide/developing/tools/adb.html#commandsummary)
|
||||
# TODO Complete PPP parameters (See http://ppp.samba.org/pppd.html)
|
||||
_arguments \
|
||||
'1::tty' \
|
||||
'*::parameters' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_adb_cmds] )) ||
|
||||
_adb_cmds() {
|
||||
_alternative \
|
||||
'general-commands:general command:_adb_general_cmds' \
|
||||
'device-commands:device command:_adb_device_cmds' \
|
||||
'scripting-commands:scripting command:_adb_scripting_cmds'
|
||||
}
|
||||
|
||||
(( $+functions[_adb_general_cmds] )) ||
|
||||
_adb_general_cmds() {
|
||||
local commands; commands=(
|
||||
'help:show help message'
|
||||
'version:show version number'
|
||||
'devices:list all connected devices'
|
||||
'connect:connect to a device via TCP/IP'
|
||||
'disconnect:disconnect from a TCP/IP device'
|
||||
)
|
||||
_describe -t general-commands 'general command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_adb_device_cmds] )) ||
|
||||
_adb_device_cmds() {
|
||||
local commands; commands=(
|
||||
'push:copy file/dir to device'
|
||||
'pull:copy file/dir from device'
|
||||
'sync:copy host->device only if changed'
|
||||
'shell:run remote shell interactively or command'
|
||||
'emu:run emulator console command'
|
||||
'logcat:view device log'
|
||||
'forward:forward socket connections'
|
||||
'jdwp:list PIDs of processes hosting a JDWP transport'
|
||||
'install:push this padbage file to the device and install it'
|
||||
'uninstall:remove this app padbage from the device'
|
||||
'bugreport:return all information from the device'
|
||||
)
|
||||
_describe -t device-commands 'device command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_adb_scripting_cmds] )) ||
|
||||
_adb_scripting_cmds() {
|
||||
local commands; commands=(
|
||||
'wait-for-device:block until device is online'
|
||||
'start-server:ensure that there is a server running'
|
||||
'kill-server:kill the server if it is running'
|
||||
'get-state:prints\: offline | bootloader | device'
|
||||
'get-serialno:prints\: <serial-number>'
|
||||
'status-window:continuously print device status for a specified device'
|
||||
'remount:remounts the /system partition on the device read-write'
|
||||
'reboot:reboots the device, optionally into the bootloader or recovery program'
|
||||
'reboot-bootloader:reboots the device into the bootloader'
|
||||
'root:restarts the adbd daemon with root permissions'
|
||||
'usb:restarts the adbd daemon listening on USB'
|
||||
'tcpip:restarts the adbd daemon listening on TCP on the specified port'
|
||||
'ppp:run PPP over USB'
|
||||
)
|
||||
_describe -t scripting-commands 'scripting command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_adb_products] )) ||
|
||||
_adb_products() {
|
||||
_alternative \
|
||||
'product-names:product name:_adb_product_names' \
|
||||
'directories:directory:_files -/'
|
||||
}
|
||||
|
||||
(( $+functions[_adb_product_names] )) ||
|
||||
_adb_product_names() {
|
||||
local ret=1
|
||||
if [[ -n "$ANDROID_PRODUCT_OUT" ]]; then
|
||||
local product_names; product_names=("$ANDROID_PRODUCT_OUT:default value set in ANDROID_PRODUCT_OUT environment variable")
|
||||
_describe -t product-names 'product name' product_names && ret=0
|
||||
else
|
||||
_message -e product-names 'product name' && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_adb_serial_numbers] )) ||
|
||||
_adb_serial_numbers() {
|
||||
local serial_numbers; serial_numbers=(${${(M)${(f)"$(_call_program devices $service devices)"}:#*device}%%[[:space:]]*}":connected device")
|
||||
[[ -n "$ANDROID_SERIAL" ]] && serial_numbers+=("$ANDROID_SERIAL:default value set in ANDROID_SERIAL environment variable")
|
||||
_describe -t serial-numbers 'serial number' serial_numbers "$@" && ret=0
|
||||
}
|
||||
|
||||
(( $+functions[_adb_packages] )) ||
|
||||
_adb_packages() {
|
||||
local packages; packages=(${${(ps:\r\n:)"$(_call_program packages $service $adb_args shell 'ls /data/data 2>/dev/null')"}:#\**\*})
|
||||
_multi_parts . packages
|
||||
}
|
||||
|
||||
(( $+functions[_adb_host_colon_ports] )) ||
|
||||
_adb_host_colon_ports() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
_message -e ports 'port' && ret=0
|
||||
else
|
||||
_wanted hosts expl 'host' _hosts -qS: && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_adb_remote_files] )) ||
|
||||
_adb_remote_files() {
|
||||
local dirsonly command="ls -d ${(S)words[CURRENT]/\/*//}*/ 2>/dev/null"
|
||||
zparseopts -D -E '/=dirsonly'
|
||||
(( ! $#dirsonly )) && command+="; ls -d ${words[CURRENT]}* 2>/dev/null"
|
||||
local files; files=(${${(ps:\r\n:)"$(_call_program files $service $adb_args shell "'$command'" 2>/dev/null)"}:#\**\*})
|
||||
_multi_parts "$@" / files
|
||||
}
|
||||
|
||||
(( $+functions[_adb_remote_commands] )) ||
|
||||
_adb_remote_commands() {
|
||||
local commands; commands=(${${(ps:\r\n:)"$(_call_program commands $service $adb_args shell "'IFS=:;for path_dir in \$PATH; do ls \$path_dir 2>/dev/null; done'" 2>/dev/null)"}:#\**\*})
|
||||
_describe -t remote-commands 'remote command' commands && ret=0
|
||||
}
|
||||
|
||||
(( $+functions[_adb_local_forward_specs] )) ||
|
||||
_adb_local_forward_specs() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
case ${IPREFIX%:} in
|
||||
(tcp)
|
||||
_message -e ports 'port' && ret=0
|
||||
;;
|
||||
(localabstract|localreserved)
|
||||
_wanted sockets expl 'socket' _socket && ret=0
|
||||
;;
|
||||
(localfilesystem)
|
||||
_wanted socket-files expl 'socket file' _files && ret=0
|
||||
;;
|
||||
(dev)
|
||||
_wanted devices expl 'device' _files -g "/dev/**" && ret=0
|
||||
;;
|
||||
esac
|
||||
else
|
||||
local modes; modes=(
|
||||
'tcp:TCP socket'
|
||||
'localabstract:local abstract socket'
|
||||
'localreserved:local reserved socket'
|
||||
'localfilesystem:local filesystem socket'
|
||||
'dev:device'
|
||||
)
|
||||
_describe -t forward-modes 'forward mode' modes -qS: && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_adb_remote_forward_specs] )) ||
|
||||
_adb_remote_forward_specs() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
case ${IPREFIX%:} in
|
||||
(tcp)
|
||||
_message -e ports 'remote port' && ret=0
|
||||
;;
|
||||
(localabstract|localreserved|localfilesystem)
|
||||
_message -e sockets 'remote socket' && ret=0
|
||||
;;
|
||||
(dev)
|
||||
_message -e devices 'remote device' && ret=0
|
||||
;;
|
||||
(jdwp)
|
||||
local pids; pids=(${${(f)"$(_call_program pids $service $adb_args jdwp 2>/dev/null)"}:#\**\*})
|
||||
_describe -t remote-pids 'remote pid' pids && ret=0
|
||||
;;
|
||||
esac
|
||||
else
|
||||
local modes; modes=(
|
||||
'tcp:TCP socket'
|
||||
'localabstract:local abstract socket'
|
||||
'localreserved:local reserved socket'
|
||||
'localfilesystem:local filesystem socket'
|
||||
'dev:device'
|
||||
'jdwp:Java Debug Wire Protocol'
|
||||
)
|
||||
_describe -t forward-modes 'forward mode' modes -qS: && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_adb_sync_directories] )) ||
|
||||
_adb_sync_directories() {
|
||||
_alternative \
|
||||
'partitions:partition:((system:the\ /system\ partition data:the\ /data\ partition))' \
|
||||
'directories:directory:_adb_remote_files -/'
|
||||
}
|
||||
|
||||
(( $+functions[_adb_logcat_filter_specs] )) ||
|
||||
_adb_logcat_filter_specs() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
local priorities; priorities=(
|
||||
'V:verbose (lowest priority)'
|
||||
'D:debug'
|
||||
'I:info'
|
||||
'W:warning'
|
||||
'E:error'
|
||||
'F:fatal'
|
||||
'S:silent (highest priority, on which nothing is ever printed)'
|
||||
)
|
||||
_describe -t log-priorities 'log priority' priorities "$@" && ret=0
|
||||
else
|
||||
local tags; tags=(${(u)${${${(f)"$(_call_program tags $service $adb_args logcat -d 2>/dev/null)"}%%[[:space:]]#\(*}##*\/}:#\**\*})
|
||||
_describe -t log-tags 'log tag' tags -qS: "$@" && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_adb_logcat_output_formats] )) ||
|
||||
_adb_logcat_output_formats() {
|
||||
local formats; formats=(
|
||||
'brief:display priority/tag and PID of originating process (the default format)'
|
||||
'process:display PID only'
|
||||
'tag:display the priority/tag only'
|
||||
'thread:display process:thread and priority/tag only'
|
||||
'raw:display the raw log message, with no other metadata fields'
|
||||
'time:display the date, invocation time, priority/tag, and PID of the originating process'
|
||||
'long:display all metadata fields and separate messages with a blank lines'
|
||||
)
|
||||
_describe -t log-formats 'log format' formats "$@" && ret=0
|
||||
}
|
||||
|
||||
(( $+functions[_adb_logcat_buffers] )) ||
|
||||
_adb_logcat_buffers() {
|
||||
local buffers; buffers=(
|
||||
'main:view the main log buffer (default)'
|
||||
'radio:view the buffer that contains radio/telephony related messages'
|
||||
'events:view the buffer containing events-related messages'
|
||||
)
|
||||
_describe -t log-buffers 'log buffer' buffers "$@" && ret=0
|
||||
}
|
||||
|
||||
(( $+functions[_adb_remote_command_default] )) ||
|
||||
_adb_remote_command_default() {
|
||||
_wanted remote-files expl 'remote file' _adb_remote_files
|
||||
}
|
||||
|
||||
_adb "$@"
|
||||
326
_android
326
_android
|
|
@ -1,326 +0,0 @@
|
|||
#compdef android
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for the android command (Revision 12)
|
||||
# (http://developer.android.com/guide/developing/tools/android.html).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
_android() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C -A "-*" \
|
||||
'(- : *)'{-h,--help}'[get help on a specific command]:command:_android_cmds' \
|
||||
'(-s --silent -v --verbose)'{-v,--verbose}'[verbose mode: errors, warnings and informational messages are printed]' \
|
||||
'(-v --verbose -s --silent)'{-s,--silent}'[silent mode: only errors are printed out]' \
|
||||
'1: :_android_cmds' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(args)
|
||||
curcontext="${curcontext%:*:*}:android-cmd-$words[1]:"
|
||||
case $words[1] in
|
||||
(list)
|
||||
_arguments -C \
|
||||
'1: :_android_list_entities' \
|
||||
'*::list-arg:->list-args' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(list-args)
|
||||
case $words[1] in
|
||||
(avd|target)
|
||||
_arguments \
|
||||
'(-0 --null)'{-0,--null}'[terminate lines with \0 instead of \n (e.g. for xargs -0)]' \
|
||||
'(-c --compact)'{-c,--compact}'[compact output (suitable for scripts)]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(sdk)
|
||||
_arguments \
|
||||
'(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \
|
||||
'--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \
|
||||
'--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \
|
||||
'(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \
|
||||
'(-u --no-ui)'{-u,--no-ui}'[display list result on console (no GUI)]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(create)
|
||||
_arguments -C \
|
||||
'1: :_android_create_entities' \
|
||||
'*::create-arg:->create-args' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(create-args)
|
||||
case $words[1] in
|
||||
(avd)
|
||||
_arguments \
|
||||
'(-c --sdcard)'{-c,--sdcard}'[path to a shared SD card image, or size of a new sdcard for the new AVD]:SD card image or size:_files -g "*.img"' \
|
||||
'(-n --name)'{-n,--name}'[name of the new AVD]:name' \
|
||||
'(-a --snapshot)'{-a,--snapshot}'[place a snapshots file in the AVD, to enable persistence]' \
|
||||
'(-p --path)'{-p,--path}'[directory where the new AVD will be created]: :_files -/' \
|
||||
'(-f --force)'{-f,--force}'[forces creation (overwrites an existing AVD)]' \
|
||||
'(-s --skin)'{-s,--skin}'[skin for the new AVD]:skin' \
|
||||
'(-t --target)'{-t,--target}'[target ID of the new AVD]: :_android_targets' \
|
||||
&& ret=0
|
||||
;;
|
||||
(project)
|
||||
_arguments \
|
||||
'(-n --name)'{-n,--name}'[project name]:project name' \
|
||||
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
|
||||
'(-k --package)'{-k,--package}'[Android package name for the application]:package name' \
|
||||
'(-a --activity)'{-a,--activity}'[name of the default Activity that is created]:activity name' \
|
||||
'(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \
|
||||
&& ret=0
|
||||
;;
|
||||
(test-project)
|
||||
_arguments \
|
||||
'(-n --name)'{-n,--name}'[project name]:project name' \
|
||||
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
|
||||
'(-m --main)'{-m,--main}'[path to directory of the app under test, relative to the test project directory]:path' \
|
||||
&& ret=0
|
||||
;;
|
||||
(lib-project)
|
||||
_arguments \
|
||||
'(-n --name)'{-n,--name}'[project name]:project name' \
|
||||
'(-p --path)'{-p,--path}'[the new project'\''s directory]: :_files -/' \
|
||||
'(-k --package)'{-k,--package}'[Android package name for the application]:package name' \
|
||||
'(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(update)
|
||||
_arguments -C \
|
||||
'1: :_android_update_entities' \
|
||||
'*::update-arg:->update-args' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(update-args)
|
||||
case $words[1] in
|
||||
(avd)
|
||||
_arguments \
|
||||
'(-n --name)'{-n,--name}'[name of the AVD to update]: :_android_avd_names' \
|
||||
&& ret=0
|
||||
;;
|
||||
(project)
|
||||
_arguments \
|
||||
'(-l --library)'{-l,--library}'[directory of an Android library to add, relative to this project'\''s directory]: :_files -/' \
|
||||
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
|
||||
'(-n --name)'{-n,--name}'[project name]:name' \
|
||||
'(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \
|
||||
'(-s --subprojects)'{-s,--subprojects}'[also updates any projects in sub-folders, such as test projects]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(test-project)
|
||||
_arguments \
|
||||
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
|
||||
'(-m --main)'{-m,--main}'[directory of the app under test, relative to the test project directory]:path' \
|
||||
&& ret=0
|
||||
;;
|
||||
(lib-project)
|
||||
_arguments \
|
||||
'(-p --path)'{-p,--path}'[the project'\''s directory]: :_files -/' \
|
||||
'(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \
|
||||
&& ret=0
|
||||
;;
|
||||
(sdk)
|
||||
_arguments \
|
||||
'(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \
|
||||
'--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \
|
||||
'--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \
|
||||
'(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \
|
||||
'(-u --no-ui)'{-u,--no-ui}'[update from command-line (no GUI)]' \
|
||||
'(-f --force)'{-f,--force}'[force replacement of a package or its parts, even if something has been modified]' \
|
||||
'(-t --filter)'{-t,--filter}'[a filter that limits the update to the specified types of packages]: :_android_sdk_update_filters -s ,' \
|
||||
'(-n --dry-mode)'{-n,--dry-mode}'[simulate the update but does not download or install anything]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(move)
|
||||
_arguments -C \
|
||||
'1: :_android_move_entities' \
|
||||
'*::move-arg:->move-args' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(move-args)
|
||||
case $words[1] in
|
||||
(avd)
|
||||
_arguments \
|
||||
'(-n --name)'{-n,--name}'[name of the AVD to move or rename]: :_android_avd_names' \
|
||||
'(-p --path)'{-p,--path}'[path to the AVD'\''s new directory]: :_files -/' \
|
||||
'(-r --rename)'{-r,--rename}'[new name of the AVD]:name' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(delete)
|
||||
_arguments -C \
|
||||
'1: :_android_delete_entities' \
|
||||
'*::delete-arg:->delete-args' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(delete-args)
|
||||
case $words[1] in
|
||||
(avd)
|
||||
_arguments \
|
||||
'(-n --name)'{-n,--name}'[name of the AVD to delete]: :_android_avd_names' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(display)
|
||||
_arguments \
|
||||
'1: :_android_display_entities' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_android_cmds] )) ||
|
||||
_android_cmds() {
|
||||
local commands; commands=(
|
||||
'list:list existing targets or virtual devices'
|
||||
'create:create new virtual devices or projects'
|
||||
'update:update a virtual device, project, SDK or adb'
|
||||
'move:move a virtual device'
|
||||
'delete:delete a virtual device'
|
||||
'display:display manager windows'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_list_entities] )) ||
|
||||
_android_list_entities() {
|
||||
local entities; entities=(
|
||||
'avd:list existing Android Virtual Devices'
|
||||
'target:list existing targets'
|
||||
'sdk:list remote SDK repository'
|
||||
)
|
||||
_describe -t entities 'entity' entities "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_create_entities] )) ||
|
||||
_android_create_entities() {
|
||||
local entities; entities=(
|
||||
'avd:create a new Android Virtual Device'
|
||||
'project:create a new Android project'
|
||||
'test-project:create a new Android project for a test package'
|
||||
'lib-project:create a new Android library project'
|
||||
)
|
||||
_describe -t entities 'entity' entities "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_update_entities] )) ||
|
||||
_android_update_entities() {
|
||||
local entities; entities=(
|
||||
'avd:update an Android Virtual Device to match the folders of a new SDK'
|
||||
'project:update an Android project'
|
||||
'test-project:update the Android project for a test package'
|
||||
'lib-project:update an Android library project'
|
||||
'adb:update adb to support the USB devices declared in the SDK add-ons'
|
||||
'sdk:update the SDK by suggesting new platforms to install if available'
|
||||
)
|
||||
_describe -t entities 'entity' entities "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_move_entities] )) ||
|
||||
_android_move_entities() {
|
||||
local entities; entities=(
|
||||
'avd:move or rename an Android Virtual Device'
|
||||
)
|
||||
_describe -t entities 'entity' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_delete_entities] )) ||
|
||||
_android_delete_entities() {
|
||||
local entities; entities=(
|
||||
'avd:delete an Android Virtual Device'
|
||||
)
|
||||
_describe -t entities 'entity' entities "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_display_entities] )) ||
|
||||
_android_display_entities() {
|
||||
local entities; entities=(
|
||||
'sdk:display the SDK Manager window'
|
||||
'avd:display the AVD Manager window'
|
||||
)
|
||||
_describe -t entities 'entity' entities "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_targets] )) ||
|
||||
_android_targets() {
|
||||
local targets; targets=(${(f)"$(_call_program targets $service list target --compact)"//:/\\:})
|
||||
_describe -t targets 'target' targets "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_avd_names] )) ||
|
||||
_android_avd_names() {
|
||||
local avd_names; avd_names=(${(f)"$(_call_program targets $service list avd --compact)"//:/\\:})
|
||||
_describe -t avd-names 'AVD name' avd_names "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_android_sdk_update_filters] )) ||
|
||||
_android_sdk_update_filters() {
|
||||
local filters; filters=(platform tool platform-tool doc sample extra)
|
||||
_values $@ 'filter' "${filters[@]}"
|
||||
}
|
||||
|
||||
_android "$@"
|
||||
50
_attach
50
_attach
|
|
@ -1,50 +0,0 @@
|
|||
#compdef attach
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for attach (http://github.com/sorin-ionescu/attach).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local state mode_values existing_sessions ret=1
|
||||
|
||||
mode_values=(
|
||||
"none:Disable redrawing completely"
|
||||
"ctrl_l:Send a ^L character if the terminal is in char-at-a-time mode to the program"
|
||||
"winch:Send a WINCH signal to the program"
|
||||
)
|
||||
|
||||
existing_sessions=($(_call_program session attach))
|
||||
|
||||
_arguments -C -s -S \
|
||||
'(--list -l)'{--list,-l}'[List sessions]' \
|
||||
'(--sockets -L)'{--sockets,-L}'[List sockets]' \
|
||||
'(--session -s)'{--session=,-s+}'[Set the session name]:session' \
|
||||
'(--char -c)'{--char=,-c+}'[Set the detach character (default: ^\\)]:char' \
|
||||
'(--redraw -r)'{--redraw=,-r+}'[Set the redraw method (none, ctrl_l, or winch)]:mode:->mode' \
|
||||
'(--detached -d)'{--detached,-d}'[Start the session detched]' \
|
||||
'(--no-detach -D)'{--no-detach,-D}'[Disable detaching]' \
|
||||
'(--no-suspend -Z)'{--no-suspend,-Z}'[Disable suspending]' \
|
||||
'(--version -v)'{--version,-v}'[Display version and copyright]' \
|
||||
'(--help -h)'{--help,-h}'[Display this help]' \
|
||||
'(-)::args:->session-or-command' && ret=0
|
||||
|
||||
case "$state" in
|
||||
(mode)
|
||||
_describe -t mode 'redraw mode' mode_values && ret=0
|
||||
;;
|
||||
(session-or-command)
|
||||
_describe -t 'session' 'sessions' existing_sessions && ret=0
|
||||
_path_commands && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
|
||||
163
_baselayout
163
_baselayout
|
|
@ -1,163 +0,0 @@
|
|||
#compdef rc-update rc-status rc rc-service
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Gentoo Baselayout v2 and OpenRC v0.8 (init system).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#<sys-apps/baselayout-1.12.11.1>
|
||||
#
|
||||
# Status:
|
||||
# rc (fully done)
|
||||
# rc-update (fully done)
|
||||
# rc-status (fully done)
|
||||
# rc-service (to be improved)
|
||||
|
||||
|
||||
local gentoo_runlevels
|
||||
gentoo_runlevels=(/etc/runlevels/*(:t))
|
||||
|
||||
|
||||
# Stuff for rc
|
||||
_rc () {
|
||||
if (( CURRENT == 2 )); then
|
||||
_values 'runlevels' $gentoo_runlevels
|
||||
fi
|
||||
}
|
||||
|
||||
_rc_list_service () {
|
||||
local servicelist
|
||||
servicelist=(${(f)"$(/sbin/rc-service -Cl 2>/dev/null)"})
|
||||
_values 'services' $servicelist
|
||||
}
|
||||
# Stuff for rc-service
|
||||
_rc-service () {
|
||||
servicelist=${(f)"$(/sbin/rc-service -Cl 2>/dev/null)"}
|
||||
if (( CURRENT == 2 ));then
|
||||
_arguments -s \
|
||||
'(-e --exists)'{-e,--exists}"[tests if the service exists or not]" \
|
||||
'(-l --list)'{-l,--list}'[list all available services]' \
|
||||
'(-r --resolve)'{-r,--resolve}'[resolve the service name to an init script]' \
|
||||
'(-C --nocolor)'{-C,--nocolor}'[Disable color output]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Run verbosely]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Run quietly]'
|
||||
_rc_list_service
|
||||
else
|
||||
case $words[2] in
|
||||
-e|--exists|-r|--resolve)
|
||||
(( CURRENT > 3 )) && return 0
|
||||
_rc_list_service
|
||||
;;
|
||||
-*)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
_values "action" stop start restart describe zap
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
# Stuff for rc-status
|
||||
_rc-status () {
|
||||
_arguments -s \
|
||||
'(-a --all)'{-a,--all}'[Show services at all run levels]' \
|
||||
'(-l --list)'{-l,--list}'[Show list of run levels]' \
|
||||
'(-nc --nocolor)'{-nc,--nocolor}'[Disable color output]' \
|
||||
'(-s --servicelist)'{-s,--servicelist}'[Show all services]' \
|
||||
'(-u --unused)'{-u,--unused}'[Show services not assigned to any run level]'
|
||||
|
||||
_values 'runlevels' $gentoo_runlevels
|
||||
}
|
||||
|
||||
|
||||
# Stuff for rc-update
|
||||
_rc-update () {
|
||||
local used_init
|
||||
|
||||
# FIXME: ${=${(f)"$(rc-update show 2>/dev/null)"}% |*} yield the same result (for me).
|
||||
# we probably don't need any more the (M) matcher part.
|
||||
used_init=(${=${(M)${(f)"$(/sbin/rc-update show 2>/dev/null)"}:#*|*[a-z]*}% |*})
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
_values 'rc-update actions' \
|
||||
'add[Add script to a runlevel]' \
|
||||
'del[Delete script from a runlevel]' \
|
||||
'show[Show scripts lanched at a runlevel]' \
|
||||
'-a[Add script to a runlevel]' \
|
||||
'-d[Delete script from a runlevel]' \
|
||||
'-s[Show scripts lanched at a runlevel]'
|
||||
elif (( CURRENT == 3 )); then
|
||||
case "$words[2]" in
|
||||
add|-a)
|
||||
_values 'scripts' /etc/init.d/*~*.sh(:t)
|
||||
;;
|
||||
del|-d)
|
||||
_values 'scripts' $used_init
|
||||
;;
|
||||
show|-s)
|
||||
_values 'runlevels' $gentoo_runlevels \
|
||||
'-v[Show all init scripts]' \
|
||||
'--verbose[Show all init scripts]'
|
||||
;;
|
||||
esac
|
||||
elif (( CURRENT == 4 )); then
|
||||
_values 'runlevels' $gentoo_runlevels
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$service" in
|
||||
rc-update)
|
||||
_rc-update "$@" && return 0
|
||||
;;
|
||||
rc-service)
|
||||
_rc-service "$@" && return 0
|
||||
;;
|
||||
rc-status)
|
||||
_rc-status "$@" && return 0
|
||||
;;
|
||||
rc)
|
||||
_rc "$@" && return 0
|
||||
;;
|
||||
esac
|
||||
100
_brew
100
_brew
|
|
@ -1,100 +0,0 @@
|
|||
#compdef brew
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for brew (https://github.com/mxcl/homebrew).
|
||||
#
|
||||
# Source: https://github.com/mxcl/homebrew/blob/master/Library/Contributions/brew_zsh_completion.zsh
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * kulakowski (https://github.com/kulakowski)
|
||||
# * Gabe Berke-Williams (https://github.com/gabebw)
|
||||
# * James Conroy-Finn (https://github.com/jcf)
|
||||
# * Daniel Schauenberg (https://github.com/mrtazz)
|
||||
# * Adam Vandenberg (https://github.com/adamv)
|
||||
# * Erik Kastner (https://github.com/kastner)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_brew_all_formulae() {
|
||||
formulae=(`brew search`) # FIXME _call_program should be used here
|
||||
}
|
||||
|
||||
_brew_installed_formulae() {
|
||||
installed_formulae=(`brew list`) # FIXME _call_program should be used here
|
||||
}
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'cat:display formula file for a formula'
|
||||
'cleanup:uninstall unused and old versions of packages'
|
||||
'create:create a new formula'
|
||||
'deps:list dependencies and dependants of a formula'
|
||||
'doctor:audits your installation for common issues'
|
||||
'edit:edit a formula'
|
||||
'home:visit the homepage of a formula or the brew project'
|
||||
'info:information about a formula'
|
||||
'install:install a formula'
|
||||
'link:link a formula'
|
||||
'list:list files in a formula or not-installed formulae'
|
||||
'log:git commit log for a formula'
|
||||
'missing:check all installed formuale for missing dependencies.'
|
||||
'outdated:list formulas for which a newer version is available'
|
||||
'prune:remove dead links'
|
||||
'remove:remove a formula'
|
||||
'search:search for a formula (/regex/ or string)'
|
||||
'server:start a local web app that lets you browse formulae (requires Sinatra)'
|
||||
'unlink:unlink a formula'
|
||||
'update:freshen up links'
|
||||
'uses:show formulas which depend on a formula'
|
||||
)
|
||||
|
||||
local expl
|
||||
local -a formulae installed_formulae
|
||||
|
||||
_arguments \
|
||||
'(-v)-v[verbose]' \
|
||||
'(--cellar)--cellar[brew cellar]' \
|
||||
'(--config)--config[brew configuration]' \
|
||||
'(--env)--env[brew environment]' \
|
||||
'(--repository)--repository[brew repository]' \
|
||||
'(--version)--version[version information]' \
|
||||
'(--prefix)--prefix[where brew lives on this system]' \
|
||||
'(--cache)--cache[brew cache]' \
|
||||
'*:: :->subcmds' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "brew subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
|
||||
case "$words[1]" in
|
||||
search|-S)
|
||||
_arguments \
|
||||
'(--macports)--macports[search the macports repository]' \
|
||||
'(--fink)--fink[search the fink repository]' ;;
|
||||
list|ls)
|
||||
_arguments \
|
||||
'(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \
|
||||
'(--versions)--versions[list all installed versions of a formula]' \
|
||||
'1: :->forms' && return 0
|
||||
|
||||
if [[ "$state" == forms ]]; then
|
||||
_brew_installed_formulae
|
||||
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae
|
||||
fi ;;
|
||||
install|home|homepage|log|info|abv|uses|cat|deps|edit|options)
|
||||
_brew_all_formulae
|
||||
_wanted formulae expl 'all formulae' compadd -a formulae ;;
|
||||
remove|rm|uninstall|unlink|cleanup|link|ln)
|
||||
_brew_installed_formulae
|
||||
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;;
|
||||
esac
|
||||
85
_bundle
85
_bundle
|
|
@ -1,85 +0,0 @@
|
|||
#compdef bundle
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Bundler (http://gembundler.com).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line _gems _opts ret=1
|
||||
|
||||
_arguments -C -A "-v" -A "--version" \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
_values "bundle command" \
|
||||
"install[Install the gems specified by the Gemfile or Gemfile.lock]" \
|
||||
"update[Update dependencies to their latest versions]" \
|
||||
"package[Package the .gem files required by your application]" \
|
||||
"exec[Execute a script in the context of the current bundle]" \
|
||||
"config[Specify and read configuration options for bundler]" \
|
||||
"check[Determine whether the requirements for your application are installed]" \
|
||||
"list[Show all of the gems in the current bundle]" \
|
||||
"show[Show the source location of a particular gem in the bundle]" \
|
||||
"console[Start an IRB session in the context of the current bundle]" \
|
||||
"open[Open an installed gem in the editor]" \
|
||||
"viz[Generate a visual representation of your dependencies]" \
|
||||
"init[Generate a simple Gemfile, placed in the current directory]" \
|
||||
"gem[Create a simple gem, suitable for development with bundler]" \
|
||||
"help[Describe available tasks or one specific task]"
|
||||
ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
help)
|
||||
_values 'commands' 'install update package exec config check list show console open viz init gem help' && ret=0
|
||||
;;
|
||||
install)
|
||||
_arguments \
|
||||
'(--no-color)--no-color[disable colorization in output]' \
|
||||
'(--local)--local[do not attempt to connect to rubygems.org]' \
|
||||
'(--quiet)--quiet[only output warnings and errors]' \
|
||||
'(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \
|
||||
'(--system)--system[install to the system location]' \
|
||||
'(--deployment)--deployment[install using defaults tuned for deployment environments]' \
|
||||
'(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \
|
||||
'(--path)--path=-[specify a different path than the system default]:path:_files' \
|
||||
'(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \
|
||||
'(--without)--without=-[exclude gems that are part of the specified named group]:groups'
|
||||
ret=0
|
||||
;;
|
||||
exec)
|
||||
_normal && ret=0
|
||||
;;
|
||||
(open|show)
|
||||
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
|
||||
if [[ $_gems != "" ]]; then
|
||||
_values 'gems' $_gems && ret=0
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
_opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') )
|
||||
_opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
|
||||
if [[ $_opts != "" ]]; then
|
||||
_values 'options' $_opts && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
51
_cap
51
_cap
|
|
@ -1,51 +0,0 @@
|
|||
#compdef cap
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Capistrano (http://capify.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line cmds ret=1
|
||||
|
||||
_arguments -C \
|
||||
{-d,--debug}'[Prompts before each remote command execution]' \
|
||||
{-e,--explain}'[Displays help (if available) for the task]:task' \
|
||||
{-F,--default-config}'[Always use default config, even with -f]' \
|
||||
{-f,--file}'[A recipe file to load. May be given more than once]:file:_files' \
|
||||
{-H,--long-help}'[Explain these options and environment variables]' \
|
||||
{-h,--help}'[Display this help message]' \
|
||||
{-l,--logger}'[Choose logger method. STDERR used by default]:file:_files' \
|
||||
{-n,--dry-run}'[Prints out commands without running them]' \
|
||||
{-p,--password}'[Immediately prompt for the password]' \
|
||||
{-q,--quiet}'[Make the output as quiet as possible]' \
|
||||
{-r,--preserve-roles}'[Preserve task roles]' \
|
||||
{-S,--set-before}'[Set a variable before the recipes are loaded]:variable' \
|
||||
{-s,--set}'[Set a variable after the recipes are loaded]:variable' \
|
||||
{-T,--tasks}'[List all tasks (matching optional PATTERN) in the loaded recipe files]:pattern' \
|
||||
{-t,--tool}'[Abbreviates the output of -T for tool integration]' \
|
||||
{-V,--version}'[Display the Capistrano version, and exit]' \
|
||||
{-v,--verbose}'[Be more verbose. May be given more than once]' \
|
||||
{-X,--skip-system-config}'[Do not load the system config file (capistrano.conf)]' \
|
||||
{-x,--skip-user-config}'[Do not load the user config file (.caprc)]' \
|
||||
'*: :->cmds' && ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
cmds=( ${(f)"$(_call_program commands cap -T 2> /dev/null | sed -e '/ # /!d; s/:/\\:/g; s/cap \([A-Za-z0-9\\:_-]*\) .*# /\1:/')"} )
|
||||
_describe -t commands 'cap command' cmds && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
91
_colorex
91
_colorex
|
|
@ -1,91 +0,0 @@
|
|||
#compdef colorex
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Colorex (https://launchpad.net/colorex).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
_arguments \
|
||||
'(- 1 *)'{-h,--help}'[print program usage]' \
|
||||
'(- 1 *)--version[print program version]' \
|
||||
'*'{-v,--verbose}'[verbose mode]' \
|
||||
'--disable-stderr-filtering[disable STDERR filtering]' \
|
||||
{-f,--config}'[colorex config file]:colorex config:_files -W "( $(pwd) ~/.colorex /usr/share/colorex/configs )" -g "*.cfg(\:r\:t)"' \
|
||||
{-r+,--red}'[display pattern in red]' \
|
||||
{-g+,--green}'[display pattern in green]' \
|
||||
{-y+,--yellow}'[display pattern in yellow]' \
|
||||
{-b+,--blue}'[display pattern in blue]' \
|
||||
{-m+,--magenta}'[display pattern in magenta]' \
|
||||
{-c+,--cyan}'[display pattern in cyan]' \
|
||||
'--start-red[toggle foreground color to red at pattern]' \
|
||||
'--start-green[toggle foreground color to green at pattern]' \
|
||||
'--start-yellow[toggle foreground color to yellow at pattern]' \
|
||||
'--start-blue[toggle foreground color to blue at pattern]' \
|
||||
'--start-magenta[toggle foreground color to magenta at pattern]' \
|
||||
'--start-cyan[toggle foreground color to cyan at pattern]' \
|
||||
'--reset-color[reset foreground color at pattern]' \
|
||||
{-R+,--bred}'[display pattern in red background]' \
|
||||
{-G+,--bgreen}'[display pattern in green background]' \
|
||||
{-Y+,--byellow}'[display pattern in yellow background]' \
|
||||
{-B+,--bblue}'[display pattern in blue background]' \
|
||||
{-M+,--bmagenta}'[display pattern in magenta background]' \
|
||||
{-C+,--bcyan}'[display pattern in cyan background]' \
|
||||
'--start-bred[toggle background color to red at pattern]' \
|
||||
'--start-bgreen[toggle background color to green at pattern]' \
|
||||
'--start-byellow[toggle background color to yellow at pattern]' \
|
||||
'--start-bblue[toggle background color to blue at pattern]' \
|
||||
'--start-bmagenta[toggle background color to magenta at pattern]' \
|
||||
'--start-bcyan[toggle background color to cyan at pattern]' \
|
||||
'--reset-bcolor[reset background color at pattern]' \
|
||||
'--bold[display pattern in bold]' \
|
||||
'--faint[display pattern with decreased intensity]' \
|
||||
'--start-bold[toggle bold on at pattern]' \
|
||||
'--start-faint[toggle faint on at pattern]' \
|
||||
'--reset-intensity[reset text intensity at pattern]' \
|
||||
'--italic[display pattern in italic]' \
|
||||
'--underline[display pattern underlined]' \
|
||||
'--underline-double[display pattern double underlined]' \
|
||||
'--blink[display pattern blinking]' \
|
||||
'--blink-rapid[display pattern blinking]' \
|
||||
'--negative[display pattern swapping foreground and background]' \
|
||||
'--hide[hide pattern]'
|
||||
77
_cpanm
77
_cpanm
|
|
@ -1,77 +0,0 @@
|
|||
#compdef cpanm
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cpanm (http://search.cpan.org/dist/App-cpanminus/lib/App/cpanminus.pm).
|
||||
#
|
||||
# Source: https://github.com/rshhh/cpanminus/blob/master/etc/_cpanm
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Ryushi (https://github.com/rshhh)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local arguments curcontext="$curcontext"
|
||||
typeset -A opt_args
|
||||
|
||||
|
||||
arguments=(
|
||||
|
||||
# Commands
|
||||
# '(--install -i)'{--install,-i}'[Installs the modules]'
|
||||
'(- :)--self-upgrade[Upgrades itself]'
|
||||
'(- :)--info[Displays distribution info on CPAN]'
|
||||
'(--installdeps)--installdeps[Only install dependencies]'
|
||||
'(--look)--look[Download/unpack the distribution and then open the directory with your shell]'
|
||||
'(- :)'{--help,-h}'[Displays help information]'
|
||||
'(- :)'{--version,-V}'[Displays software version]'
|
||||
|
||||
# Options
|
||||
{--force,-f}'[Force install]'
|
||||
{--notest,-n}'[Do not run unit tests]'
|
||||
{--sudo,-S}'[sudo to run install commands]'
|
||||
'(-v --verbose --quiet -q)'{--verbose,-v}'[Turns on chatty output]'
|
||||
'(-q --quiet --verbose -v)'{--quiet,-q}'[Turns off all output]'
|
||||
{--local-lib,-l}'[Specify the install base to install modules]'
|
||||
{--local-lib-contained,-L}'[Specify the install base to install all non-core modules]'
|
||||
'--mirror[Specify the base URL for the mirror (e.g. http://cpan.cpantesters.org/)]:URLs:_urls'
|
||||
'--mirror-only[Use the mirror\''s index file instead of the CPAN Meta DB]'
|
||||
'--prompt[Prompt when configure/build/test fails]'
|
||||
'--reinstall[Reinstall the distribution even if you already have the latest version installed]'
|
||||
'--interactive[Turn on interactive configure]'
|
||||
|
||||
'--scandeps[Scan the depencencies of given modules and output the tree in a text format]'
|
||||
'--format[Specify what format to display the scanned dependency tree]:scandeps format:(tree json yaml dists)'
|
||||
|
||||
'--save-dists[Specify the optional directory path to copy downloaded tarballs]'
|
||||
# '--uninst-shadows[Uninstalls the shadow files of the distribution that you\''re installing]'
|
||||
|
||||
'--auto-cleanup[Number of days that cpanm\''s work directories expire in. Defaults to 7]'
|
||||
'(--no-man-pages)--man-pages[Generates man pages for executables (man1) and libraries (man3)]'
|
||||
'(--man-pages)--no-man-pages[Do not generate man pages]'
|
||||
|
||||
|
||||
# Note: Normally with "--lwp", "--wget" and "--curl" options set to true (which is the default) cpanm tries LWP,
|
||||
# Wget, cURL and HTTP::Tiny (in that order) and uses the first one available.
|
||||
# (So that the exclusions are not enabled here for the completion)
|
||||
'(--lwp)--lwp[Use LWP module to download stuff]'
|
||||
'(--wget)--wget[Use GNU Wget (if available) to download stuff]'
|
||||
'(--curl)--curl[Use cURL (if available) to download stuff]'
|
||||
|
||||
# Other completions
|
||||
'*:Local directory or archive:_files -/ -g "*.(tar.gz|tgz|tar.bz2|zip)(-.)"'
|
||||
# '*::args: _normal' # this looks for default files (any files)
|
||||
)
|
||||
_arguments -s $arguments \
|
||||
&& return 0
|
||||
|
||||
return 1
|
||||
|
||||
73
_dhcpcd
73
_dhcpcd
|
|
@ -1,73 +0,0 @@
|
|||
#compdef dhcpcd
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dhcpcd 2.3.2.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_arguments \
|
||||
'1:network interface:_net_interfaces' \
|
||||
- release \
|
||||
'(-k --release)'{-k,--release}'[causes an existing dhcpcd process running on the interface to release it'\''s lease, deconfigure the interface and then exit]' \
|
||||
- exit \
|
||||
'(-x --exit)'{-x,--exit}'[causes an existing dhcpcd process running on the interface to exit]' \
|
||||
- main \
|
||||
'(-d --debug)'{-d,--debug}'[echo debug and informational messages to the console]' \
|
||||
'(-h --hostname)'{-h,--hostname}'[specify the hostname sent, or an empty string to stop any hostname from being sent]:hostname:_hosts' \
|
||||
'(-i --classid)'{-i,--classid}'[override the DHCP vendor classid field we send]:classid' \
|
||||
'(-l --leasetime)'{-l,--leasetime}'[request a specific lease time in seconds]:lesae time \(seconds\)' \
|
||||
'(-m --metric)'{-m,--metric}'[added routes will use the metric on systems where this is supported]:metric' \
|
||||
'(-n --renew)'{-n,--renew}'[notifies an existing dhcpcd process running on the interface to renew it'\''s lease]' \
|
||||
'(-p --persistent)'{-p,--persistent}'[don'\''t deconfigure the interface and configuration at exit]' \
|
||||
'(-r --request)'{-r,--request}'[skip the broadcast request step and just request an address]:address' \
|
||||
'(-s --inform)'{-s,--inform}'[behaves exactly like -r, but sends a DHCP inform instead of a request]:address' \
|
||||
'(-t --timeout)'{-t,--timeout}'[timeout after seconds, instead of the default 20]:timeout \(seconds\)' \
|
||||
'(-u --userclass)'{-u,--userclass}'[tags the DHCP message with the userclass class]:class' \
|
||||
'*'{-H,--sethostname}'[forces dhcpcd to set the hostname as supplied by the DHCP server]' \
|
||||
'({-I --clientid)'{-I,--clientid}'[send clientid as a client identifier string]:clientid' \
|
||||
'*'{-S,--mscsr}'[request Microsoft specific Classless Static Routes (RFC 3442) code as well]' \
|
||||
'(-A --noarp)'{-A,--noarp}'[don'\''t request or claim the address by ARP]' \
|
||||
'(-G --nogateway)'{-G,--nogateway}'[don'\''t set any default routes]' \
|
||||
'(-L --noipv4ll)'{-L,--noipv4ll}'[don'\''t use IPv4LL at all]' \
|
||||
'(-M --nomtu)'{-M,--nomtu}'[don'\''t set the MTU of the interface]' \
|
||||
'(-N --nontp)'{-N,--nontp}'[don'\''t touch /etc/ntpd.conf or restart the ntp service]' \
|
||||
'(-R --nodns)'{-R,--nodns}'[don'\''t send DNS information to resolvconf or touch /etc/resolv.conf]' \
|
||||
'(-T --test)'{-T,--test}'[on receipt of discover messages, simply print the contents of the DHCP message to the console]' \
|
||||
'(-Y --nonis)'{-Y,--nonis}'[don'\''t touch /etc/yp.conf or restart the ypbind service]'
|
||||
48
_ditz
48
_ditz
|
|
@ -1,48 +0,0 @@
|
|||
#compdef ditz
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Ditz (http://ditz.rubyforge.org).
|
||||
#
|
||||
# Source: https://github.com/technolize/zsh-completion-funcs
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * technolize (https://github.com/technolize)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
ME=ditz
|
||||
COMMANDS=--commands
|
||||
OPTIONS='<options>'
|
||||
|
||||
if (($CURRENT == 2)); then
|
||||
# We're completing the first word after the tool: the command.
|
||||
_wanted command expl "$ME command" \
|
||||
compadd -- $( "$ME" "$COMMANDS" )
|
||||
else
|
||||
# Find the options/files/URL/etc. for the current command by using the tool itself.
|
||||
case "${words[$CURRENT]}"; in
|
||||
-*)
|
||||
_wanted args expl "Arguments for $ME ${words[2]}" \
|
||||
compadd -- $( "$ME" "${words[2]}" "$OPTIONS" ; _files )
|
||||
;;
|
||||
ht*|ft*)
|
||||
_arguments '*:URL:_urls'
|
||||
;;
|
||||
/*|./*|\~*|../*)
|
||||
_arguments '*:file:_files'
|
||||
;;
|
||||
*)
|
||||
_wanted args expl "Arguments for $ME ${words[2]}" \
|
||||
compadd -- $( "$ME" "${words[2]}" "$OPTIONS" )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
139
_emulator
139
_emulator
|
|
@ -1,139 +0,0 @@
|
|||
#compdef emulator
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for emulator (Android Emulator) 12.0
|
||||
# (http://developer.android.com/guide/developing/tools/emulator.html).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
_emulator() {
|
||||
|
||||
# TODO All image options are contextual to -sysdir value
|
||||
# TODO All skin options are contextual to -skindir value
|
||||
# TODO snapshot options are mutually exclusive
|
||||
# TODO Use '-snapshot-list' output for snapshot names
|
||||
# TODO Complete -avd with avd names ?
|
||||
# TODO -logcat: use completer from _adb
|
||||
# TODO Complete options with device values
|
||||
# TODO Complete -prop
|
||||
_arguments \
|
||||
'(- : *)-version[display emulator version number]' \
|
||||
'(- : *)-help[display help information]' \
|
||||
'(- : *)-help-disk-images[about disk images]' \
|
||||
'(- : *)-help-keys[supported key bindings]' \
|
||||
'(- : *)-help-debug-tags[debug tags for -debug <tags>]' \
|
||||
'(- : *)-help-char-devices[character <device> specification]' \
|
||||
'(- : *)-help-environment[environment variables]' \
|
||||
'(- : *)-help-keyset-file[key bindings configuration file]' \
|
||||
'(- : *)-help-virtual-device[virtual device management]' \
|
||||
'(- : *)-help-sdk-images[about disk images when using the SDK]' \
|
||||
'(- : *)-help-build-images[about disk images when building Android]' \
|
||||
'(- : *)-help-all[prints all help content]' \
|
||||
'(- : *)-help-'{version,sysdir,system,image,datadir,kernel,ramdisk,initdata,data,partition-size,cache,no-cache,nocache,sdcard,snapstorage,no-snapstorage,snapshot,no-snapshot,no-snapshot-save,no-snapshot-load,snapshot-list,no-snapshot-update-time,wipe-data,avd,skindir,skin,noskin,no-skin,memory,netspeed,netdelay,netfast,trace,show-kernel,shell,no-jni,nojni,logcat,noaudio,no-audio,audio,raw-keys,radio,port,ports,onion,onion-alpha,onion-rotation,scale,dpi-device,http-proxy,timezone,dns-server,cpu-delay,no-boot-anim,no-window,report-console,gps,keyset,shell-serial,tcpdump,bootchart,charmap,prop,shared-net-id,nand-limits,memcheck,qemu,verbose}'[print option-specific help]' \
|
||||
'-sysdir[search for system disk images in the directory]: :_files -/' \
|
||||
'(-system -image)'{-system,-image}'[read initial system image from the file]: :_files -g "*.img"' \
|
||||
'-datadir[write user data into the directory]: :_files -/' \
|
||||
'-kernel[use specific emulated kernel]: :_files' \
|
||||
'-ramdisk[ramdisk image (default <system>/ramdisk.img]: :_files -g "*.img"' \
|
||||
'-initdata[same as '\''-init-data <file>'\'']: :_files' \
|
||||
'-data[data image (default <datadir>/userdata-qemu.img]: :_files -g "*.img"' \
|
||||
'-partition-size[system/data partition size]:size (in MBs)' \
|
||||
'(-no-cache -nocache)-cache[cache partition image (default is temporary file)]: :_files -g "*.img"' \
|
||||
'(-cache -no-cache -nocache)'{-no-cache,-nocache}'[disable the cache partition]' \
|
||||
'-sdcard[SD card image (default <system>/sdcard.img]: :_files -g "*.img"' \
|
||||
'(-no-snapstorage)-snapstorage[file that contains all state snapshots (default <datadir>/snapshots.img)]: :_files -g "*.img"' \
|
||||
'(-snapstorage)-no-snapstorage[do not mount a snapshot storage file (this disables all snapshot functionality)]' \
|
||||
'-snapshot[name of snapshot within storage file for auto-start and auto-save (default '\''default-boot'\'')]:snapshot name' \
|
||||
'-no-snapshot[perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage]' \
|
||||
'-no-snapshot-save[do not auto-save to snapshot on exit: abandon changed state]' \
|
||||
'-no-snapshot-load[do not auto-start from snapshot: perform a full boot]' \
|
||||
'-snapshot-list[show a list of available snapshots]' \
|
||||
'-no-snapshot-update-time[do not do try to correct snapshot time on restore]' \
|
||||
'-wipe-data[reset the user data image (copy it from initdata)]' \
|
||||
'-avd[use a specific android virtual device]:android virtual device name' \
|
||||
'-skindir[search skins in <dir> (default <system>/skins)]: :_files -/' \
|
||||
'-skin[select a given skin]' \
|
||||
'(-noskin -no-skin)'{-noskin,-no-skin}'[don'\''t use any emulator skin]' \
|
||||
'-memory[physical RAM size in MBs]:size (in MBs)' \
|
||||
'-netspeed[maximum network download/upload speeds]:speed' \
|
||||
'-netdelay[network latency emulation]:delay' \
|
||||
'-netfast[disable network shaping]' \
|
||||
'-trace[enable code profiling (F9 to start)]:trace name' \
|
||||
'-show-kernel[display kernel messages]' \
|
||||
'-shell[enable root shell on current terminal]' \
|
||||
{-no-jni,-nojni}'[disable JNI checks in the Dalvik runtime]' \
|
||||
'-logcat[enable logcat output with given tags]:logcat tags' \
|
||||
'(-audio -noaudio -no-audio)'{-noaudio,-no-audio}'[disable audio support]' \
|
||||
'(-noaudio -no-audio)-audio[use specific audio backend]:audio backend' \
|
||||
'-raw-keys[disable Unicode keyboard reverse-mapping]' \
|
||||
'-radio[redirect radio modem interface to character device]:device' \
|
||||
'-port[TCP port that will be used for the console]:port number' \
|
||||
'-ports[TCP ports used for the console and adb bridge]:console port,adb port' \
|
||||
'-onion[use overlay PNG image over screen]: :_files -g "*.(png|PNG)"' \
|
||||
'-onion-alpha[specify onion-skin translucency]:percentage' \
|
||||
'-onion-rotation[specify onion-skin rotation]:rotation:((1 2 3 4))' \
|
||||
'-scale[scale emulator window]:scale' \
|
||||
'-dpi-device[specify device'\''s resolution in dpi (default 165)]:dpi' \
|
||||
'-http-proxy[make TCP connections through a HTTP/HTTPS proxy]:proxy' \
|
||||
'-timezone[use this timezone instead of the host'\''s default]:timezone' \
|
||||
'-dns-server[use this DNS server(s) in the emulated system]:DNS servers' \
|
||||
'-cpu-delay[throttle CPU emulation]:CPU delay' \
|
||||
'-no-boot-anim[disable animation for faster boot]' \
|
||||
'-no-window[disable graphical window display]' \
|
||||
'-report-console[report console port to remote socket]: :_socket' \
|
||||
'-gps[redirect NMEA GPS to character device]:device' \
|
||||
'-keyset[specify keyset file name]: :_files' \
|
||||
'-shell-serial[specific character device for root shell]:device' \
|
||||
'-tcpdump[capture network packets to file]: :_files' \
|
||||
'-bootchart[enable bootcharting]:timeout' \
|
||||
'-charmap[use specific key character map]: :_files' \
|
||||
'*-prop[set system property on boot]:name=value' \
|
||||
'-shared-net-id[join the shared network, using IP address 10.1.2.<number>]:number' \
|
||||
'-nand-limits[enforce NAND/Flash read/write thresholds]:limits' \
|
||||
'-memcheck[enable memory access checking]:flags' \
|
||||
'-qemu[pass arguments to qemu]:arguments' \
|
||||
'-verbose[same as '\''-debug-init'\'']' \
|
||||
'*'{-debug,-debug-,-debug-no-}'[enable/disable specific debug messages]:tag'
|
||||
}
|
||||
|
||||
_emulator "$@"
|
||||
202
_eselect
202
_eselect
|
|
@ -1,202 +0,0 @@
|
|||
#compdef eselect
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Eselect (symlink manager for multiversioning
|
||||
# and multibranding support for some libraries and binaries).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#<app-admin/eselect-1.0.11>
|
||||
#
|
||||
|
||||
|
||||
_eselect_env () {
|
||||
if (( $words[(I)(update)] )); then
|
||||
_values 'update options' \
|
||||
'makelinks[force updating of links]' \
|
||||
'noldconfig[Do not alter the ld.so cache or configuration]' && return 0
|
||||
fi
|
||||
_values 'env options' $stdopts[@] \
|
||||
'update[Collect environment variables from all scripts]' && return 0
|
||||
}
|
||||
|
||||
_eselect_binutils () {
|
||||
local binutilslist
|
||||
if (( $words[(I)(set)] )); then
|
||||
binutilslist=(${${${(M)${(f)"$(eselect --no-color binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values 'available binutils version' $binutilslist[@] && return 0
|
||||
fi
|
||||
_values 'binutils options' $stdopts[@] \
|
||||
'list[List all installed version of binutils]' \
|
||||
'show[Print the currently active binutils version]' \
|
||||
'set[Activate one of the installed binutils]' && return 0
|
||||
}
|
||||
|
||||
_eselect_kernel () {
|
||||
local kernellist
|
||||
if (( $words[(I)(set)] )); then
|
||||
kernellist=(${${${(M)${(f)"$(eselect --no-color kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values 'available kernel version' $kernellist[@] && return 0
|
||||
fi
|
||||
_values 'kenrel options' $stdopts[@] \
|
||||
'list[List available kernel symlink targets]' \
|
||||
'show[Show the current kernel symlink]' \
|
||||
'set[Set a new kernel symlink target]' && return 0
|
||||
}
|
||||
_eselect_ctags () {
|
||||
local ctagslist
|
||||
if (( $words[(I)(set)] )); then
|
||||
ctagslist=(${${${(M)${(f)"$(eselect --no-color ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values 'available ctags version' $ctagslist[@] && return 0
|
||||
fi
|
||||
_values 'ctags options' $stdopts[@] \
|
||||
'list[List available ctags symlink targets]' \
|
||||
'show[Show the current target of the ctags symlink]' \
|
||||
'update[Automatically update the ctags symlink]' \
|
||||
'set[Set a new ctags symlink target]' && return 0
|
||||
}
|
||||
_eselect_profile () {
|
||||
local profilelist
|
||||
if (( $words[(I)(set)] )); then
|
||||
profilelist=(${${${(M)${(f)"$(eselect --no-color profile list)"}## *}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values -w 'available profiles' $profilelist[@] \
|
||||
'--force[Forcibly set the symlink]' && return 0
|
||||
fi
|
||||
_values 'profile options' $stdopts[@] \
|
||||
'list[List available profile symlink targets]' \
|
||||
'show[Show the current make.profile symlink]' \
|
||||
'set[Set a new profile symlink target]' && return 0
|
||||
}
|
||||
_eselect_fontconfig () {
|
||||
local fclistenabled fclistdisabled
|
||||
if (( $words[(I)(enable)] )); then
|
||||
fclistdisabled=(${${${${(M)${(f)"$(eselect --no-color fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values -w '.conf to enable' $fclistdisabled[@] && return 0
|
||||
elif (( $words[(I)(disable)] )); then
|
||||
fclistenabled=(${${${(M)${(M)${(f)"$(eselect --no-color fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values -w '.conf to disable' $fclistenabled[@] && return 0
|
||||
fi
|
||||
_values 'fontconfig options' $stdopts[@] \
|
||||
'list[List available fontconfig .conf files]' \
|
||||
'disable[Disable specified fontconfig .conf file(s)]' \
|
||||
'enable[Enable specified fontconfig .conf file(s)]' && return 0
|
||||
}
|
||||
_eselect_opengl () {
|
||||
local opengllist
|
||||
if (( $words[(I)(set)] )); then
|
||||
opengllist=(${${${(M)${(f)"$(eselect --no-color opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values -w 'opengl implementations and options' $opengllist[@] \
|
||||
'--use-old[If an implementationis already set, use that one instead]' \
|
||||
'--prefix[Set the source prefix]:path:_files -/' \
|
||||
'--dst-prefix[Set the destination prefix]:path:_files -/' \
|
||||
'--impl-headers[Override global headers with ones provided by this profile]' && return 0
|
||||
fi
|
||||
_values 'opengl options' $stdopts[@] \
|
||||
'list[List the available OpenGL implementations]' \
|
||||
'set[Select the OpenGL implementation]' \
|
||||
'show[Print the current OpenGL implementation]' && return 0
|
||||
}
|
||||
_eselect_vi () {
|
||||
local vilist
|
||||
if (( $words[(I)(set)] )); then
|
||||
vilist=(${${${(M)${(f)"$(eselect --no-color vi list)"}## *}// \**/}//( \[*\] | \[*\] )/})
|
||||
_values -w 'vi implementation' $vilist[@] && return 0
|
||||
elif (( $words[(I)(update)] )); then
|
||||
_values -w 'option' '--if-unset[Do not override existing implementation]' && return 0
|
||||
fi
|
||||
_values 'vi options' $stdopts[@] \
|
||||
'list[List available vi implementations]' \
|
||||
'set[Set a new vi implementation provider]' \
|
||||
'show[Show the current vi implementation]' \
|
||||
'update[Automatically update the vi provider]' && return 0
|
||||
}
|
||||
_eselect () {
|
||||
local globopts sedcmd modnames modopts
|
||||
local stdopts
|
||||
stdopts=(
|
||||
'help[Display help text]'
|
||||
'usage[Display usage information]'
|
||||
'version[Display version information]'
|
||||
)
|
||||
globopts=(
|
||||
'--no-colour[Disable coloured output]'
|
||||
'--no-color[Disable coloured output]'
|
||||
)
|
||||
modnames=(${${${(M)${(f)"$(eselect --no-color list-modules)"}## *}// */}// /})
|
||||
if ((CURRENT == 2)); then
|
||||
_arguments -s \
|
||||
"$globopts[@]" \
|
||||
"*:portage:_values 'eselect modules' \$modnames[@]" && return 0
|
||||
elif ((CURRENT == 3)); then
|
||||
if [[ $words[2] == --no-colour || $words[2] == --no-color ]]; then
|
||||
_arguments -s \
|
||||
"*:portage:_values 'eselect modules' \$modnames[@]" && return 0
|
||||
elif (( $modnames[(I)$words[2]] )); then
|
||||
if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then
|
||||
_eselect_$words[2] "$@"
|
||||
else
|
||||
modopts=(${${${(M)${(f)"$(eselect --no-color $words[2] usage)"}## *}// */}// /})
|
||||
_arguments -s \
|
||||
"*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0
|
||||
fi
|
||||
fi
|
||||
elif ((CURRENT >= 4)); then
|
||||
if (( $words[(I)(--no-color|--no-colour)] )); then
|
||||
if (( $modnames[(I)$words[3]] )); then
|
||||
if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then
|
||||
_eselect_$words[3] "$@"
|
||||
else
|
||||
modopts=(${${${${(M)${(f)"$(eselect --no-color $words[3] usage)"}## *}// */}// /}// *})
|
||||
_arguments -s \
|
||||
"*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if (( $modnames[(I)$words[2]] )); then
|
||||
_eselect_$words[2] "$@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
_eselect "$@"
|
||||
78
_fab
78
_fab
|
|
@ -1,78 +0,0 @@
|
|||
#compdef fab
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Fabric (http://fabfile.org)
|
||||
#
|
||||
# Source: https://github.com/vhbit/fabric-zsh-autocomplete
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Valerii Hiora (https://github.com/vhbit)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext=$curcontext state line
|
||||
declare -A opt_args
|
||||
|
||||
declare target_list
|
||||
target_list=(`fab --shortlist 2>/dev/null`)
|
||||
|
||||
_targets() {
|
||||
_describe -t commands "fabric targets" target_list
|
||||
}
|
||||
|
||||
output_levels=(
|
||||
'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.'
|
||||
'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!'
|
||||
'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.'
|
||||
'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.'
|
||||
'stdout: Local, or remote, stdout, i.e. non-error output from commands.'
|
||||
'stderr: Local, or remote, stderr, i.e. error-related output from commands.'
|
||||
'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.'
|
||||
)
|
||||
|
||||
_arguments -w -S -C \
|
||||
'(-)'{-h,--help}'[show this help message and exit]: :->noargs' \
|
||||
'(-)'{-V,--version}'[show program''s version number and exit]: :->noargs' \
|
||||
'(-)--list[print list of possible commands and exit]: :->noargs' \
|
||||
'(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \
|
||||
'(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \
|
||||
'(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \
|
||||
"(-d+ --display=-)"{-d+,--display=-}"[print detailed info about a given command]: :_targets" \
|
||||
'(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \
|
||||
'(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \
|
||||
'(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \
|
||||
'(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \
|
||||
'(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \
|
||||
'(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \
|
||||
'(-a --no-agent)'{-a,--no-agent}'[don''t use the running SSH agent]' \
|
||||
'(-k --no-keys)'{-k,--no-keys}'[don''t load private key files from ~/.ssh/]' \
|
||||
'(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \
|
||||
'-i+[path to SSH private key file. May be repeated]: :_files' \
|
||||
"(-f+ --fabfile=)"{-f+,--fabfile=}"[Python module file to import]: :_files -g *.py" \
|
||||
'(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \
|
||||
'(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \
|
||||
'(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \
|
||||
'(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \
|
||||
'*::: :->subcmds' && return 0
|
||||
|
||||
if [[ CURRENT -ge 1 ]]; then
|
||||
case $state in
|
||||
noargs)
|
||||
_message "nothing to complete";;
|
||||
levels)
|
||||
_describe -t commands "output levels" output_levels;;
|
||||
*)
|
||||
_targets;;
|
||||
esac
|
||||
|
||||
return
|
||||
fi
|
||||
48
_gas
48
_gas
|
|
@ -1,48 +0,0 @@
|
|||
#compdef gas
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for gas (https://github.com/walle/gas).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Fredrik Wallgren <fredrik.wallgren@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line cmds ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'(-h|--help)'{-h,--help}'[show help information]' \
|
||||
'1: :->cmds' \
|
||||
'*: :->args' && ret=0
|
||||
|
||||
case "$state" in
|
||||
(cmds)
|
||||
cmds=(
|
||||
"version:Prints Gas's version"
|
||||
"use:Uses author"
|
||||
"show:Shows your current user"
|
||||
"list:Lists your authors"
|
||||
"import:Imports current user to gasconfig"
|
||||
"help:Describe available tasks or one specific task"
|
||||
"delete:Deletes author"
|
||||
"add:Adds author to gasconfig"
|
||||
)
|
||||
_describe -t commands 'gas command' cmds && ret=0
|
||||
;;
|
||||
(args)
|
||||
case "$line[1]" in
|
||||
(use|delete)
|
||||
_values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
|
||||
68
_geany
68
_geany
|
|
@ -1,68 +0,0 @@
|
|||
#compdef geany
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Geany (http://www.geany.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_arguments \
|
||||
'(- 1 *)'{-h,--help}'[Show help options]' \
|
||||
'(- 1 *)--help-all[Show all help options]' \
|
||||
'(- 1 *)--help-gtk[Show GTK+ Options]' \
|
||||
'(- 1 *)'{-V,--version}'[Show version and exit]' \
|
||||
'(--column)--column[Set initial column number for the first opened file (useful in conjunction with --line)]:column number' \
|
||||
'(-c --config)'{-c,--config}'[Use an alternate configuration directory]:configuration file:_files' \
|
||||
'(--ft-names)--ft-names[Print internal filetype names]' \
|
||||
'(-g --generate-tags)'{-g,--generate-tags}'[Generate global tags file (see documentation)]' \
|
||||
'(-P --no-preprocessing)'{-P,--no-preprocessing}'[Don'\''t preprocess C/C++ files when generating tags]' \
|
||||
'(-i --new-instance)'{-i,--new-instance}'[Don'\''t open files in a running instance, force opening a new instance]' \
|
||||
'(--socket-file)--socket-file[Use this socket filename for communication with a running Geany instance]:socket file:_files' \
|
||||
'(--list-documents)--list-documents[Return a list of open documents in a running Geany instance]' \
|
||||
'(-l --line)'{-l,--line}'[Set initial line number for the first opened file]:line number' \
|
||||
'(-m --no-msgwin)'{-m,--no-msgwin}'[Don'\''t show message window at startup]' \
|
||||
'(-n --no-ctags)'{-n,--no-ctags}'[Don'\''t load auto completion data (see documentation)]' \
|
||||
'(-p --no-plugins)'{-p,--no-plugins}'[Don'\''t load plugins]' \
|
||||
'(--print-prefix)--print-prefix[Print Geany'\''s installation prefix]' \
|
||||
'(-s --no-session)'{-s,--no-session}'[Don'\''t load the previous session'\''s files]' \
|
||||
'(-t --no-terminal)'{-t,--no-terminal}'[Don'\''t load terminal support]' \
|
||||
'(--vte-lib)--vte-lib[Filename of libvte.so]:libvte.so filename:_files -g "*.so"' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Be verbose]' \
|
||||
'(--display)--display[X display to use]:X display:_x_display' \
|
||||
'*: :_files'
|
||||
454
_gem
454
_gem
|
|
@ -1,454 +0,0 @@
|
|||
#compdef gem gem1.9
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for gem (http://rubygems.org).
|
||||
#
|
||||
# Source: https://gist.github.com/164465
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Alex Vollmer (https://github.com/alexvollmer)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
gem_general_flags=("(-h --help)"{-h,--help}"[Get help on this command]"
|
||||
"(-V --verbose)"{-V,--verbose}"[Set the verbose level of output]"
|
||||
"(-q --quiet)"{-q,--quiet}"[Silence commands]"
|
||||
"--config-file[Use this config file instead of default]:file:_files"
|
||||
"--backtrace[Show stack backtrace on errors]"
|
||||
"--debug[Turn on Ruby debugging]"
|
||||
$nul_arg
|
||||
)
|
||||
|
||||
_gem() {
|
||||
if (( CURRENT > 2 )); then
|
||||
(( CURRENT-- ))
|
||||
shift words
|
||||
_call_function 1 _gem_${words[1]}
|
||||
else
|
||||
_values "gem command" \
|
||||
"build[Build a gem from a gemspec]" \
|
||||
"cert[Manage RubyGems certificates and signing settings]" \
|
||||
"check[Check installed gems]" \
|
||||
"cleanup[Clean up old versions of installed gems in the local repository]" \
|
||||
"contents[Display the contents of the installed gems]" \
|
||||
"dependency[Show the dependencies of an installed gem]" \
|
||||
"environment[Display information about the RubyGems environment]" \
|
||||
"fetch[Download a gem and place it in the current directory]" \
|
||||
"generate_index[Generates the index files for a gem server directory]" \
|
||||
"help[Provide help on the 'gem' command]" \
|
||||
"install[Install a gem into the local repository]" \
|
||||
"list[Display gems whose name starts with STRING]" \
|
||||
"lock[Generate a lockdown list of gems]" \
|
||||
"mirror[Mirror a gem repository]" \
|
||||
"outdated[Display all gems that need updates]" \
|
||||
"pristine[Restores installed gems to pristine condition from files located in the gem cache]" \
|
||||
"query[Query gem information in local or remote repositories]" \
|
||||
"rdoc[Generates RDoc for pre-installed gems]" \
|
||||
"search[Display all gems whose name contains STRING]" \
|
||||
"server[Documentation and gem repository HTTP server]" \
|
||||
"sources[Manage the sources and cache file RubyGems uses to search for gems]" \
|
||||
"specification[Display gem specification (in yaml)]" \
|
||||
"stale[List gems along with access times]" \
|
||||
"uninstall[Uninstall gems from the local repository]" \
|
||||
"unpack[Unpack an installed gem to the current directory]" \
|
||||
"update[Update the named gems (or all installed gems) in the local repository]" \
|
||||
"which[Find the location of a library file you can require]"
|
||||
fi
|
||||
}
|
||||
|
||||
__all_gems() {
|
||||
_gem_names=($(${service} list | awk '{print $1}'))
|
||||
compadd "$@" -k _gem_names
|
||||
}
|
||||
|
||||
__all_gems_all() {
|
||||
_gem_names=($(gem list | awk '{print $1}') "--all")
|
||||
compadd "$@" -k _gem_names
|
||||
}
|
||||
|
||||
__gem_help_arguments() {
|
||||
_args=("commands"
|
||||
"examples"
|
||||
"build"
|
||||
"cert"
|
||||
"check"
|
||||
"cleanup"
|
||||
"contents"
|
||||
"dependency"
|
||||
"environment"
|
||||
"fetch"
|
||||
"generate_index"
|
||||
"help"
|
||||
"install"
|
||||
"list"
|
||||
"lock"
|
||||
"mirror"
|
||||
"outdated"
|
||||
"pristine"
|
||||
"query"
|
||||
"rdoc"
|
||||
"search"
|
||||
"server"
|
||||
"sources"
|
||||
"specification"
|
||||
"stale"
|
||||
"uninstall"
|
||||
"unpack"
|
||||
"update"
|
||||
"which")
|
||||
compadd "$@" -k _args
|
||||
}
|
||||
|
||||
__gem_trust_policies() {
|
||||
_args=("NoSecurity"
|
||||
"LowSecurity"
|
||||
"MediumSecurity"
|
||||
"HighSecurity")
|
||||
compadd "$@" -k _args
|
||||
}
|
||||
|
||||
_gem_build() {
|
||||
_arguments \
|
||||
*:file:_files -f \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_cert() {
|
||||
_arguments \
|
||||
"(-a --add)"{-a,--add}"[Add a trusted certificate.]":file:_files \
|
||||
"(-l --list)"{-l,--list}"[List trusted certificates.]" \
|
||||
"(-r --remove)"{-r,--remove}"[Remove trusted certificates containing STRING.]" \
|
||||
"(-b --build)"{-b,--build}"[Build private key and self-signed certificate for EMAIL_ADDR.]" \
|
||||
"(-C --certificate)"{-C,--certificate}"[Certificate for --sign command.]":file:_files \
|
||||
"(-K --private-key)"{-K,--private-key}"[Private key for --sign command.]":file:_files \
|
||||
"(-s --sign)"{-s,--sign}"[Sign a certificate with my key and certificate.]":file:_files \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_check() {
|
||||
_arguments \
|
||||
"--verify[Verify gem file against its internal checksum]":file:_files \
|
||||
"(-a --alien)"{-a,--alien}"[Report 'unmanaged' or rogue files in the gem repository]" \
|
||||
"(-v --verbose)"{-v,--verbose}"[Spew more words]" \
|
||||
"(-t --test)"{-t,--test}"[Run unit tests for gem]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to run tests for]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_cleanup() {
|
||||
_arguments \
|
||||
"*:gemname:__all_gems" \
|
||||
"(-d --dryrun)"{-d,--dryrun}"[]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_contents() {
|
||||
_arguments \
|
||||
"*:gemname:__all_gems" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to contents]" \
|
||||
"--all[Contents for all gems]" \
|
||||
"(-s --spec-dir)"{-s,--spec-dir}"[Search for gems under specific paths]" \
|
||||
"(-l --no-lib-only)"{-l,--no-lib-only}"[Only return files in the Gem's lib_dirs]" \
|
||||
"--no-prefix[Don't include installed path prefix]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_dependency() {
|
||||
_arguments \
|
||||
":gemname:__all_gems" \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to dependency]" \
|
||||
"--platform[Specify the platform of gem to dependency]" \
|
||||
"(-R --no-reverse-dependencies)"{-R,--no-reverse-dependencies}"[Include reverse dependencies in the output]" \
|
||||
"(-p --pipe)"{-p,--pipe}"[Pipe Format (name --version ver)]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_environment() {
|
||||
typeset -g _environment_arg=
|
||||
_environment_arg='::environment:((packageversion\:"display the package version"
|
||||
gemdir\:"display the path where gems are installed"
|
||||
gempath\:"display path used to search for gems"
|
||||
version\:"display the gem format version"
|
||||
remotesources\:"display the remote gem servers"))'
|
||||
_arguments \
|
||||
$_environment_arg \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_fetch() {
|
||||
_arguments \
|
||||
"*:gemname:__all_gems" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to fetch]" \
|
||||
"--platform[Specify the platform of gem to fetch]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_generate_index() {
|
||||
_arguments \
|
||||
"(-d --directory=DIRNAME)"{-d,--directory=-}"[repository base dir containing gems subdir]":directory:_directories \
|
||||
"--no-legacy[Generate indexes for RubyGems older than 1.2.0]" \
|
||||
"--no-modern[Generate indexes for RubyGems newer than 1.2.0]" \
|
||||
"--update[Update modern indexes with gems added since the last update]" \
|
||||
"--rss-gems-host=-[Host name where gems are served from, used for GUID and enclosure values]" \
|
||||
"--rss-host=-[Host name for more gems information, used for RSS feed link]" \
|
||||
"--rss-title=-[Set title for RSS feed]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_help() {
|
||||
_arguments \
|
||||
":argument:__gem_help_arguments" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_install() {
|
||||
_arguments \
|
||||
"*:gemname:__all_gems" \
|
||||
"(-i --install-dir)"{-i,--install-dir}"[Gem repository directory to get installed gems]":directory:_directories \
|
||||
"(-n --bindir)"{-n,--bindir}"[Directory where binary files are located]":directory:_directories \
|
||||
"(-d --no-rdoc)"{-d,--no-rdoc}"[Generate RDoc documentation for the gem on install]" \
|
||||
"--no-ri[Generate RI documentation for the gem on install]" \
|
||||
"(-E --no-env-shebang)"{-E,--no-env-shebang}"[Rewrite the shebang line on installed scripts to use /usr/bin/env]" \
|
||||
"(-f --no-force)"{-f,--no-force}"[Force gem to install, bypassing dependency checks]" \
|
||||
"(-t --no-test)"{-t,--no-test}"[Run unit tests prior to installation]" \
|
||||
"(-w --no-wrappers)"{-w,--no-wrappers}"[Use bin wrappers for executables Not available on dosish platforms]" \
|
||||
"(-P --trust-policy)"{-P,--trust-policy}"[Specify gem trust policy]:trust policy:__gem_trust_policies" \
|
||||
"--ignore-dependencies[Do not install any required dependent gems]" \
|
||||
"(-y --include-dependencies)"{-y,--include-dependencies}"[Unconditionally install the required dependent gems]" \
|
||||
"--no-format-executable[Make installed executable names match ruby. If ruby is ruby18, foo_exec will be foo_exec18]" \
|
||||
"--no-user-install[Install in user's home directory instead of GEM_HOME. Defaults to using home only if GEM_HOME is not writable.]" \
|
||||
"--development[Install any additional development dependencies]" \
|
||||
"--prerelease[Install prerelease versions of a gem if available. Defaults to skipping prereleases.]" \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
"--platform[Specify the platform of gem to install]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to install]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_list() {
|
||||
_arguments \
|
||||
":gem name: " \
|
||||
"(-i --no-installed)"{-i,--no-installed}"[Check for installed gem]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to list]" \
|
||||
"(-d --no-details)"{-d,--no-details}"[Display detailed information of gem(s)]" \
|
||||
"--no-versions[Display only gem names]" \
|
||||
"(-a --all)"{-a,--all}"[Display all gem versions]" \
|
||||
"--prerelease[Display prerelease versions]" \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_lock() {
|
||||
_arguments \
|
||||
":gemname:__all_gems" \
|
||||
"(-s --no-strict)"{-s,--no-strict}"[fail if unable to satisfy a dependency]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_mirror() {
|
||||
_arguments \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_outdated() {
|
||||
_arguments \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
"--platform[Specify the platform of gem to outdated]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_pristine() {
|
||||
_arguments \
|
||||
":gem name:__all_gems_all" \
|
||||
"--all[Restore all installed gems to pristine condition]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to restore to pristine condition]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_query() {
|
||||
_arguments \
|
||||
"(-i --no-installed)"{-i,--no-installed}"[Check for installed gem]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to query]" \
|
||||
"(-n --name-matches)"{-n,--name-matches}"[Name of gem(s) to query on matches the provided REGEXP]" \
|
||||
"(-d --no-details)"{-d,--no-details}"[Display detailed information of gem(s)]" \
|
||||
"--no-versions[Display only gem names]" \
|
||||
"(-a --all)"{-a,--all}"[Display all gem versions]" \
|
||||
"--prerelease[Display prerelease versions]" \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_rdoc() {
|
||||
_arguments \
|
||||
":gem name:__all_gems_all" \
|
||||
"--all[Generate RDoc/RI documentation for all installed gems]" \
|
||||
"--no-rdoc[Include RDoc generated documents]" \
|
||||
"--no-ri[Include RI generated documents]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to rdoc]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_search() {
|
||||
_arguments \
|
||||
":gem name::" \
|
||||
"(-i --no-installed)"{-i,--no-installed}"[Check for installed gem]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to search]" \
|
||||
"(-d --no-details)"{-d,--no-details}"[Display detailed information of gem(s)]" \
|
||||
"--no-versions[Display only gem names]" \
|
||||
"(-a --all)"{-a,--all}"[Display all gem versions]" \
|
||||
"--prerelease[Display prerelease versions]" \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_server() {
|
||||
_arguments \
|
||||
"(-p --port=PORT)"{-p,--port=-}"[port to listen on]" \
|
||||
"(-d --dir=GEMDIR)"{-d,--dir=-}"[directory from which to serve gems]":directory:_directories \
|
||||
"--no-daemon[run as a daemon]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_sources() {
|
||||
_arguments \
|
||||
"(-a --add)"{-a,--add}"[Add source]" \
|
||||
"(-l --list)"{-l,--list}"[List sources]" \
|
||||
"(-r --remove)"{-r,--remove}"[Remove source]" \
|
||||
"(-c --clear-all)"{-c,--clear-all}"[Remove all sources (clear the cache)]" \
|
||||
"(-u --update)"{-u,--update}"[Update source cache]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_specification() {
|
||||
_arguments \
|
||||
":gemname:__all_gems" \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to examine]" \
|
||||
"--platform[Specify the platform of gem to specification]" \
|
||||
"--all[Output specifications for all versions of the gem]" \
|
||||
"--ruby[Output ruby format]" \
|
||||
"--yaml[Output RUBY format]" \
|
||||
"--marshal[Output Marshal format]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_stale() {
|
||||
_arguments \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_uninstall() {
|
||||
_arguments \
|
||||
"*:gemname:__all_gems" \
|
||||
"(-a --no-all)"{-a,--no-all}"[Uninstall all matching versions]" \
|
||||
"(-I --no-ignore-dependencies)"{-I,--no-ignore-dependencies}"[Ignore dependency requirements while uninstalling]" \
|
||||
"(-x --no-executables)"{-x,--no-executables}"[Uninstall applicable executables without confirmation]" \
|
||||
"(-i --install-dir)"{-i,--install-dir}"[Directory to uninstall gem from]":directory:_directories \
|
||||
"(-n --bindir)"{-n,--bindir}"[Directory to remove binaries from]":directory:_directories \
|
||||
"--no-user-install[Uninstall from user's home directory in addition to GEM_HOME.]" \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to uninstall]" \
|
||||
"--platform[Specify the platform of gem to uninstall]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_unpack() {
|
||||
_arguments \
|
||||
":gemname:__all_gems" \
|
||||
"--target=-[target directory for unpacking]":directory:_directories \
|
||||
"(-v --version)"{-v,--version}"[Specify version of gem to unpack]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_update() {
|
||||
_arguments \
|
||||
"*:gemname:__all_gems" \
|
||||
"(-i --install-dir)"{-i,--install-dir}"[Gem repository directory to get installed gems]":directory:_directories \
|
||||
"(-n --bindir)"{-n,--bindir}"[Directory where binary files are located]":directory:_directories \
|
||||
"(-d --no-rdoc)"{-d,--no-rdoc}"[Generate RDoc documentation for the gem on install]" \
|
||||
"--no-ri[Generate RI documentation for the gem on install]" \
|
||||
"(-E --no-env-shebang)"{-E,--no-env-shebang}"[Rewrite the shebang line on installed scripts to use /usr/bin/env]" \
|
||||
"(-f --no-force)"{-f,--no-force}"[Force gem to install, bypassing dependency checks]" \
|
||||
"(-t --no-test)"{-t,--no-test}"[Run unit tests prior to installation]" \
|
||||
"(-w --no-wrappers)"{-w,--no-wrappers}"[Use bin wrappers for executables Not available on dosish platforms]" \
|
||||
"(-P --trust-policy)"{-P,--trust-policy}"[Specify gem trust policy]:trust policy:__gem_trust_policies" \
|
||||
"--ignore-dependencies[Do not install any required dependent gems]" \
|
||||
"(-y --include-dependencies)"{-y,--include-dependencies}"[Unconditionally install the required dependent gems]" \
|
||||
"--no-format-executable[Make installed executable names match ruby. If ruby is ruby18, foo_exec will be foo_exec18]" \
|
||||
"--no-user-install[Install in user's home directory instead of GEM_HOME. Defaults to using home only if GEM_HOME is not writable.]" \
|
||||
"--development[Install any additional development dependencies]" \
|
||||
"--prerelease[Install prerelease versions of a gem if available. Defaults to skipping prereleases.]" \
|
||||
"(-l --local)"{-l,--local}"[Restrict operations to the LOCAL domain]" \
|
||||
"(-r --remote)"{-r,--remote}"[Restrict operations to the REMOTE domain]" \
|
||||
"(-b --both)"{-b,--both}"[Allow LOCAL and REMOTE operations]" \
|
||||
"(-B --bulk-threshold)"{-B,--bulk-threshold}"[Threshold for switching to bulk synchronization (default 1000)]" \
|
||||
"--source[Use URL as the remote source for gems]" \
|
||||
"(-p --[no-]http-proxy)"{-p,--[no-]http-proxy}"[Use HTTP proxy for remote operations]" \
|
||||
"(-u --no-update-sources)"{-u,--no-update-sources}"[Update local source cache]" \
|
||||
"--system[Update the RubyGems system software]" \
|
||||
"--platform[Specify the platform of gem to update]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
|
||||
_gem_which() {
|
||||
_arguments \
|
||||
*:file:_files -f \
|
||||
"(-a --no-all)"{-a,--no-all}"[show all matching files]" \
|
||||
"(-g --no-gems-first)"{-g,--no-gems-first}"[search gems before non-gems]" \
|
||||
$gem_general_flags && ret=0
|
||||
}
|
||||
150
_genlop
150
_genlop
|
|
@ -1,150 +0,0 @@
|
|||
#compdef genlop
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for GenLop (Gentoo Installation log parser).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#<app-portage/genlop-0.30.8>
|
||||
|
||||
|
||||
_genlop () {
|
||||
local prev1="$words[CURRENT-1]" prev2="$words[CURRENT-2]" days months arg single state lstate
|
||||
days=(monday tuesday wednesday thursday friday saturday sunday)
|
||||
months=(january february march april may june july august september october november december)
|
||||
arg=( --current -c --time -t --gmt -g --info -i --file -f --rsync -r --unmerge -u --date --search -s --list -l )
|
||||
single=( --current -c --pretend -p --help -h --version -v )
|
||||
|
||||
[[ ${prev2} == (1st|2nd|3rd|4th|5th) ]] &&
|
||||
compadd in\ $months && return 0
|
||||
[[ ${prev1} == ([2-9]|[1-9][0-9]*) && ${prev2} != \
|
||||
(january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
|
||||
_values '' 'days ago' 'months ago' 'years ago' 'weeks ago' && return 0
|
||||
[[ ${prev1} == (1) && ${prev2} != \
|
||||
(january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
|
||||
_values '' 'day ago' 'month ago' 'year ago' 'week ago' && return 0
|
||||
|
||||
case "$prev1" in
|
||||
last)
|
||||
_values '' month week
|
||||
compadd $days && return 0
|
||||
;;
|
||||
1st|2nd|3rd|4th|5th)
|
||||
compadd $days && return 0
|
||||
;;
|
||||
january|february|march|april|may|june|july|august|september|october|november|december)
|
||||
compadd {1..31} && return 0
|
||||
;;
|
||||
--date)
|
||||
_message 'enter number for more options or use mm/dd/yyyy format'
|
||||
_values '' \
|
||||
last yesterday 1st 2nd 3rd 4th 5th
|
||||
_alternative \
|
||||
'*:*:_days' '*:*:_months' && return 0
|
||||
;;
|
||||
--file|-f)
|
||||
_arguments '*:logfile:_files' && return 0
|
||||
;;
|
||||
*)
|
||||
_arguments \
|
||||
"($single $arg *)"{--current,-c}"[display the current merge in action]" \
|
||||
"($single)*--date[specify date of event]:date:->date" \
|
||||
"($single)*-f[specify the logfile to use]:logfile:_files" \
|
||||
"($single --gmt -g)"{--gmt,-g}"[display time in GMT/UTC format (default is local time)]" \
|
||||
"($single $arg *)"{--help,-h}"[display help information]" \
|
||||
"($single --info -i --list -l)"{--info,-i}"[print brief summary about installed ebuild]" \
|
||||
"($single --search -s --info -i --list -l *)"{--list,-l}"[list merge history]" \
|
||||
"(--nocolor -n)"{--nocolor,-n}"[disable colored output]" \
|
||||
"($single $arg *)"{--pretend,-p}"[estimate build time of a piped emerge -p]" \
|
||||
"($single --search -s --info -i --time -t --unmerge -u --rsync -r *)"{--rsync,-r}"[display rsync history]" \
|
||||
"($single --rsync -r --search -s --list -l *)"{--search,-s}"[select ebuilds matching the provided regular expression]:pattern:" \
|
||||
"($single --time -t)"{--time,-t}"[display merge time]" \
|
||||
"($single --rsync -r --unmerge -u)"{--unmerge,-u}"[display when packages have been unmerged]" \
|
||||
"($single $arg *)"{--version,-v}"[display version information]" \
|
||||
"($single)*:package:_gentoo_packages available"
|
||||
;;
|
||||
esac
|
||||
|
||||
while [[ -n "$state" ]]; do
|
||||
lstate=$state
|
||||
state=''
|
||||
case "$lstate" in
|
||||
date) _message 'enter number for more options or use mm/dd/yyyy format'
|
||||
_values '' \
|
||||
last yesterday 1st 2nd 3rd 4th 5th
|
||||
_alternative \
|
||||
':*:_days' ':*:_months' && return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
_days() {
|
||||
local m="monday" t="tuesday" w="wednesday" T="thursday" f="friday" s="saturday" S="sunday"
|
||||
local day=$(date +%u)
|
||||
if [[ ${day} == 1 ]] then compadd $m
|
||||
elif [[ ${day} == 2 ]] then compadd $m $t
|
||||
elif [[ ${day} == 3 ]] then compadd $m $t $w
|
||||
elif [[ ${day} == 4 ]] then compadd $m $t $w $T
|
||||
elif [[ ${day} == 5 ]] then compadd $m $t $w $T $f
|
||||
elif [[ ${day} == 6 ]] then compadd $m $t $w $T $f $s
|
||||
elif [[ ${day} == 7 ]] then compadd $m $t $w $T $f $s $S
|
||||
fi
|
||||
}
|
||||
_months() {
|
||||
local j="january" f="february" m="march" a="april" M="may" ju="june" J="july" A="august" s="september" o="october" n="november" d="december"
|
||||
local month=$(date +%m)
|
||||
if [[ ${month} == 01 ]] then compadd $j
|
||||
elif [[ ${month} == 02 ]] then compadd $j $f
|
||||
elif [[ ${month} == 03 ]] then compadd $j $f $m
|
||||
elif [[ ${month} == 04 ]] then compadd $j $f $m $a
|
||||
elif [[ ${month} == 05 ]] then compadd $j $f $m $a $M
|
||||
elif [[ ${month} == 06 ]] then compadd $j $f $m $a $M $ju
|
||||
elif [[ ${month} == 07 ]] then compadd $j $f $m $a $M $ju $J
|
||||
elif [[ ${month} == 08 ]] then compadd $j $f $m $a $M $ju $J $A
|
||||
elif [[ ${month} == 09 ]] then compadd $j $f $m $a $M $ju $J $A $s
|
||||
elif [[ ${month} == 10 ]] then compadd $j $f $m $a $M $ju $J $A $s $o
|
||||
elif [[ ${month} == 11 ]] then compadd $j $f $m $a $M $ju $J $A $s $o $n
|
||||
elif [[ ${month} == 12 ]] then compadd $j $f $m $a $M $ju $J $A $s $o $n $d
|
||||
fi
|
||||
}
|
||||
224
_gentoo_packages
224
_gentoo_packages
|
|
@ -1,224 +0,0 @@
|
|||
#autoload
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# functions for gentoo packages
|
||||
# inspired by _deb_packages
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#Usage: _gentoo_packages installed|available|installed_versions|available_versions|binary|category|useflag|overlays|sets|licenses
|
||||
|
||||
# List installed overlays
|
||||
_gentoo_packages_overlays () {
|
||||
for f in /etc/make.conf /etc/make.globals; do
|
||||
[[ -z "$PORTDIR_OVERLAY" && -r "$f" ]] &&
|
||||
local PORTDIR_OVERLAY="`. "$f" 2>/dev/null; echo ${PORTDIR_OVERLAY}`"
|
||||
done
|
||||
compadd $=PORTDIR_OVERLAY
|
||||
}
|
||||
|
||||
#List the sets
|
||||
_gentoo_packages_sets() {
|
||||
local sets
|
||||
[[ -f /usr/share/portage/config/sets.conf ]] && sets=(${${${(M)${(f)"$(</usr/share/portage/config/sets.conf)"}##\[*}/\[/@}/\]})
|
||||
[[ -f /etc/portage/sets.conf ]] && sets=($sets ${${${(M)${(f)"$(</etc/portage/sets.conf)"}##\[*}/\[/@}/\]})
|
||||
compadd $sets
|
||||
}
|
||||
|
||||
#List licenses
|
||||
_gentoo_packages_licenses () {
|
||||
local licenses var PORTDIR
|
||||
var=PORTDIR
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
[[ -z ${(P)var} && -r /etc/make.globals ]] &&
|
||||
local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
|
||||
licenses=($PORTDIR/licenses/*(:t))
|
||||
compadd $licenses
|
||||
}
|
||||
|
||||
# Completion function to show useflags.
|
||||
_gentoo_packages_useflag(){
|
||||
local flags var PORTDIR
|
||||
var=PORTDIR
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
[[ -z ${(P)var} && -r /etc/make.globals ]] &&
|
||||
local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
|
||||
|
||||
flags=( ${${(M)${(f)"$(<$PORTDIR/profiles/use.desc)"}:#* - *}%% - *}
|
||||
${${${(M)${(f)"$(<$PORTDIR/profiles/use.local.desc)"}#* - *}%% - *}#*:} )
|
||||
compadd $flags
|
||||
}
|
||||
|
||||
_gentoo_packages_active_useflag(){
|
||||
local flags var USE
|
||||
var=USE
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
flags=(${${${=USE}%-*}%\\*})
|
||||
compadd $flags
|
||||
}
|
||||
_gentoo_packages_category(){
|
||||
local var trees category
|
||||
for var in PORTDIR PORTDIR_OVERLAY ; do
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
[[ -z ${(P)var} && -r /etc/make.globals ]] &&
|
||||
local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
|
||||
done
|
||||
trees=($PORTDIR $=PORTDIR_OVERLAY)
|
||||
category=( $trees/*-*(/:t) )
|
||||
_wanted cat_packages expl 'category' compadd "$@" $category
|
||||
}
|
||||
|
||||
_gentoo_packages_installed(){
|
||||
local installed_dir installed_portage installed_list expl
|
||||
installed_dir="/var/db/pkg"
|
||||
installed_portage=($installed_dir/*-*/*)
|
||||
|
||||
installed_pkgname=( ${${installed_portage:t}%%-[0-9]*} )
|
||||
_wanted packages expl 'category/package' compadd "$@" ${installed_pkgname}
|
||||
|
||||
installed_list=( ${${installed_portage#$installed_dir/}%%-[0-9]*} )
|
||||
_wanted cat_packages expl 'category/package' _multi_parts "$@" / installed_list
|
||||
|
||||
}
|
||||
|
||||
_gentoo_packages_installed_versions(){
|
||||
local installed_list installed_portage expl
|
||||
|
||||
installed_portage=(/var/db/pkg/*-*/*)
|
||||
_wanted packages expl 'package' compadd "$@" ${installed_portage:t}
|
||||
|
||||
installed_list=( ${installed_portage##*/pkg/} )
|
||||
_wanted cat_packages expl 'category/package' _multi_parts "$@" / installed_list
|
||||
}
|
||||
|
||||
_gentoo_packages_available_pkgnames_only(){
|
||||
local var trees packages
|
||||
|
||||
for var in PORTDIR PORTDIR_OVERLAY ; do
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
[[ -z ${(P)var} && -r /etc/make.globals ]] &&
|
||||
local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
|
||||
done
|
||||
trees=( $PORTDIR $=PORTDIR_OVERLAY)
|
||||
|
||||
packages=( $trees/*-*/*(:t) )
|
||||
_wanted packages expl 'package' compadd - "${(@)packages}"
|
||||
}
|
||||
|
||||
_gentoo_packages_available(){
|
||||
local var trees category packages pkg expl
|
||||
|
||||
for var in PORTDIR PORTDIR_OVERLAY ; do
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
[[ -z ${(P)var} && -r /etc/make.globals ]] &&
|
||||
local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
|
||||
done
|
||||
trees=( $PORTDIR $=PORTDIR_OVERLAY)
|
||||
category=( $trees/*-*(/:t) )
|
||||
|
||||
packages=( $trees/*-*/*(:t) )
|
||||
_wanted packages expl 'package' compadd - "${(@)packages}"
|
||||
|
||||
# Complete cat/pkg. _multi_parts is much to slow for such a large task,
|
||||
# _sep_parts removes the dash from gnome-<tab>, and _path_files wants to
|
||||
# complete cat/pkg/files (if "files" is ignored with -F, miscfiles, etc...
|
||||
# don't get completed).
|
||||
if [[ $PREFIX != */* ]] ; then
|
||||
_wanted cat_packages expl 'category/package' compadd -S '/' $category
|
||||
else
|
||||
compset -P '*/'
|
||||
pkg=( $trees/$IPREFIX/*(:t) )
|
||||
_wanted cat_packages expl 'category/package' compadd $pkg
|
||||
fi
|
||||
}
|
||||
|
||||
_gentoo_packages_available_versions(){
|
||||
local var overlay_ebuilds portage_ebuilds expl trees category
|
||||
|
||||
for var in PORTDIR PORTDIR_OVERLAY ; do
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
[[ -z ${(P)var} && -r /etc/make.globals ]] &&
|
||||
local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
|
||||
done
|
||||
trees=($PORTDIR $=PORTDIR_OVERLAY)
|
||||
category=( $trees/*-*(/:t) )
|
||||
typeset -U category
|
||||
|
||||
if [[ $#PREFIX -ge 1 && -z $words[(r)(--inject|-i)] ]] ; then
|
||||
overlay_ebuilds=($=PORTDIR_OVERLAY/*-*/${PREFIX%%-[0-9]#*}*/*.ebuild(:t:r) )
|
||||
portage_ebuilds=($PORTDIR/metadata/cache/*-*/${PREFIX%%-[0-9]#*}*(:t))
|
||||
_wanted packages expl 'package' compadd $portage_ebuilds $overlay_ebuilds
|
||||
fi
|
||||
pkg=( $trees/${PREFIX%%/*}/*/*.ebuild(:t:r) )
|
||||
_wanted cat_packages expl 'category/package' _sep_parts category / pkg
|
||||
}
|
||||
|
||||
#Function to show tbz2 files available
|
||||
_gentoo_packages_binary() {
|
||||
[[ -z $PKGDIR && -r /etc/make.conf ]] &&
|
||||
local PKGDIR="`. /etc/make.conf 2>/dev/null; echo $PKGDIR`"
|
||||
[[ -z $PKGDIR && -r /etc/make.globals ]] &&
|
||||
local PKGDIR="`. /etc/make.globals 2>/dev/null; echo $PKGDIR`"
|
||||
|
||||
# this doesn't take care of ${PORTAGE_BINHOST}. If Gentoo official
|
||||
# binary mirror will be available we should rewrite it accordingly.
|
||||
_path_files -g \*.tbz2 -W "$PKGDIR/All"
|
||||
}
|
||||
|
||||
_gentoo_packages () {
|
||||
local command="$argv[$#]"
|
||||
[[ "$command" == (sets|licenses|installed(_versions|)|available(_versions|)|binary|category|(active_|)useflag|available_pkgnames_only|overlays) ]] || {
|
||||
_message "unknown command: $command"
|
||||
return 1
|
||||
}
|
||||
_gentoo_packages_$command
|
||||
}
|
||||
|
||||
_gentoo_packages "$@"
|
||||
405
_gentoolkit
405
_gentoolkit
|
|
@ -1,405 +0,0 @@
|
|||
#compdef equery euse eclean eclean-dist eclean-pkg epkginfo genpkgindex glsa-check revdep-rebuild
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Gentoolkit (collection of Gentoo administrative scripts).
|
||||
# (Means portage helper python-scrips and some usefull staff)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#<app-portage/gentoolkit-0.2.4-rc3>
|
||||
#
|
||||
# Status:
|
||||
# euse (fully done)
|
||||
# equery (fully done)
|
||||
# eclean* (fully done)
|
||||
# epkginfo (fully done)
|
||||
# genpkgindex (fully done)
|
||||
# glsa-check (fully done)
|
||||
# revdep-rebuild (fully done)
|
||||
# eread (nothing todo)
|
||||
|
||||
|
||||
# XXX: shouldn't this go to _gentoo_package?
|
||||
_packages () {
|
||||
if compset -P '(\\|)(>=|<=|<|>|=)' ; then
|
||||
_gentoo_packages ${*/(#m)(installed|available)/${MATCH}_versions}
|
||||
else
|
||||
_gentoo_packages $*
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_euse () {
|
||||
local state tmp start_args suboptions_args
|
||||
start_args=(
|
||||
{'(--help)-h','(-h)--help'}'[show help]'
|
||||
{'(--version)-v','(-v)--version'}'[show version]'
|
||||
{'(--info)-i','(-i)--info'}'[show descriptions for the given useflags]'
|
||||
{'(--active)-a','(-a)--active'}'[show currently active useflags and their origin]'
|
||||
{'(--enable)-E','(-E)--enable'}'[enable the given useflags]'
|
||||
{'(--disable)-D','(-D)--disable'}'[disable the given useflags]'
|
||||
{'(--prune)-P','(-P)--prune'}'[show version]'
|
||||
)
|
||||
suboptions_args=(
|
||||
{'(--global)-g','(-g)--global'}'[show only global use flags]'
|
||||
{'(--local)-l','(-l)--local'}'[show only local use flags]'
|
||||
)
|
||||
if (( CURRENT == 2 ));then
|
||||
_arguments -s $start_args
|
||||
elif (( CURRENT == 3 ));then
|
||||
case "$words[2]" in
|
||||
-i|--info|-a|--active)
|
||||
_arguments -s $suboptions_args \
|
||||
'*:useflags:_gentoo_packages useflag' && ret=0
|
||||
;;
|
||||
-E|--enable)
|
||||
_arguments \
|
||||
'*:useflags:_gentoo_packages useflag' && ret=0
|
||||
;;
|
||||
-D|--disable)
|
||||
_arguments \
|
||||
'*:active useflags:_gentoo_packages active_useflag' && ret=0
|
||||
esac
|
||||
else
|
||||
_arguments \
|
||||
'*:useflag:_gentoo_packages useflag' && ret=0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_equery () {
|
||||
# Based off of X/_xauth.
|
||||
local state context line expl ret=1
|
||||
local tmp cmd start_args common_args
|
||||
|
||||
start_args=(
|
||||
{'(--nocolor)-C','(-C)--nocolor'}'[turns off colors]'
|
||||
{'(--quiet)-q','(-q)--quiet'}'[minimal output]'
|
||||
{'(--help)-h','(-h)--help'}'[show help]'
|
||||
{'(--version)-V','(-V)--version'}'[show version]'
|
||||
)
|
||||
|
||||
common_args=(
|
||||
'(-i --installed -I --exclude-installed)'{-i,--installed}'[search installed packages]'
|
||||
'(-I --exclude-installed -i --installed)'{-I,--exclude-installed}'[do not search installed packages]'
|
||||
'(-p --portage)'{-p,--portage-tree}'[also search in portage tree]'
|
||||
'(-o --overlay-tree)'{-o,--overlay-tree}'[also search in overlay tree]'
|
||||
)
|
||||
|
||||
|
||||
_arguments -s $start_args \
|
||||
'*::command:->command' && ret=0
|
||||
|
||||
while [[ -n "$state" ]]; do
|
||||
tmp="$state"
|
||||
state=
|
||||
case "$tmp" in
|
||||
command)
|
||||
if (( CURRENT == 1 )); then
|
||||
state=subcommands
|
||||
else
|
||||
cmd="$words[1]"
|
||||
curcontext="${curcontext%:*:*}:equery-${cmd}:"
|
||||
case "$cmd" in
|
||||
belongs|b)
|
||||
_arguments \
|
||||
'(-c --category)'{-c,--category}'[only search in specified category]:category:_gentoo_packages category' \
|
||||
'(-e --earlyout)'{-e,--earlyout}'[stop when first match found]' \
|
||||
'(-f --full-regex)'{-f,--full-regex}'[supplied query is a full regex]:pattern:' \
|
||||
'*:file:_files' && ret=0
|
||||
;;
|
||||
check|k)
|
||||
_arguments \
|
||||
':portage:_packages installed' && ret=0
|
||||
;;
|
||||
depends|d)
|
||||
_arguments \
|
||||
'(-a --all-packages)'{-a,--all-packages}'[search in all available packages (slow)]:all packages:->packages' \
|
||||
'(-d --direct -D --indirect)'{-d,--direct}'[search direct dependencies only (default)]' \
|
||||
'(-d --direct -D --indirect)'{-D,--indirect}'[search indirect dependencies (VERY slow)]' \
|
||||
'*:package:_packages installed' && ret=0
|
||||
;;
|
||||
depgraph|g)
|
||||
_arguments \
|
||||
'(-U --no-useflags)'{-U,--no-useflags}'[do not show USE flags]' \
|
||||
'(-l --linear)'{-l,--linear}'[do not use fancy formatting]' \
|
||||
':package:_packages installed' && ret=0
|
||||
;;
|
||||
files|f)
|
||||
_arguments \
|
||||
'--timestamp[append timestamp]' \
|
||||
'--md5sum[append md5sum]' \
|
||||
'--type[prepend file type]' \
|
||||
'--filter=[filter output]:filter(s):_values -s , '' dir obj sym dev fifo path conf cmd doc man info' \
|
||||
':installed pkgname:_packages installed' && ret=0
|
||||
;;
|
||||
hasuse|h)
|
||||
_arguments \
|
||||
$common_args \
|
||||
':useflag:_gentoo_packages useflag' && ret=0
|
||||
;;
|
||||
list|l)
|
||||
_arguments \
|
||||
$common_args \
|
||||
': :_guard "^--*" pattern' && ret=0
|
||||
;;
|
||||
size|s)
|
||||
_arguments \
|
||||
'(-b --bytes)'{-b,--bytes}'[report size in bytes]' \
|
||||
':package:_packages installed' && ret=0
|
||||
;;
|
||||
which|w)
|
||||
_arguments \
|
||||
':portage:_packages available' && ret=0
|
||||
;;
|
||||
uses|u)
|
||||
_arguments \
|
||||
{--all,-a}'[include non-installed packages]' \
|
||||
":portage:_packages installed" && ret=0
|
||||
;;
|
||||
*)
|
||||
_message 'command not found'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
subcommands)
|
||||
tmp=(
|
||||
{belongs,b}'[list all packages owning file(s)]'
|
||||
{check,k}'[check MD5sums and timestamps of package]'
|
||||
{depends,d}'[list all packages depending on specified package]'
|
||||
{depgraph,g}'[display a dependency tree for package]'
|
||||
{files,f}'[list files owned by package]'
|
||||
{hasuse,h}'[list all packages with specified useflag]'
|
||||
{list,l}'[list all packages matching pattern]'
|
||||
{size,s}'[print size of files contained in package]'
|
||||
{uses,u}'[display USE flags for package]'
|
||||
{which,w}'[print full path to ebuild for package]'
|
||||
)
|
||||
_values 'equery command' $tmp && ret=0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
_eclean_wrapper () {
|
||||
local global_opts pkg_opts dist_opts
|
||||
|
||||
global_opts=(
|
||||
'(-C --nocolor)'{-C,--nocolor}'[turns off colors]'
|
||||
'(-d,--destructive)'{-d,--destructive}'[only keep the minimum for a reinstallation]'
|
||||
'(-e,--exclude-file)'{-e,--exclude-file}'[path to the exclusion file]:filename:_files'
|
||||
'(-i,--interactive)'{-i,--interactive}'[ask confirmation before deletions]'
|
||||
'(-n,--package-names)'{-n,--package-names}'[protect all versions (when --destructive)]'
|
||||
'(-p,--pretend)'{-p,--pretend}'[only display what would be cleaned]'
|
||||
'(-q,--quiet)'{-q,--quiet}'[minimal output]'
|
||||
'(-t,--time-limit)'{-t,--time-limit}'[don’t delete files modified since <time>]:time:_eclean_time'
|
||||
'(: -)'{-h,--help}'[show help]'
|
||||
'(: -)'{-V,--version}'[show version]'
|
||||
)
|
||||
dist_opts=(
|
||||
'(-s,--size-limit)'{-s,--size-limit}'[do not delete disfiles bigger than <size>]:size:_eclean_size'
|
||||
'(-f,--fetch-restricted)'{-f,--fetch-restricted}'[protect fetch-restricted files]'
|
||||
)
|
||||
# XXX: If you add options here make sure that it'll work.
|
||||
# since there isn't any option *right* now, $pkg_opts
|
||||
# is never used.
|
||||
pkg_opts=()
|
||||
|
||||
# check which kind of eclean command we run.
|
||||
case "$words[1]" in
|
||||
eclean-pkg)
|
||||
_arguments -s $global_opts $pkg_opts &&
|
||||
return 0
|
||||
;;
|
||||
eclean-dist)
|
||||
_arguments -s $global_opts $dist_opts &&
|
||||
return 0
|
||||
;;
|
||||
eclean)
|
||||
# eclean. complete only specifics options if an action has been given,
|
||||
# global_opts and packages|distfiles otherwhise.
|
||||
if (( $words[(I)(packages)] )); then
|
||||
# Currently no options so return 0
|
||||
#_values "packages options" $pkg_opts &&
|
||||
return 0
|
||||
elif (( $words[(I)(distfiles)] )); then
|
||||
_values "distfiles options" $dist_opts &&
|
||||
return 0
|
||||
else
|
||||
_arguments -s $global_opts
|
||||
# complete packages|distfiles only if CURRENT-1 don't need an arg
|
||||
if [[ ! $words[CURRENT-1] =~ -(e|-exclude-file|t|-time-limit|s|-size-limit|h|-help|v|-version) ]]; then
|
||||
_values 'eclean command' \
|
||||
'packages[clean outdated binary packages]' \
|
||||
'distfiles[clean outdated packages sources files]' &&
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
_eclean_time () {
|
||||
# adapted from _chmod
|
||||
compset -P '*'
|
||||
suf=( -S '' )
|
||||
_alternative -O suf \
|
||||
'number:number:(0 1 2 3 4 5 6 7 8 9)' \
|
||||
'time_unit:time_unit:((y\:year m\:month w\:week d\:day h\:hour))' &&
|
||||
return 0
|
||||
}
|
||||
_eclean_size () {
|
||||
# adapted from _chmod
|
||||
compset -P '*'
|
||||
suf=( -S '' )
|
||||
_alternative -O suf \
|
||||
'number:number:(0 1 2 3 4 5 6 7 8 9)' \
|
||||
'time_unit:time_unit:((G\:gigabytes M\:megabytes K\:kilobytes B\:bytes))' &&
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
_epkginfo () {
|
||||
if (( CURRENT == 2 )); then
|
||||
_arguments -s '*:package:_gentoo_packages available'
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_genpkgindex () {
|
||||
_arguments -s \
|
||||
'(: -)'{-h,--help}'[Display help and exit]' \
|
||||
'(-h --help -q --quiet -v --verbose)'{-q,--quiet}'[Be quiet]' \
|
||||
'(-h --help -q --quiet -v --verbose)'{-v,--verbose}'[Be verbose]' \
|
||||
'(-h --help -c --compress)'{-c,--compress}'[Compresses the generated metadata with bzip2]' \
|
||||
'(-h --help -P --pkgdir)'{-P,--pkgdir}'[Set the base location of the binary packages (default $PKGDIR)]:file:_files'
|
||||
}
|
||||
|
||||
|
||||
_glsa-check () {
|
||||
local actions
|
||||
|
||||
actions=(-l --list -d --dump --print -t --test -p --pretend -f --fix -i --inject -h --help -V --version -m --mail)
|
||||
|
||||
_arguments -s \
|
||||
"($actions)"{-l,--list}'[list all unapplied GLSA]:glsa_id:_glsa_id' \
|
||||
"($actions)"{-d,--dump,--print}'[show all information about the given GLSA]:glsa_id:_glsa_id' \
|
||||
"($actions)"{-t,--test}'[test if this system is affected by the given GLSA]:glsa_id:_glsa_id' \
|
||||
"($actions)"{-p,--pretend}'[show the necessary commands to apply this GLSA]:glsa_id:_glsa_id' \
|
||||
"($actions)"{-f,--fix}'[try to auto-apply this GLSA (experimental)]:glsa_id:_glsa_id' \
|
||||
"($actions)"{-i,--inject}'[inject the given GLSA into the checkfile]:glsa_id:_glsa_id' \
|
||||
'(-n --nocolor)'{-n,--nocolor}'[disable colors (option)]' \
|
||||
'(: -)'{-h,--help}'[Show help message]' \
|
||||
'(: -)'{-V,--version}'[some information about this tool]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[print more messages (option)]' \
|
||||
'(-c --cve)'{-c,--cve}'[show CAN ids in listing mode (option)]' \
|
||||
"($actions)"{-m,--mail}'[send a mail with the given GLSAs to the administrator]:glsa_id:_glsa_id'
|
||||
}
|
||||
# glsa-list can contain an arbitrary number of GLSA ids,
|
||||
# filenames containing GLSAs or the special identifiers
|
||||
# 'all', 'new' and 'affected'
|
||||
_glsa_id () {
|
||||
# XXX: we'll avoid displaying GLSA ids, because the ratio use/noise
|
||||
# will be low. May be we should display only the X previous GLSA,
|
||||
# or GLSA ids of the X last month.
|
||||
#
|
||||
# start to look at /usr/lib/gentoolkit/pym/glsa.py if GLSA_DIR is still
|
||||
# PORTDIR + "metadata/glsa/"
|
||||
# and then get the list (it's only xml files in GLSA_DIR, easy!)
|
||||
|
||||
compadd 'all' 'new' 'affected'
|
||||
_files
|
||||
}
|
||||
|
||||
|
||||
_revdep-rebuild () {
|
||||
if (( $words[(I)(--)] )); then
|
||||
# here it's no more revdep-rebuild options, but emerge options that are called
|
||||
_arguments -s '*:portage:_portage --emerge $@' && return 0
|
||||
fi
|
||||
|
||||
_arguments -s \
|
||||
'(-C --nocolor)'{-C,--nocolor}'[Turn off colored output]' \
|
||||
'(-d --debug)'{-d,--debug}'[Print way too much information (uses bash set -xv)]' \
|
||||
'(-e --exact)'{-e,--exact}'[Emerge based on exact package version]' \
|
||||
'(: -)'{-h,--help}'[Print help]' \
|
||||
'(-i --ignore)'{-i,--ignore}'[Ignore temporary files from previous runs]' \
|
||||
'(-k --keep-temp)'{-k,--keep-temp}'[Do not delete temporary files on exit]' \
|
||||
'(-L --library)'{-L,--library}'[<NAME> Emerge existing packages that use the library with NAME]:file:_files' \
|
||||
'(-l --no-ld-path)'{-l,--no-ld-path}'[Do not set LD_LIBRARY_PATH]' \
|
||||
'(-o --no-order)'{-o,--no-order}'[Do not check the build order (Saves time, but may cause breakage)]' \
|
||||
'(-p --pretend)'{-p,--pretend}'[Do a trial run without actually emerging anything (also passed to emerge command)]' \
|
||||
'(-P --no-progress)'{-P,--no-progress}'[Turn off the progress meter]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Be less verbose (also passed to emerge command)]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Be more verbose (also passed to emerge command)]' \
|
||||
'(-u --no-util)'{-u,--no-util}'[<UTIL> Do not use features provided by UTIL]:file:_files'
|
||||
# XXX: does someone really use -u|--no-util option?
|
||||
# we can check packages installed (like portage-utils etc) to see
|
||||
# which "UTIL" is avaiable.
|
||||
}
|
||||
|
||||
|
||||
case "$service" in
|
||||
euse)
|
||||
_euse "$@" && return 0
|
||||
;;
|
||||
equery)
|
||||
_equery "$@" && return 0
|
||||
;;
|
||||
eclean*)
|
||||
_eclean_wrapper "$@" && return 0
|
||||
;;
|
||||
epkginfo)
|
||||
_epkginfo "$@" && return 0
|
||||
;;
|
||||
genpkgindex)
|
||||
_genpkgindex "$@" && return 0
|
||||
;;
|
||||
glsa-check)
|
||||
_glsa-check "$@" && return 0
|
||||
;;
|
||||
revdep-rebuild)
|
||||
_revdep-rebuild "$@" && return 0
|
||||
;;
|
||||
esac
|
||||
334
_git-flow
334
_git-flow
|
|
@ -1,334 +0,0 @@
|
|||
#compdef git-flow
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for git-flow (http://github.com/nvie/gitflow).
|
||||
#
|
||||
# Source: https://github.com/bobthecow/git-flow-completion
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Justin Hileman (https://github.com/bobthecow)
|
||||
# * Yusuke Muraoka (https://github.com/jbking)
|
||||
# * Vincent Driessen (https://github.com/nvie)
|
||||
# * Zifei Tong (https://github.com/chevalun)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_git-flow ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'init:Initialize a new git repo with support for the branching model.'
|
||||
'feature:Manage your feature branches.'
|
||||
'release:Manage your release branches.'
|
||||
'hotfix:Manage your hotfix branches.'
|
||||
'support:Manage your support branches.'
|
||||
'version:Shows version information.'
|
||||
)
|
||||
_describe -t commands 'git flow' subcommands
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(init)
|
||||
_arguments \
|
||||
-f'[Force setting of gitflow branches, even if already configured]'
|
||||
;;
|
||||
|
||||
(version)
|
||||
;;
|
||||
|
||||
(hotfix)
|
||||
__git-flow-hotfix
|
||||
;;
|
||||
|
||||
(release)
|
||||
__git-flow-release
|
||||
;;
|
||||
|
||||
(feature)
|
||||
__git-flow-feature
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git-flow-release ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new release branch.'
|
||||
'finish:Finish a release branch.'
|
||||
'list:List all your release branches. (Alias to `git flow release`)'
|
||||
)
|
||||
_describe -t commands 'git flow release' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
(finish)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]' \
|
||||
-s'[Sign the release tag cryptographically]'\
|
||||
-u'[Use the given GPG-key for the digital signature (implies -s)]'\
|
||||
-m'[Use the given tag message]'\
|
||||
-p'[Push to $ORIGIN after performing finish]'\
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git-flow-hotfix ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new hotfix branch.'
|
||||
'finish:Finish a hotfix branch.'
|
||||
'list:List all your hotfix branches. (Alias to `git flow hotfix`)'
|
||||
)
|
||||
_describe -t commands 'git flow hotfix' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':hotfix:__git_flow_version_list'\
|
||||
':branch-name:__git_branch_names'
|
||||
;;
|
||||
|
||||
(finish)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]' \
|
||||
-s'[Sign the release tag cryptographically]'\
|
||||
-u'[Use the given GPG-key for the digital signature (implies -s)]'\
|
||||
-m'[Use the given tag message]'\
|
||||
-p'[Push to $ORIGIN after performing finish]'\
|
||||
':hotfix:__git_flow_hotfix_list'
|
||||
;;
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git-flow-feature ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new feature branch.'
|
||||
'finish:Finish a feature branch.'
|
||||
'list:List all your feature branches. (Alias to `git flow feature`)'
|
||||
'publish: public'
|
||||
'track: track'
|
||||
'diff: diff'
|
||||
'rebase: rebase'
|
||||
'checkout: checkout'
|
||||
'pull: pull'
|
||||
)
|
||||
_describe -t commands 'git flow feature' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':feature:__git_flow_feature_list'\
|
||||
':branch-name:__git_branch_names'
|
||||
;;
|
||||
|
||||
(finish)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]' \
|
||||
-r'[Rebase instead of merge]'\
|
||||
':feature:__git_flow_feature_list'
|
||||
;;
|
||||
|
||||
(publish)
|
||||
_arguments \
|
||||
':feature:__git_flow_feature_list'\
|
||||
;;
|
||||
|
||||
(track)
|
||||
_arguments \
|
||||
':feature:__git_flow_feature_list'\
|
||||
;;
|
||||
|
||||
(diff)
|
||||
_arguments \
|
||||
':branch:__git_branch_names'\
|
||||
;;
|
||||
|
||||
(rebase)
|
||||
_arguments \
|
||||
-i'[Do an interactive rebase]' \
|
||||
':branch:__git_branch_names'
|
||||
;;
|
||||
|
||||
(checkout)
|
||||
_arguments \
|
||||
':branch:__git_flow_feature_list'\
|
||||
;;
|
||||
|
||||
(pull)
|
||||
_arguments \
|
||||
':remote:__git_remotes'\
|
||||
':branch:__git_branch_names'
|
||||
;;
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git_flow_version_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a versions
|
||||
|
||||
versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted versions expl 'version' compadd $versions
|
||||
}
|
||||
|
||||
__git_flow_feature_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a features
|
||||
|
||||
features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted features expl 'feature' compadd $features
|
||||
}
|
||||
|
||||
__git_remotes () {
|
||||
local expl gitdir remotes
|
||||
|
||||
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
|
||||
__git_command_successful || return
|
||||
|
||||
remotes=(${${(f)"$(_call_program remotes git config --get-regexp '"^remote\..*\.url$"')"}//#(#b)remote.(*).url */$match[1]})
|
||||
__git_command_successful || return
|
||||
|
||||
# TODO: Should combine the two instead of either or.
|
||||
if (( $#remotes > 0 )); then
|
||||
_wanted remotes expl remote compadd $* - $remotes
|
||||
else
|
||||
_wanted remotes expl remote _files $* - -W "($gitdir/remotes)" -g "$gitdir/remotes/*"
|
||||
fi
|
||||
}
|
||||
|
||||
__git_flow_hotfix_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a hotfixes
|
||||
|
||||
hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted hotfixes expl 'hotfix' compadd $hotfixes
|
||||
}
|
||||
|
||||
__git_branch_names () {
|
||||
local expl
|
||||
declare -a branch_names
|
||||
|
||||
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted branch-names expl branch-name compadd $* - $branch_names
|
||||
}
|
||||
|
||||
__git_command_successful () {
|
||||
if (( ${#pipestatus:#0} > 0 )); then
|
||||
_message 'not a git repository'
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
_git-flow "$@"
|
||||
103
_git-pulls
103
_git-pulls
|
|
@ -1,103 +0,0 @@
|
|||
#compdef git-pulls
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for git-pulls 0.3.1 (https://git-pulls.com/schacon/git-pulls).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud (https://github.com/nicoulaj)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
_git-pulls() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)--help[show usage]' \
|
||||
'1:cmd:->cmds' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(cmds)
|
||||
local commands; commands=(
|
||||
'update:update pull requests list'
|
||||
'list:list pull requests'
|
||||
'show:show pull request'
|
||||
'browse:open pull request in a web browser'
|
||||
'merge:merge pull request'
|
||||
)
|
||||
_describe -t commands 'command' commands && ret=0
|
||||
;;
|
||||
(args)
|
||||
curcontext="${curcontext%:*:*}:git-pulls-cmd-$words[1]:"
|
||||
case $words[1] in
|
||||
(update)
|
||||
_message 'no more arguments' && ret=0
|
||||
;;
|
||||
(list)
|
||||
_arguments \
|
||||
'--reverse[list in reverse order]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(show)
|
||||
_arguments \
|
||||
'1: :_git-pulls_pull_requests_numbers' \
|
||||
'--full[use verbose output]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(browse|merge)
|
||||
_arguments \
|
||||
'1: :_git-pulls_pull_requests_numbers' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_git-pulls_pull_requests_numbers] )) ||
|
||||
_git-pulls_pull_requests_numbers() {
|
||||
local pull_requests; pull_requests=(${${${(M)${(f)"$(_call_program users $service list)"}:#[[:digit:]]##[[:space:]]*}//:/\\:}/[[:space:]]##/:})
|
||||
_describe -t pull-request-numbers 'pull request number' pull_requests "$@"
|
||||
}
|
||||
|
||||
_git-pulls "$@"
|
||||
267
_github
267
_github
|
|
@ -1,267 +0,0 @@
|
|||
#compdef github gh
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Github gem 0.6.2 (https://github.com/defunkt/github-gem).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud (https://github.com/nicoulaj)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
_github() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1:cmd:->cmds' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(cmds)
|
||||
local commands; commands=(
|
||||
'admin:open this repo'\''s Admin panel a web browser'
|
||||
'browse:open this repo in a web browser'
|
||||
'clone:clone a repo'
|
||||
'config:automatically set configuration info, or pass args to specify'
|
||||
'create:create a new, empty GitHub repository'
|
||||
'create-from-local:create a new GitHub repository from the current local repository'
|
||||
'fetch:fetch from a remote to a local branch'
|
||||
'fetch_all:fetch all refs from a user'
|
||||
'fork:forks a GitHub repository'
|
||||
'home:open this repo'\''s master branch in a web browser'
|
||||
'ignore:ignore a SHA'
|
||||
'info:info about this project'
|
||||
'issues:project issues tools'
|
||||
'network:project network tools'
|
||||
'open:open the given user/project in a web browser'
|
||||
'pull:pull from a remote'
|
||||
'pull-request:generate the text for a pull request'
|
||||
'search:search GitHub for the given repository name'
|
||||
'track:track another user'\''s repository'
|
||||
)
|
||||
_describe -t commands 'command' commands && ret=0
|
||||
;;
|
||||
(args)
|
||||
curcontext="${curcontext%:*:*}:github-cmd-$words[1]:"
|
||||
case $words[1] in
|
||||
(admin|fetch|fetch_all|home|info)
|
||||
_message 'no more arguments' && ret=0
|
||||
;;
|
||||
(browse)
|
||||
_arguments \
|
||||
'1: :_github_users' \
|
||||
'2: :_github_branches' \
|
||||
&& ret=0
|
||||
;;
|
||||
(clone)
|
||||
_arguments \
|
||||
'1: :_github_users' \
|
||||
'2: :_github_repos' \
|
||||
'3: :_files -/' \
|
||||
'--search[search for user or repo and clone selected repository]:user or repo' \
|
||||
'--ssh[clone using the git@github.com style url]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(config)
|
||||
_arguments \
|
||||
'1: :_github_users' \
|
||||
'2: :_github_repos' \
|
||||
&& ret=0
|
||||
;;
|
||||
(create)
|
||||
_arguments \
|
||||
'1:repo name' \
|
||||
'--markdown[create README.markdown]' \
|
||||
'--mdown[create README.mdown]' \
|
||||
'--private[create private repository]' \
|
||||
'--rdoc[create README.rdoc]' \
|
||||
'--rst[create README.rst]' \
|
||||
'--textile[create README.textile]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(create-from-local)
|
||||
_arguments \
|
||||
'--private[create private repository]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(fork)
|
||||
_arguments \
|
||||
'1: :_github_user_slash_repos' \
|
||||
&& ret=0
|
||||
;;
|
||||
(ignore)
|
||||
_arguments \
|
||||
'1: :_github_network_commits' \
|
||||
&& ret=0
|
||||
;;
|
||||
(issues)
|
||||
_arguments -C \
|
||||
'1:issue-status:->issue-statuses' \
|
||||
'2:: :_github_users' \
|
||||
'--after[only show issues updated after a certain date]:date' \
|
||||
'--label[only show issues with a certain label]:label' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(issue-statuses)
|
||||
local statuses; statuses=(
|
||||
'open:show open issues'
|
||||
'closed:show closed issues'
|
||||
)
|
||||
_describe -t statuses 'status' statuses && ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(network)
|
||||
_arguments -C \
|
||||
'1:network-subcommand:->network-subcommands' \
|
||||
'*::network-arg:->network-args' \
|
||||
'(--after)--before[only show commits before a certain date]:date' \
|
||||
'(--before)--after[only show commits after a certain date]:date' \
|
||||
'--applies[filter commits to patches that apply cleanly]' \
|
||||
'--author[filter commits on a email address of author]:author' \
|
||||
'--cache[use the network data even if it'\''s expired]' \
|
||||
'--common[show common branch point]' \
|
||||
'--limit[only look through the first X heads - useful for really large projects]:number' \
|
||||
'--noapply[filter commits to patches that do not apply cleanly]' \
|
||||
'--nocache[do not use the cached network data]' \
|
||||
'--project[filter commits on a certain project]:project' \
|
||||
'--shas[only show shas]' \
|
||||
'--sort[how to sort : date, branch, author]:sort type:((date\:sort\ by\ date\ \(default\) branch\:sort\ by\ branch author\:sort\ by\ author))' \
|
||||
'--thisbranch[look at branches that match the current one]' \
|
||||
&& ret=0
|
||||
case "$state" in
|
||||
(network-subcommands)
|
||||
local subcommands; subcommands=(
|
||||
'web:open network in a web browser'
|
||||
'list:list network members'
|
||||
'fetch:fetch network members commits'
|
||||
'commits:list network members commits'
|
||||
)
|
||||
_describe -t subcommands 'subcommand' subcommands && ret=0
|
||||
;;
|
||||
(network-args)
|
||||
case $words[1] in
|
||||
(web)
|
||||
_arguments \
|
||||
'1: :_github_users' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(open)
|
||||
_arguments \
|
||||
'1: :_github_user_slash_repos' \
|
||||
&& ret=0
|
||||
;;
|
||||
(pull)
|
||||
_arguments \
|
||||
'1: :_github_users' \
|
||||
'2: :_github_branches' \
|
||||
'--merge[automatically merge remote'\''s changes into your master]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(pull-request)
|
||||
_arguments \
|
||||
'1: :_github_users' \
|
||||
'2: :_github_branches' \
|
||||
&& ret=0
|
||||
;;
|
||||
(search)
|
||||
_arguments \
|
||||
'1:query' \
|
||||
&& ret=0
|
||||
;;
|
||||
(track)
|
||||
_arguments \
|
||||
'1:: :((remote))' \
|
||||
'*: :_github_user_slash_repos' \
|
||||
{--private,--ssh}'[use git@github.com: instead of git://github.com/]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_github_users] )) ||
|
||||
_github_users() {
|
||||
_alternative \
|
||||
'users:user:_users' \
|
||||
'github-network-users:github network user:_github_network_users'
|
||||
}
|
||||
|
||||
(( $+functions[_github_network_users] )) ||
|
||||
_github_network_users() {
|
||||
local users; users=(${(f)"$(_call_program users $service network list 2>/dev/null)"})
|
||||
_describe -t github-network-users 'github network user' users "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_github_repos] )) ||
|
||||
_github_repos() {
|
||||
_message -e repos 'repo'
|
||||
}
|
||||
|
||||
(( $+functions[_github_branches] )) ||
|
||||
_github_branches() {
|
||||
_message -e branches 'branch'
|
||||
}
|
||||
|
||||
(( $+functions[_github_user_slash_repos] )) ||
|
||||
_github_user_slash_repos() {
|
||||
local ret=1
|
||||
if compset -P '*/'; then
|
||||
_wanted repos expl 'repo' _github_repos && ret=0
|
||||
else
|
||||
_wanted users expl 'user' _github_users -qS/ && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_github_network_commits] )) ||
|
||||
_github_network_commits() {
|
||||
local commits; commits=(${${(f)"$(_call_program commits $service network commits 2>/dev/null)"}%%[[:blank:]]*})
|
||||
_describe -t commits 'commit' commits "$@"
|
||||
}
|
||||
|
||||
_github "$@"
|
||||
127
_gradle
127
_gradle
|
|
@ -1,127 +0,0 @@
|
|||
#compdef gradle gradlew
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Gradle 1.0-milestone-5 (http://www.gradle.org).
|
||||
#
|
||||
# Status: incomplete (see TODO/FIXME tags)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
|
||||
_gradle() {
|
||||
local curcontext="$curcontext"
|
||||
|
||||
_arguments \
|
||||
'(- 1 *)'{-?,-h,--help}'[show help message]' \
|
||||
'(-a --no-rebuild)'{-a,--no-rebuild}'[do not rebuild project dependencies]' \
|
||||
'(-b --build-file)'{-b,--build-file}'[specify the build file]:build file:_gradle_scripts' \
|
||||
'(-C --cache)'{-C,--cache}'[specify how compiled build scripts should be cached]:cache strategy:((rebuild\:rebuild\ the\ cache on\:use\ the\ cache\ \(default\)))' \
|
||||
'(-c --settings-file)'{-c,--settings-file}'[speciy the settings file]:settings file:_gradle_scripts' \
|
||||
'*'{-D-,--system-prop}'[set system property of the JVM]:property:_gradle_properties' \
|
||||
'(-d --debug -q --quiet -i --info)'{-d,--debug}'[log in debug mode (includes normal stacktrace)]' \
|
||||
'(--foreground --no-daemon --stop)--daemon[use the Gradle daemon to run the build, starts the daemon if not running]' \
|
||||
'(-e --embedded)'{-e,--embedded}'[specify an embedded build script]:embedded build script' \
|
||||
'(--daemon --no-daemon --stop)--foreground[start the Gradle daemon in the foreground]' \
|
||||
'(-g --gradle-user-home)'{-g,--gradle-user-home}'[specify the gradle user home directory]: :_files -/' \
|
||||
'--gui[launch a GUI application]' \
|
||||
'(-I --init-script)'{-I,--init-script}'[specify an initialization script]:init script:_gradle_scripts' \
|
||||
'(-i --info -q --quiet -d --debug)'{-i,--info}'[set log level to info]' \
|
||||
'(-m --dry-run)'{-m,--dry-run}'[run the builds with all task actions disabled]' \
|
||||
'(-n --dependencies)'{-n,--dependencies}'[show list of all project dependencies]' \
|
||||
'--no-color[do not use color in the console output]' \
|
||||
'(--daemon --foreground --stop)--no-daemon[do not use the Gradle daemon to run the build]' \
|
||||
'--no-opt[ignore any task optimization]' \
|
||||
'*'{-P-,--project-prop}'[set project property for the build script]:property:_gradle_properties' \
|
||||
'(-p --project-dir)'{-p,--project-dir}'[specify the start directory for Gradle]: :_files -/' \
|
||||
'--profile[profile build execution time and generate a report in the <build_dir>/reports/profile directory]' \
|
||||
'(-q --quiet -d --debug -i --info)'{-q,--quiet}'[log errors only]' \
|
||||
'(-r --properties)'{-r,--properties}'[show list of all available project properties]' \
|
||||
'(-S --full-stacktrace)'{-S,--full-stacktrace}'[print out the full (very verbose) stacktrace for any exceptions]' \
|
||||
'(-s --stacktrace)'{-s,--stacktrace}'[print out the stacktrace also for user exceptions]' \
|
||||
'(--daemon --foreground)--stop[stop the Gradle daemon if it is running]' \
|
||||
'(-t --tasks)'{-t,--tasks}'[show list of available tasks]' \
|
||||
'(-u --no-search-upward)'{-u,--no-search-upward}'[don'\''t search in parent folders for a settings.gradle file]' \
|
||||
'(-v --version)'{-v,--version}'[print version info]' \
|
||||
'(-x --exclude-task)*'{-x,--exclude-task}'[specify a task to be excluded from execution]:task:_gradle_tasks' \
|
||||
'*: :_gradle_tasks'
|
||||
}
|
||||
|
||||
(( $+functions[_gradle_tasks] )) ||
|
||||
_gradle_tasks() {
|
||||
local alternatives task_group task_group_name task_group_tasks
|
||||
for task_group in ${(M)${(ps:\n\n:)"$($service --daemon --quiet --no-color :tasks 2>/dev/null)"}:#*[[:space:]]\-[[:space:]]*}; do
|
||||
task_group_name="${${${task_group%%---*}%[[:space:]]tasks[[:space:]]*}:l}"
|
||||
task_group_tasks=(${(q)${(f)${task_group##*---}}/[[:space:]]\-[[:space:]]/:})
|
||||
alternatives+=("${task_group_name//[[:space:]]/-}-task:${task_group_name} task:((${task_group_tasks[@]}))")
|
||||
done
|
||||
_alternative "${alternatives[@]}"
|
||||
}
|
||||
|
||||
(( $+functions[_gradle_projects] )) ||
|
||||
_gradle_projects() {
|
||||
local projects; projects=(${${${(M)${(f)"$($service --daemon --quiet --no-color :projects 2>/dev/null)"}:#*--- Project\ \':*}#*\'}%\'*})
|
||||
_multi_parts $@ : projects
|
||||
}
|
||||
|
||||
(( $+functions[_gradle_scripts] )) ||
|
||||
_gradle_scripts() {
|
||||
_files -g '*.gradle*'
|
||||
}
|
||||
|
||||
(( $+functions[_gradle_properties] )) ||
|
||||
_gradle_properties() {
|
||||
local ret=1
|
||||
if compset -P '*='; then
|
||||
_message -e property-values 'property value' && ret=0
|
||||
else
|
||||
_wanted property-names expl 'property name' _gradle_property_names -qS= && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_gradle_property_names] )) ||
|
||||
_gradle_property_names() {
|
||||
local property_names; property_names=(${${(M)${(f)"$($service --daemon --quiet --no-color :properties 2>/dev/null)"}:#*:*}%%:*})
|
||||
_describe -t property_names 'property name' property_names "$@"
|
||||
}
|
||||
|
||||
_gradle "$@"
|
||||
169
_heroku
169
_heroku
|
|
@ -1,169 +0,0 @@
|
|||
#compdef heroku
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for the Heroku client gem (https://github.com/heroku/heroku)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Ali B. (http://awhitebox.com)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
"account\:confirm_billing":"Confirm that your account can be billed at the end of the month"
|
||||
"addons":"list installed addons"
|
||||
"addons\:list":"list all available addons"
|
||||
"addons\:add":"install an addon"
|
||||
"addons\:upgrade":"upgrade an existing addon"
|
||||
"addons\:downgrade":"downgrade an existing addon"
|
||||
"addons\:remove":"uninstall an addon"
|
||||
"addons\:open":"open an addon's dashboard in your browser"
|
||||
"apps":"list your apps"
|
||||
"apps\:info":"show detailed app information"
|
||||
"apps\:create":"create a new app"
|
||||
"apps\:rename":"rename the app"
|
||||
"apps\:open":"open the app in a web browser"
|
||||
"apps\:destroy":"permanently destroy an app"
|
||||
"auth\:login":"log in with your heroku credentials"
|
||||
"auth\:logout":"clear local authentication credentials"
|
||||
"config":"display the config vars for an app"
|
||||
"config\:add":"add one or more config vars"
|
||||
"config\:remove":"remove a config var"
|
||||
"db\:push":"push local data up to your app"
|
||||
"db\:pull":"pull heroku data down into your local database"
|
||||
"domains":"list custom domains for an app"
|
||||
"domains\:add":"add a custom domain to an app"
|
||||
"domains\:remove":"remove a custom domain from an app"
|
||||
"domains\:clear":"remove all custom domains from an app"
|
||||
"help":"list available commands or display help for a specific command"
|
||||
"keys":"display keys for the current user"
|
||||
"keys\:add":"add a key for the current user"
|
||||
"keys\:remove":"remove a key from the current user"
|
||||
"keys\:clear":"remove all authentication keys from the current user"
|
||||
"logs":"display recent log output"
|
||||
"logs\:cron":"DEPRECATED: display cron logs from legacy logging"
|
||||
"logs\:drains":"manage syslog drains"
|
||||
"maintenance\:on":"put the app into maintenance mode"
|
||||
"maintenance\:off":"take the app out of maintenance mode"
|
||||
"pg\:info":"display database information"
|
||||
"pg\:ingress":"allow direct connections to the database from this IP for one minute"
|
||||
"pg\:promote":"sets DATABASE as your DATABASE_URL"
|
||||
"pg\:psql":"open a psql shell to the database"
|
||||
"pg\:reset":"delete all data in DATABASE"
|
||||
"pg\:unfollow":"stop a replica from following and make it a read/write database"
|
||||
"pg\:wait":"monitor database creation, exit when complete"
|
||||
"pgbackups":"list captured backups"
|
||||
"pgbackups\:url":"get a temporary URL for a backup"
|
||||
"pgbackups\:capture":"capture a backup from a database id"
|
||||
"pgbackups\:restore":"restore a backup to a database"
|
||||
"pgbackups\:destroy":"destroys a backup"
|
||||
"plugins":"list installed plugins"
|
||||
"plugins\:install":"install a plugin"
|
||||
"plugins\:uninstall":"uninstall a plugin"
|
||||
"ps\:dynos":"scale to QTY web processes"
|
||||
"ps\:workers":"scale to QTY background processes"
|
||||
"ps":"list processes for an app"
|
||||
"ps\:restart":"restart an app process"
|
||||
"ps\:scale":"scale processes by the given amount"
|
||||
"releases":"list releases"
|
||||
"releases\:info":"view detailed information for a release"
|
||||
"rollback":"roll back to an older release"
|
||||
"run":"run an attached process"
|
||||
"run\:rake":"remotely execute a rake command"
|
||||
"run\:console":"open a remote console session"
|
||||
"sharing":"list collaborators on an app"
|
||||
"sharing\:add":"add a collaborator to an app"
|
||||
"sharing\:remove":"remove a collaborator from an app"
|
||||
"sharing\:transfer":"transfer an app to a new owner"
|
||||
"ssl":"list certificates for an app"
|
||||
"ssl\:add":"add an ssl certificate to an app"
|
||||
"ssl\:remove":"remove an ssl certificate from an app"
|
||||
"ssl\:clear":"remove all ssl certificates from an app"
|
||||
"stack":"show the list of available stacks"
|
||||
"stack\:migrate":"prepare migration of this app to a new stack"
|
||||
"version":"show heroku client version"
|
||||
)
|
||||
|
||||
_arguments '*:: :->command'
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "heroku command" _1st_arguments
|
||||
return
|
||||
fi
|
||||
|
||||
local -a _command_args
|
||||
case "$words[1]" in
|
||||
apps:info)
|
||||
_command_args=(
|
||||
'(-r|--raw)'{-r,--raw}'[output info as raw key/value pairs]' \
|
||||
)
|
||||
;;
|
||||
apps:create)
|
||||
_command_args=(
|
||||
'(-a|--addons)'{-a,--addons}'[a list of addons to install]' \
|
||||
'(-r|--remote)'{-r,--remote}'[the git remote to create, default "heroku"]' \
|
||||
'(-s|--stack)'{-s,--stack}'[the stack on which to create the app]' \
|
||||
)
|
||||
;;
|
||||
config)
|
||||
_command_args=(
|
||||
'(-s|--shell)'{-s,--shell}'[output config vars in shell format]' \
|
||||
)
|
||||
;;
|
||||
db:push)
|
||||
_command_args=(
|
||||
'(-c|--chunksize)'{-c,--chunksize}'[specify the number of rows to send in each batch]' \
|
||||
'(-d|--debug)'{-d,--debug}'[enable debugging output]' \
|
||||
'(-e|--exclude)'{-e,--exclude}'[exclude the specified tables from the push]' \
|
||||
'(-f|--filter)'{-f,--filter}'[only push certain tables]' \
|
||||
'(-r|--resume)'{-r,--resume}'[resume transfer described by a .dat file]' \
|
||||
'(-t|--tables)'{-t,--tables}'[only push the specified tables]' \
|
||||
)
|
||||
;;
|
||||
db:pull)
|
||||
_command_args=(
|
||||
'(-c|--chunksize)'{-c,--chunksize}'[specify the number of rows to send in each batch]' \
|
||||
'(-d|--debug)'{-d,--debug}'[enable debugging output]' \
|
||||
'(-e|--exclude)'{-e,--exclude}'[exclude the specified tables from the pull]' \
|
||||
'(-f|--filter)'{-f,--filter}'[only pull certain tables]' \
|
||||
'(-r|--resume)'{-r,--resume}'[resume transfer described by a .dat file]' \
|
||||
'(-t|--tables)'{-t,--tables}'[only pull the specified tables]' \
|
||||
)
|
||||
;;
|
||||
keys)
|
||||
_command_args=(
|
||||
'(-l|--long)'{-l,--long}'[display extended information for each key]' \
|
||||
)
|
||||
;;
|
||||
logs)
|
||||
_command_args=(
|
||||
'(-n|--num)'{-n,--num}'[the number of lines to display]' \
|
||||
'(-p|--ps)'{-p,--ps}'[only display logs from the given process]' \
|
||||
'(-s|--source)'{-s,--source}'[only display logs from the given source]' \
|
||||
'(-t|--tail)'{-t,--tail}'[continually stream logs]' \
|
||||
)
|
||||
;;
|
||||
pgbackups:capture)
|
||||
_command_args=(
|
||||
'(-e|--expire)'{-e,--expire}'[if no slots are available to capture, delete the oldest backup to make room]' \
|
||||
)
|
||||
;;
|
||||
stack)
|
||||
_command_args=(
|
||||
'(-a|--all)'{-a,--all}'[include deprecated stacks]' \
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments \
|
||||
$_command_args \
|
||||
'(--app)--app[the app name]' \
|
||||
&& return 0
|
||||
193
_knife
193
_knife
|
|
@ -1,193 +0,0 @@
|
|||
#compdef knife
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Chef's knife (http://www.opscode.com/chef).
|
||||
#
|
||||
# Source: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/knife
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Frank Louwers (https://github.com/franklouwers)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# These flags should be available everywhere according to man knife
|
||||
knife_general_flags=( --help --server-url --key --config --editor --format --log_level --logfile --no-editor --user --print-after --version --yes )
|
||||
|
||||
# knife has a very special syntax, some example calls are:
|
||||
# knife status
|
||||
# knife cookbook list
|
||||
# knife role show ROLENAME
|
||||
# knife data bag show DATABAGNAME
|
||||
# knife role show ROLENAME --attribute ATTRIBUTENAME
|
||||
# knife cookbook show COOKBOOKNAME COOKBOOKVERSION recipes
|
||||
|
||||
# The -Q switch in compadd allow for completions of things like "data bag" without having to go through two rounds of completion and avoids zsh inserting a \ for escaping spaces
|
||||
_knife() {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
cloudproviders=(bluebox ec2 rackspace slicehost terremark)
|
||||
_arguments \
|
||||
'1: :->knifecmd'\
|
||||
'2: :->knifesubcmd'\
|
||||
'3: :->knifesubcmd2' \
|
||||
'4: :->knifesubcmd3' \
|
||||
'5: :->knifesubcmd4' \
|
||||
'6: :->knifesubcmd5'
|
||||
|
||||
case $state in
|
||||
knifecmd)
|
||||
compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" exec index node recipe role search ssh status windows $cloudproviders
|
||||
;;
|
||||
knifesubcmd)
|
||||
case $words[2] in
|
||||
(bluebox|ec2|rackspace|slicehost|terremark)
|
||||
compadd "$@" server images
|
||||
;;
|
||||
client)
|
||||
compadd -Q "$@" "bulk delete" list create show delete edit reregister
|
||||
;;
|
||||
configure)
|
||||
compadd "$@" client
|
||||
;;
|
||||
cookbook)
|
||||
compadd -Q "$@" test list create download delete "metadata from" show "bulk delete" metadata upload
|
||||
;;
|
||||
node)
|
||||
compadd -Q "$@" "from file" create show edit delete list run_list "bulk delete"
|
||||
;;
|
||||
recipe)
|
||||
compadd "$@" list
|
||||
;;
|
||||
role)
|
||||
compadd -Q "$@" "bulk delete" create delete edit "from file" list show
|
||||
;;
|
||||
windows)
|
||||
compadd "$@" bootstrap
|
||||
;;
|
||||
*)
|
||||
_arguments '2:Subsubcommands:($(_knife_options1))'
|
||||
esac
|
||||
;;
|
||||
knifesubcmd2)
|
||||
case $words[3] in
|
||||
server)
|
||||
compadd "$@" list create delete
|
||||
;;
|
||||
images)
|
||||
compadd "$@" list
|
||||
;;
|
||||
site)
|
||||
compadd "$@" vendor show share search download list unshare
|
||||
;;
|
||||
(show|delete|edit)
|
||||
_arguments '3:Subsubcommands:($(_chef_$words[2]s_remote))'
|
||||
;;
|
||||
(upload|test)
|
||||
_arguments '3:Subsubcommands:($(_chef_$words[2]s_local) --all)'
|
||||
;;
|
||||
list)
|
||||
compadd -a "$@" knife_general_flags
|
||||
;;
|
||||
bag)
|
||||
compadd -Q "$@" show edit list "from file" create delete
|
||||
;;
|
||||
*)
|
||||
_arguments '3:Subsubcommands:($(_knife_options2))'
|
||||
esac
|
||||
;;
|
||||
knifesubcmd3)
|
||||
case $words[3] in
|
||||
show)
|
||||
case $words[2] in
|
||||
cookbook)
|
||||
versioncomp=1
|
||||
_arguments '4:Cookbookversions:($(_cookbook_versions) latest)'
|
||||
;;
|
||||
(node|client|role)
|
||||
compadd "$@" --attribute
|
||||
esac
|
||||
esac
|
||||
case $words[4] in
|
||||
(show|edit)
|
||||
_arguments '4:Subsubsubcommands:($(_chef_$words[2]_$words[3]s_remote))'
|
||||
;;
|
||||
file)
|
||||
_arguments '*:file or directory:_files -g "*.(rb|json)"'
|
||||
;;
|
||||
list)
|
||||
compadd -a "$@" knife_general_flags
|
||||
;;
|
||||
*)
|
||||
_arguments '*:Subsubcommands:($(_knife_options3))'
|
||||
esac
|
||||
;;
|
||||
knifesubcmd4)
|
||||
if (( versioncomp > 0 )); then
|
||||
compadd "$@" attributes definitions files libraries providers recipes resources templates
|
||||
else
|
||||
_arguments '*:Subsubcommands:($(_knife_options2))'
|
||||
fi
|
||||
;;
|
||||
knifesubcmd5)
|
||||
_arguments '*:Subsubcommands:($(_knife_options3))'
|
||||
esac
|
||||
}
|
||||
|
||||
# Helper functions to provide the argument completion for several depths of commands
|
||||
_knife_options1() {
|
||||
( for line in $( knife $words[2] --help | grep -v "^knife" ); do echo $line | grep "\-\-"; done )
|
||||
}
|
||||
|
||||
_knife_options2() {
|
||||
( for line in $( knife $words[2] $words[3] --help | grep -v "^knife" ); do echo $line | grep "\-\-"; done )
|
||||
}
|
||||
|
||||
_knife_options3() {
|
||||
( for line in $( knife $words[2] $words[3] $words[4] --help | grep -v "^knife" ); do echo $line | grep "\-\-"; done )
|
||||
}
|
||||
|
||||
# The chef_x_remote functions use knife to get a list of objects of type x on the server
|
||||
_chef_roles_remote() {
|
||||
(knife role list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
|
||||
}
|
||||
|
||||
_chef_clients_remote() {
|
||||
(knife client list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
|
||||
}
|
||||
|
||||
_chef_nodes_remote() {
|
||||
(knife node list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
|
||||
}
|
||||
|
||||
_chef_cookbooks_remote() {
|
||||
(knife cookbook list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
|
||||
}
|
||||
|
||||
_chef_sitecookbooks_remote() {
|
||||
(knife cookbook site list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
|
||||
}
|
||||
|
||||
_chef_data_bags_remote() {
|
||||
(knife data bag list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
|
||||
}
|
||||
|
||||
# The chef_x_local functions use the knife config to find the paths of relevant objects x to be uploaded to the server
|
||||
_chef_cookbooks_local() {
|
||||
(for i in $( grep cookbook_path $HOME/.chef/knife.rb | awk 'BEGIN {FS = "[" }; {print $2}' | sed 's/\,//g' | sed "s/'//g" | sed 's/\(.*\)]/\1/' ); do ls $i; done)
|
||||
}
|
||||
|
||||
# This function extracts the available cookbook versions on the chef server
|
||||
_cookbook_versions() {
|
||||
(knife cookbook show $words[4] | grep -v $words[4] | grep -v -E '\]|\[|\{|\}' | sed 's/ //g' | sed 's/"//g')
|
||||
}
|
||||
|
||||
_knife "$@"
|
||||
98
_layman
98
_layman
|
|
@ -1,98 +0,0 @@
|
|||
#compdef layman
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for LayMan (Gentoo overLAYs (repositories) MANager).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#<app-portage/layman-1.1.1>
|
||||
#
|
||||
|
||||
local arguments actions_args actions global_opts add_actions
|
||||
_layman_remote_overlays() {
|
||||
local layman_list_overlays
|
||||
layman_list_overlays=(${(S)${${(f)"$(layman -k -N -L 2>/dev/null)"}//\[*}#\* })
|
||||
compadd "$@" ${(kv)=layman_list_overlays} "ALL"
|
||||
}
|
||||
_layman_local_overlays() {
|
||||
local layman_list_overlays
|
||||
layman_list_overlays=(${(S)${${(f)"$(layman -N -l)"}//\[*}#\* })
|
||||
compadd "$@" ${(kv)=layman_list_overlays} "ALL"
|
||||
}
|
||||
actions=(
|
||||
--delete -d
|
||||
--sync -s
|
||||
--info -i
|
||||
--sync-all -S
|
||||
--list -L
|
||||
--list-local -l
|
||||
--fetch -f
|
||||
)
|
||||
|
||||
global_opts=(
|
||||
'(--config -c)'{-c,--config}'[Select an alternative configuration file]:configuration file:_files'
|
||||
'(--overlays -o)'{-o,--overlays}'[Specifies the location of additional overlay lists]:overlay url:_urls'
|
||||
'(--nofetch -n)'{-n,--nofetch}'[Prevents from automatically fetching the remote lists of overlays]'
|
||||
'(--nocheck -k)'{-k,--nocheck}'[Prevents from checking the remote lists of overlays for complete overlay definitions]'
|
||||
'(--quiet -q)'{-q,--quiet}'[Makes layman completely quiet]'
|
||||
'(--verbose -v)'{-v,--verbose}'[Verbose output]'
|
||||
'(--quietness -Q)'{-Q,--quietness}'[Makes layman less verbose]:level:({0..4})'
|
||||
'(--nocolor -N)'{-N,--nocolor}'[Remove color codes from the output]'
|
||||
)
|
||||
add_actions=(
|
||||
-p --priority
|
||||
--add -a
|
||||
)
|
||||
actions_args=(
|
||||
"($actions --add -a)"{--add,-a}'[Add the given overlay to your installed overlays]:overlay:_layman_remote_overlays'
|
||||
"($actions --priority -p)"{--priority,-p}'[It will modify the priority of the added overlay]:priority:({0..100})'
|
||||
"($actions $add_actions)"{--delete,-d}'[Delete the given overlay from your installed overlays]:overlay:_layman_local_overlays'
|
||||
"($actions $add_actions)"{--sync,-s}'[Update the specified overlay]:overlat:_layman_local_overlays'
|
||||
"($actions $add_actions)"{--info,-i}'[Display all available information about the specified overlay]:overlay:_layman_remote_overlays'
|
||||
"($actions $add_actions)"{--sync-all,-S}'[Update all overlays]'
|
||||
"($actions $add_actions)"{--list,-L}'[List the contents of the remote list]'
|
||||
"($actions $add_actions)"{--list-local,-l}'[List the locally installed overlays]'
|
||||
"($actions $add_actions)"{--fetch,-f}'[Fetches the remote list of overlays]'
|
||||
)
|
||||
|
||||
_arguments $global_opts[@] $actions_args[@]
|
||||
44
_lein
44
_lein
|
|
@ -1,44 +0,0 @@
|
|||
#compdef lein
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Leiningen (https://github.com/technomancy/leiningen)
|
||||
#
|
||||
# Source: https://github.com/technolize/zsh-completion-funcs
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * technolize (https://github.com/technolize)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local ret=1 state
|
||||
_arguments ':subcommand:->subcommand' && ret=0
|
||||
|
||||
case $state in
|
||||
subcommand)
|
||||
subcommands=(
|
||||
"clean:remove compiled files and dependencies from project"
|
||||
"compile:ahead-of-time compile the project"
|
||||
"deps:download and install all dependencies"
|
||||
"help:display a list of tasks or help for a given task"
|
||||
"install:install the project and its dependencies in your local repository"
|
||||
"jar:create a jar file containing the compiled .class files"
|
||||
"new:create a new project skeleton"
|
||||
"pom:write a pom.xml file to disk for maven interop"
|
||||
"test:run the project's tests"
|
||||
"uberjar:Create a jar including the contents of each of deps"
|
||||
"upgrade:upgrade leiningen to the latest stable release"
|
||||
"version:print leiningen's version"
|
||||
)
|
||||
_describe -t subcommands 'leiningen subcommands' subcommands && ret=0
|
||||
esac
|
||||
|
||||
return ret
|
||||
309
_lunar
309
_lunar
|
|
@ -1,309 +0,0 @@
|
|||
#compdef lunar lin lrm lvu
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Lunar (http://www.lunar-linux.org)
|
||||
#
|
||||
# Source: https://github.com/Valodim/lunar-zsh-completion
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Valodim (https://github.com/Valodim)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# completion for lunar itself (different name, see below)
|
||||
_lunar_comp() {
|
||||
local suf ret=1 curcontext="$curcontext"
|
||||
local -a vals state line expl
|
||||
|
||||
# regular arguments, this will probably just hand down to the * command below
|
||||
_arguments -C \
|
||||
'(- :)-d[Enables debug messages]' \
|
||||
'(- :)-h[Display help text]' \
|
||||
'(- :)-v[Increases the level of message output]' \
|
||||
'*::command:->command' && return 0
|
||||
|
||||
# complete the first word, ie. subcommand
|
||||
if (( CURRENT == 1 )); then
|
||||
local -a lunar_commands
|
||||
# all lunar subcommands
|
||||
lunar_commands=(
|
||||
'prune:Removes old sources and install/compile logs'
|
||||
'renew:Checks ver. against moonbase & recompiles if necessary'
|
||||
'update:Fetches latest moonbase and then does a "renew"'
|
||||
'rebuild:Recompiles all installed modules'
|
||||
'optimize:Shortcut to the optimization menu'
|
||||
'fix:Check and fix all modules and internal state of lunar'
|
||||
'nofix:Check but do not fix modules and internal state'
|
||||
'fixdepends:Check and fix the dependency database of lunar'
|
||||
'set:Check internal variable(s) and assign their values'
|
||||
'unset:Unsets an internal variable'
|
||||
'resurrect:Force modulename(s) to be unpacked from /var/cache'
|
||||
'install:Install a checklist of modules'
|
||||
'remove:Remove a checklist of modules'
|
||||
'hold:Place a hold on a checklist of modules'
|
||||
'unhold:Remove a hold on a checklist of modules'
|
||||
'exile:Remove a module a/o prevent it from being resurrected'
|
||||
'unexile:Allows a module to be compiled|resurrected again')
|
||||
|
||||
# just show the commands with description
|
||||
_describe -t commands 'lunar command' lunar_commands && ret=0
|
||||
return ret
|
||||
else
|
||||
|
||||
# at this point, we have to decide what to complete for specific subcommands
|
||||
|
||||
# make a list of subcommands with no further arguments for later
|
||||
local -a lunar_no_args
|
||||
lunar_no_args=( prune renew update rebuild optimize fix nofix fixdepends )
|
||||
|
||||
# update the current context
|
||||
curcontext="${curcontext%:*:*}:lunar-$words[1]:"
|
||||
# if there is a specific function of the form _lunar-subcommand
|
||||
if (( $+functions[_lunar-$words[1]] )); then
|
||||
# call that for completion
|
||||
_call_function ret _lunar-$words[1]
|
||||
elif [[ -n "${lunar_no_args[(r)${words[1]}]}" ]]; then
|
||||
# all commands from the array above take no further arguments
|
||||
_message "lunar ${words[1]} requires no arguments"
|
||||
else
|
||||
# by default, complete modules
|
||||
_lunar_modules
|
||||
fi
|
||||
return ret
|
||||
fi
|
||||
}
|
||||
|
||||
# specific completion for lunar set
|
||||
_lunar-set() {
|
||||
# second argument: all lunar variables
|
||||
if (( CURRENT == 2 )); then
|
||||
local vars
|
||||
vars=( ${(f)"$(cat /var/lib/lunar/unset.sh | cut -d' ' -f2)"} )
|
||||
_describe -t modules 'lunar variable' vars && return 0
|
||||
# third argument: some value
|
||||
elif (( CURRENT == 3 )); then
|
||||
_message "value"
|
||||
# no further argument
|
||||
else
|
||||
_message "no further arguments"
|
||||
fi
|
||||
}
|
||||
|
||||
_lunar-unset() {
|
||||
local vars
|
||||
vars=( ${(f)"$(cat /var/lib/lunar/unset.sh | cut -d' ' -f2)"} )
|
||||
_describe -t modules 'lunar variable' vars && return 0
|
||||
}
|
||||
|
||||
_lunar-unhold() {
|
||||
local vals
|
||||
vals=( ${(f)"$(lvu held | sort | uniq)"} )
|
||||
_describe -t modules 'held modules' vals && return 0
|
||||
}
|
||||
|
||||
_lunar-unexile() {
|
||||
local vals
|
||||
vals=( ${(f)"$(lvu exiled | sort | uniq)"} )
|
||||
_describe -t modules 'exiled modules' vals && return 0
|
||||
}
|
||||
|
||||
_lrm() {
|
||||
_arguments \
|
||||
'(-d --debug)'{-d,--debug}'[Enables debug messages]' \
|
||||
'(-D --downgrade)'{-D,--downgrade}'[downgrades a module]:module:_lunar_modules:version' \
|
||||
'(-h --help)'{-h,--help}'[Displays this help text]' \
|
||||
'(-k --keepconfig)'{-k,--keepconfig}'[remove module(s) but keep dependencies and config]' \
|
||||
'(-n --nosustain)'{-n,--nosustain}'[removes module(s) even if they are sustained]' \
|
||||
'(-u --upgrade)'{-u,--upgrade}'[remove the module but do not run scripts etc.]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Increases the level of message output]' \
|
||||
'(-p --purge)'{-p,--purge}'[Delete all modules that depend on the module(s) being removed as well]' \
|
||||
'*:module:_lunar_installed_modules' && return 0
|
||||
}
|
||||
|
||||
_lin() {
|
||||
_arguments \
|
||||
'(-c --compile)'{-c,--compile}'[Ignore /var/cache/lunar and compiles]' \
|
||||
'(-d --debug)'{-d,--debug}'[Enables debug messages]' \
|
||||
'--deps[Configure modules and determine dependencies]' \
|
||||
'(-f --from)'{-f,--from}'[Specify an alternate for /var/spool/lunar]:directory:_files -/' \
|
||||
'(-h --help)'{-h,--help}'[Displays help text]' \
|
||||
'--opts[Add custom configure options to the module]:configure option string' \
|
||||
'(-p --probe)'{-p,--probe}'[Only lin if not already installed]' \
|
||||
'(-r --reconfigure)'{-r,--reconfigure}'[Select new dependencies for modules]' \
|
||||
'(-R --resurrect)'{-R,--resurrect}'[Force to be unpacked from /var/cache/lunar]' \
|
||||
'(-s --silent)'{-s,--silent}'[Decreases the level of message output]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Increases the level of message output]' \
|
||||
'(-w --want)'{-w,--want}'[Try to install a different version]:wanted version' \
|
||||
'*:module:_lunar_modules' && return 0
|
||||
}
|
||||
|
||||
# completion for lvu, very similar to the lunar one above (therefore uncommented)
|
||||
_lvu() {
|
||||
local suf ret=1 curcontext="$curcontext"
|
||||
local -a vals state line expl
|
||||
|
||||
_arguments -C \
|
||||
'(- :)-d[Enables debug messages]' \
|
||||
'(- :)-h[Display help text]' \
|
||||
'(- :)-v[Increases the level of message output]' \
|
||||
'*::command:->command' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
local -a lvu_commands
|
||||
lvu_commands=(
|
||||
'what:display a module''s description'
|
||||
'short:display a module''s short description'
|
||||
'where:display a module''s section'
|
||||
'cd:change directory to module and execs a new shell'
|
||||
'alien:discover untracked files'
|
||||
'from:discover what installed a given file'
|
||||
'leafs:display installed modules that have no explicit dependencies on them'
|
||||
'orphans:display installed modules that are missing dependencies'
|
||||
'conflicts:display conflicting files'
|
||||
'held:display held modules'
|
||||
'exiled:display exiled modules'
|
||||
'expired:display a list of modules which need an update'
|
||||
'info:display terse summary information about module'
|
||||
'search:searches all modules long descriptions for phrase.'
|
||||
'service:displays modules that provide that service'
|
||||
'website:display a module''s website'
|
||||
'install:display an install log'
|
||||
'size:find and show installed size of a module or ALL (slow)'
|
||||
'installed:display installed modules/version of module'
|
||||
'compile:display a compile log'
|
||||
'compiler:display the compiler version used'
|
||||
'links:display a list of modules that this module links to'
|
||||
'sources:display source files for a module'
|
||||
'urls:display all URLs for a module'
|
||||
'maintainer:display maintainer for a module'
|
||||
'version:display version of module in moonbase'
|
||||
'new:attempt to create a new module from scratch'
|
||||
'edit:copy a module to zlocal for editing'
|
||||
'diff:view changes on edited module'
|
||||
'submit:attempt to submit a module to the lunar ML'
|
||||
'unedit:delete zlocal copy of a module'
|
||||
'sum:display checksums'
|
||||
'md5sum:display md5sums'
|
||||
'export:make snapshot of box''s configuration.'
|
||||
'import:restores an exported snapshot.'
|
||||
'section:display moonbase sections'
|
||||
'moonbase:display text listing of the moonbase'
|
||||
'html:display html listing of the moonbase'
|
||||
'updatelog:display summary log of previous lunar update'
|
||||
'activity:display main log file'
|
||||
'newer:display available modules newer than Aug 01, 2003'
|
||||
'older:display modules installed before Jan 01, 2003'
|
||||
'voyeur:peak into module compilation'
|
||||
'pam:display installed modules that are Linux-PAM aware'
|
||||
'depends:displays installed modules that explicitly or recursively depend on this module.'
|
||||
'tree:displays a tree of the module''s dependencies'
|
||||
'stree:same as ''tree'' but highly abbreviated'
|
||||
'eert:same as ''tree'' but reverse and installed deps only'
|
||||
'leert:full reverse dependency tree')
|
||||
|
||||
_describe -t commands 'lvu command' lvu_commands && ret=0
|
||||
|
||||
return ret
|
||||
elif (( CURRENT == 2 )); then
|
||||
local -a lvu_no_args
|
||||
lvu_no_args=( alien leafs orphans conflicts held exiled expired export moonbase html updatelog pam )
|
||||
|
||||
curcontext="${curcontext%:*:*}:lvu-$words[1]:"
|
||||
if (( $+functions[_lvu-$words[1]] )); then
|
||||
_call_function ret _lvu-$words[1]
|
||||
elif [[ -n "${lvu_no_args[(r)${words[1]}]}" ]]; then
|
||||
_message "lvu ${words[1]} requires no arguments"
|
||||
else
|
||||
_lunar_modules
|
||||
fi
|
||||
return ret
|
||||
else
|
||||
_message "No further arguments"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
_lvu-service() {
|
||||
_alternative \
|
||||
'service:service name:_lvu-service-service' \
|
||||
'port:port number:_guard "[0-9]#" "port number"'
|
||||
}
|
||||
|
||||
_lvu-service-service() {
|
||||
local vals
|
||||
vals=( ${(f)"$(cat /etc/services | grep -E -o '^(\w+)' | sort | uniq)"} )
|
||||
_describe -t modules 'service' vals && return 0
|
||||
}
|
||||
|
||||
_lvu-diff() {
|
||||
local vals
|
||||
vals=( /var/lib/lunar/moonbase/zlocal/*(/:t) )
|
||||
_describe -t modules 'moonbase module from zlocal' vals && return 0
|
||||
}
|
||||
|
||||
_lvu-unedit() {
|
||||
local vals
|
||||
vals=( /var/lib/lunar/moonbase/zlocal/*(/:t) )
|
||||
_describe -t modules 'moonbase module from zlocal' vals && return 0
|
||||
}
|
||||
|
||||
_lvu-newer() {
|
||||
_message "date string"
|
||||
}
|
||||
|
||||
_lvu-older() {
|
||||
_message "date string"
|
||||
}
|
||||
|
||||
_lvu-import() {
|
||||
_files
|
||||
}
|
||||
|
||||
_lvu-from() {
|
||||
_files
|
||||
}
|
||||
|
||||
_lvu-new() {
|
||||
_message "module name"
|
||||
}
|
||||
|
||||
_lvu-search() {
|
||||
_message "search string"
|
||||
}
|
||||
|
||||
# specific completion for moonbase modules
|
||||
_lunar_modules() {
|
||||
local vals
|
||||
vals=( /var/lib/lunar/moonbase/*/*(/:t) )
|
||||
_describe -t modules 'moonbase module' vals && return 0
|
||||
}
|
||||
|
||||
# specific completion for moonbase modules
|
||||
_lunar_installed_modules() {
|
||||
local vals
|
||||
vals=( ${(f)"$(lvu installed | cut -d':' -f1)"} )
|
||||
_describe -t modules 'moonbase installed module' vals && return 0
|
||||
}
|
||||
|
||||
# hub function called for completion
|
||||
_lunar() {
|
||||
# decide which completion to use
|
||||
case "$service" in
|
||||
lin) _lin "$@";;
|
||||
lrm) _lrm "$@";;
|
||||
lvu) _lvu "$@";;
|
||||
lunar) _lunar_comp "$@";;
|
||||
*) _message "unknown command $service";;
|
||||
esac
|
||||
}
|
||||
|
||||
_lunar "$@"
|
||||
49
_lunchy
49
_lunchy
|
|
@ -1,49 +0,0 @@
|
|||
#compdef lunchy
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for lunchy (https://github.com/mperham/lunchy).
|
||||
#
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Blake Walters (https://github.com/markupboy)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local state line cmds ret=1
|
||||
|
||||
_arguments -C '1: :->cmds' '*: :->args'
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
local -a cmds
|
||||
cmds=(
|
||||
'ls:list available agents'
|
||||
'start:start an agent'
|
||||
'stop:stop an agent'
|
||||
'restart:restart an agent'
|
||||
'status:get the status of agent[s]'
|
||||
'install:install an agents plist file'
|
||||
'edit:edit an agent'
|
||||
)
|
||||
_describe -t commands 'lunchy command' cmds && ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
(install)
|
||||
;;
|
||||
(restart|stop)
|
||||
_values 'items' `lunchy status | awk '{print $3}' ` 2>/dev/null && ret=0
|
||||
;;
|
||||
*)
|
||||
_values 'items' `lunchy ls` 2>/dev/null && ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
240
_manage.py
240
_manage.py
|
|
@ -1,240 +0,0 @@
|
|||
#compdef manage.py
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Django's manage.py (https://www.djangoproject.com).
|
||||
#
|
||||
# Source: https://github.com/technolize/zsh-completion-funcs
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * technolize (https://github.com/technolize)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -ga nul_args
|
||||
nul_args=(
|
||||
'--settings=-[the Python path to a settings module.]:file:_files'
|
||||
'--pythonpath=-[a directory to add to the Python path.]::directory:_directories'
|
||||
'--traceback[print traceback on exception.]'
|
||||
"--version[show program's version number and exit.]"
|
||||
{-h,--help}'[show this help message and exit.]'
|
||||
)
|
||||
|
||||
_managepy-adminindex(){
|
||||
_arguments -s : \
|
||||
$nul_args \
|
||||
'*::directory:_directories' && ret=0
|
||||
}
|
||||
|
||||
_managepy-createcachetable(){
|
||||
_arguments -s : \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-dbshell(){
|
||||
_arguments -s : \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-diffsettings(){
|
||||
_arguments -s : \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-dumpdata(){
|
||||
_arguments -s : \
|
||||
'--format=-[specifies the output serialization format for fixtures.]:format:(json yaml xml)' \
|
||||
'--indent=-[specifies the indent level to use when pretty-printing output.]:' \
|
||||
$nul_args \
|
||||
'*::appname:_applist' && ret=0
|
||||
}
|
||||
|
||||
_managepy-flush(){
|
||||
_arguments -s : \
|
||||
'--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
|
||||
'--noinput[tells Django to NOT prompt the user for input of any kind.]' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-help(){
|
||||
_arguments -s : \
|
||||
'*:command:_managepy_cmds' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy_cmds(){
|
||||
local line
|
||||
local -a cmd
|
||||
_call_program help-command ./manage.py help \
|
||||
|& sed -n '/^ /s/[(), ]/ /gp' \
|
||||
| while read -A line; do cmd=($line $cmd) done
|
||||
_describe -t managepy-command 'manage.py command' cmd
|
||||
}
|
||||
|
||||
_managepy-inspectdb(){
|
||||
_arguments -s : \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-loaddata(){
|
||||
_arguments -s : \
|
||||
'--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
|
||||
'*::file:_files' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-reset(){
|
||||
_arguments -s : \
|
||||
'--noinput[tells Django to NOT prompt the user for input of any kind.]' \
|
||||
'*::appname:_applist' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-runfcgi(){
|
||||
local state
|
||||
|
||||
local fcgi_opts
|
||||
fcgi_opts=(
|
||||
'protocol[fcgi, scgi, ajp, ... (default fcgi)]:protocol:(fcgi scgi ajp)'
|
||||
'host[hostname to listen on..]:'
|
||||
'port[port to listen on.]:'
|
||||
'socket[UNIX socket to listen on.]::file:_files'
|
||||
'method[prefork or threaded (default prefork)]:method:(prefork threaded)'
|
||||
'maxrequests[number of requests a child handles before it is killed and a new child is forked (0 = no limit).]:'
|
||||
'maxspare[max number of spare processes / threads.]:'
|
||||
'minspare[min number of spare processes / threads.]:'
|
||||
'maxchildren[hard limit number of processes / threads.]:'
|
||||
'daemonize[whether to detach from terminal.]:boolean:(False True)'
|
||||
'pidfile[write the spawned process-id to this file.]:file:_files'
|
||||
'workdir[change to this directory when daemonizing.]:directory:_files'
|
||||
'outlog[write stdout to this file.]:file:_files'
|
||||
'errlog[write stderr to this file.]:file:_files'
|
||||
)
|
||||
|
||||
_arguments -s : \
|
||||
$nul_args \
|
||||
'*: :_values "FCGI Setting" $fcgi_opts' && ret=0
|
||||
}
|
||||
|
||||
_managepy-runserver(){
|
||||
_arguments -s : \
|
||||
'--noreload[tells Django to NOT use the auto-reloader.]' \
|
||||
'--adminmedia[specifies the directory from which to serve admin media.]:directory:_files' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-shell(){
|
||||
_arguments -s : \
|
||||
'--plain[tells Django to use plain Python, not IPython.]' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-sql(){}
|
||||
_managepy-sqlall(){}
|
||||
_managepy-sqlclear(){}
|
||||
_managepy-sqlcustom(){}
|
||||
_managepy-sqlflush(){}
|
||||
_managepy-sqlindexes(){}
|
||||
_managepy-sqlinitialdata(){}
|
||||
_managepy-sqlreset(){}
|
||||
_managepy-sqlsequencereset(){}
|
||||
_managepy-startapp(){}
|
||||
|
||||
_managepy-syncdb() {
|
||||
_arguments -s : \
|
||||
'--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
|
||||
'--noinput[tells Django to NOT prompt the user for input of any kind.]' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-test() {
|
||||
_arguments -s : \
|
||||
'--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
|
||||
'--noinput[tells Django to NOT prompt the user for input of any kind.]' \
|
||||
'*::appname:_applist' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-testserver() {
|
||||
_arguments -s : \
|
||||
'--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
|
||||
'--addrport=-[port number or ipaddr:port to run the server on.]' \
|
||||
'*::fixture:_files' \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-validate() {
|
||||
_arguments -s : \
|
||||
$nul_args && ret=0
|
||||
}
|
||||
|
||||
_managepy-commands() {
|
||||
local -a commands
|
||||
|
||||
commands=(
|
||||
'adminindex:prints the admin-index template snippet for the given app name(s).'
|
||||
'createcachetable:creates the table needed to use the SQL cache backend.'
|
||||
'dbshell:runs the command-line client for the current DATABASE_ENGINE.'
|
||||
"diffsettings:displays differences between the current settings.py and Django's default settings."
|
||||
'dumpdata:Output the contents of the database as a fixture of the given format.'
|
||||
'flush:Executes ``sqlflush`` on the current database.'
|
||||
'help:manage.py help.'
|
||||
'inspectdb:Introspects the database tables in the given database and outputs a Django model module.'
|
||||
'loaddata:Installs the named fixture(s) in the database.'
|
||||
'reset:Executes ``sqlreset`` for the given app(s) in the current database.'
|
||||
'runfcgi:Run this project as a fastcgi (or some other protocol supported by flup) application,'
|
||||
'runserver:Starts a lightweight Web server for development.'
|
||||
'shell:Runs a Python interactive interpreter.'
|
||||
'sql:Prints the CREATE TABLE SQL statements for the given app name(s).'
|
||||
'sqlall:Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL statements for the given model module name(s).'
|
||||
'sqlclear:Prints the DROP TABLE SQL statements for the given app name(s).'
|
||||
'sqlcustom:Prints the custom table modifying SQL statements for the given app name(s).'
|
||||
'sqlflush:Returns a list of the SQL statements required to return all tables in the database to the state they were in just after they were installed.'
|
||||
'sqlindexes:Prints the CREATE INDEX SQL statements for the given model module name(s).'
|
||||
"sqlinitialdata:RENAMED: see 'sqlcustom'"
|
||||
'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).'
|
||||
'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).'
|
||||
"startapp:Creates a Django app directory structure for the given app name in this project's directory."
|
||||
"syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
|
||||
'test:Runs the test suite for the specified applications, or the entire site if no apps are specified.'
|
||||
'testserver:Runs a development server with data from the given fixture(s).'
|
||||
'validate:Validates all installed models.'
|
||||
)
|
||||
|
||||
_describe -t commands 'manage.py command' commands && ret=0
|
||||
}
|
||||
|
||||
_applist() {
|
||||
local line
|
||||
local -a apps
|
||||
_call_program help-command "python -c \"import os.path as op, re, settings, sys;\\
|
||||
bn=op.basename(op.abspath(op.curdir));[sys\\
|
||||
.stdout.write(str(re.sub(r'^%s\.(.*?)$' %
|
||||
bn, r'\1', i)) + '\n') for i in settings.\\
|
||||
INSTALLED_APPS if re.match(r'^%s' % bn, i)]\"" \
|
||||
| while read -A line; do apps=($line $apps) done
|
||||
_values 'Application' $apps && ret=0
|
||||
}
|
||||
|
||||
_managepy() {
|
||||
local curcontext=$curcontext ret=1
|
||||
|
||||
if ((CURRENT == 2)); then
|
||||
_managepy-commands
|
||||
else
|
||||
shift words
|
||||
(( CURRENT -- ))
|
||||
curcontext="${curcontext%:*:*}:managepy-$words[1]:"
|
||||
_call_function ret _managepy-$words[1]
|
||||
fi
|
||||
}
|
||||
|
||||
_managepy "$@"
|
||||
84
_pear
84
_pear
|
|
@ -1,84 +0,0 @@
|
|||
#compdef pear
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Pear (http://pear.php.net).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * aki77 (https://github.com/aki77)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_pear () {
|
||||
local curcontext="$curcontext" state line expl ret=1
|
||||
|
||||
_arguments \
|
||||
'1: :->subcmds' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
subcmds)
|
||||
_pear_commands
|
||||
;;
|
||||
args)
|
||||
local cmd args
|
||||
|
||||
cmd=$words[1]
|
||||
args=()
|
||||
|
||||
case $cmd in
|
||||
channel-alias|channel-delete|channel-info|channel-update)
|
||||
args+=(
|
||||
':channel:_pear_discovered_channels'
|
||||
)
|
||||
;;
|
||||
uninstall|upgrade|run-scripts)
|
||||
args+=(
|
||||
':package:_pear_installed_packages'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$args[@]" && ret=0
|
||||
return
|
||||
;;
|
||||
esac
|
||||
return ret
|
||||
}
|
||||
|
||||
_pear_commands () {
|
||||
local commands
|
||||
|
||||
commands=(
|
||||
${${(f)${"$(_call_program commands $service 2>&1)"#*Commands:}%Usage:*}/[[:blank:]]*[[:blank:]][[:blank:]]/:}
|
||||
)
|
||||
_describe -t commands 'Pear commands' commands
|
||||
}
|
||||
|
||||
_pear_installed_packages () {
|
||||
local packages
|
||||
|
||||
packages=(
|
||||
${${(f)"$(pear list)"#*STATE}%%[[:blank:]]*}
|
||||
)
|
||||
_wanted package expl 'package' compadd -a packages
|
||||
}
|
||||
|
||||
_pear_discovered_channels () {
|
||||
local channels
|
||||
|
||||
channels=(
|
||||
${${${(f)"$(_call_program commands pear list-channels)"#*SUMMARY}%__uri*}%%[[:blank:]]*}
|
||||
)
|
||||
_wanted channel expl 'channel' compadd -a channels
|
||||
}
|
||||
|
||||
_pear "$@"
|
||||
243
_pgsql_utils
243
_pgsql_utils
|
|
@ -1,243 +0,0 @@
|
|||
#compdef psql pg_dump createdb dropdb vacuumdb
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for PostgreSQL utils (http://postgresql.org).
|
||||
#
|
||||
# Source: http://www.zsh.org/mla/users/2004/msg01006.html
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Dominic Mitchell <dom+zsh@happygiraffe.net>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_pgsql_get_identity () {
|
||||
_pgsql_user=${(v)opt_args[(i)-U|--username]}
|
||||
_pgsql_port=${(v)opt_args[(i)-p|--port]}
|
||||
_pgsql_host=${(v)opt_args[(i)-h|--host]}
|
||||
|
||||
_pgsql_params=(
|
||||
${_pgsql_user:+"--username=$_pgsql_user"}
|
||||
${_pgsql_port:+"--port=$_pgsql_port"}
|
||||
${_pgsql_host:+"--host=$_pgsql_host"}
|
||||
)
|
||||
}
|
||||
|
||||
# Postgres Allows specifying the path to the directory containing the
|
||||
# socket as well as a hostname.
|
||||
_pgsql_host_or_dir() {
|
||||
_alternative \
|
||||
'hosts:host:_hosts' \
|
||||
'directories:directory:_directories'
|
||||
}
|
||||
|
||||
_pgsql_users () {
|
||||
local _pgsql_user _pgsql_port _pgsql_host _pgsql_params
|
||||
_pgsql_get_identity
|
||||
|
||||
# We use _pgsql_port and _pgsql_host directly here instead of
|
||||
# _pgsql_params so as to not pick up a partially completed
|
||||
# username.
|
||||
_pgsql_params=(
|
||||
${_pgsql_port:+"--port=$_pgsql_port"}
|
||||
${_pgsql_host:+"--host=$_pgsql_host"}
|
||||
)
|
||||
|
||||
compadd "$@" - ${${(f)~~"$( psql $_pgsql_params[@] -At -c '\du' template1 2>/dev/null )"}[@]%%|*}
|
||||
}
|
||||
|
||||
_pgsql_tables () {
|
||||
local _pgsql_user _pgsql_port _pgsql_host _pgsql_params
|
||||
_pgsql_get_identity
|
||||
|
||||
# Need to pull out the database name from the existing arguments.
|
||||
# This is going to vary between commands. Thankfully, it's only
|
||||
# used by pg_dump, which always has the dbname in arg1. If it's
|
||||
# not present it defaults to ${PGDATABASE:-$LOGNAME}, which
|
||||
# matches (I think) the PostgreSQL behaviour.
|
||||
|
||||
local db
|
||||
db=${line[1]:-${PGDATABASE:-$LOGNAME}}
|
||||
|
||||
# XXX In postgres 7.3 and above, the schema name is in the first
|
||||
# column. I'm not sure how best to work around that... It really
|
||||
# needs to be prepended with a "." to the table name.
|
||||
|
||||
# Many thanks to Oliver Kiddle for pointing out how to get the 2nd
|
||||
# column out of this...
|
||||
compadd "$@" - \
|
||||
${${${(f)~~"$( psql $_pgsql_params[@] -At -c '\dt' $db 2>/dev/null )"}#*|}%%|*}
|
||||
}
|
||||
|
||||
_pgsql_databases () {
|
||||
local _pgsql_user _pgsql_port _pgsql_host _pgsql_params
|
||||
_pgsql_get_identity
|
||||
|
||||
# Should I grep out template0?
|
||||
compadd "$@" - ${${(f)~~"$( psql $_pgsql_params[@] -At -l 2>/dev/null )"}[@]%%|*}
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
## The actual completion code for the commands
|
||||
##
|
||||
|
||||
_psql () {
|
||||
local curcontext="$curcontext" state line expl
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -s \
|
||||
"$_pgsql_common_opts[@]" \
|
||||
{-V,--version}'[display client version]' \
|
||||
{-a,--echo-all}'[print commands read]' \
|
||||
{-A,--no-align}'[unaligned output mode]' \
|
||||
{-c+,--command=}':execute SQL command:' \
|
||||
{-d+,--dbname=}':database to connect to:_pgsql_databases' \
|
||||
{-e,--echo-queries}'[display queries submitted]' \
|
||||
{-E,--echo-hidden}'[display hidden queries]' \
|
||||
{-f+,--file=}':SQL file to read:_files' \
|
||||
{-F+,--field-separator=}':field separator char:' \
|
||||
{-H,--html}'[HTML output]' \
|
||||
{-l,--list}'[list databases]' \
|
||||
{-o+,--output=}':query output:_files' \
|
||||
{-P+,--pset=}':set psql variable:' \
|
||||
{-q,--quiet}'[non verbose mode]' \
|
||||
{-R+,--record-separator=}':record separator char:' \
|
||||
{-s,--single-step}'[prompt before each query]' \
|
||||
{-S,--single-line}'[newline sends query]' \
|
||||
{-t,--tuples-only}'[dont display header/footer]' \
|
||||
{-T+,--table-attr=}':HTML table options:' \
|
||||
-u'[prompt for username/password]' \
|
||||
{-v+,--set=,--variable=}':set SQL variable:' \
|
||||
{-x,--expanded}'[one column per line]' \
|
||||
{-X,--no-psqlrc}'[dont read ~/.psqlrc]' \
|
||||
':PostgreSQL database:_pgsql_databases' \
|
||||
':PostgreSQL user:_pgsql_users'
|
||||
}
|
||||
|
||||
_pg_dump () {
|
||||
local curcontext="$curcontext" state line expl
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -s \
|
||||
"$_pgsql_common_opts[@]" \
|
||||
{-a,--data-only}'[dump only data]' \
|
||||
{-b,--blobs}'[dump blobs as well]' \
|
||||
{-c,--clean}'[include clean cmds in dump]' \
|
||||
{-C,--create}'[include createdb cmds in dump]' \
|
||||
{-d,--inserts}'[use INSERT not COPY]' \
|
||||
{-D,--{attribute,column}-inserts}'[use INSERT (cols) not COPY]' \
|
||||
{-f+,--file=}':output file:_files' \
|
||||
{-F+,--format=}':output format:_values "format" "p[plain text]" "t[tar]" "c[custom]"' \
|
||||
{-i,--ignore-version}'[ignore version mismatch]' \
|
||||
{-n+,--schema=}':schema to dump:' \
|
||||
{-o,--oids}'[dump objects identifiers for every table]' \
|
||||
{-O,--no-owner}'[dont recreate as same owner]' \
|
||||
{-R,--no-reconnect}'[dont output connect]' \
|
||||
{-s,--schema-only}'[no data, only schema]' \
|
||||
{-S+,--superuser=}':superuser name:_pgsql_users' \
|
||||
{-t+,--table=}':table to dump:_pgsql_tables' \
|
||||
{-v,--verbose}'[verbose mode]' \
|
||||
{-V,--version}'[display client version]' \
|
||||
{-x,--no-{acl,privileges}}'[dont dump ACLs]' \
|
||||
-X+':option:_values "option" use-set-session-authorization disable-triggers' \
|
||||
{-Z+,--compress=}':compression level:_values "level" 9 8 7 6 5 4 3 2 1 0' \
|
||||
':PostgreSQL database:_pgsql_databases'
|
||||
}
|
||||
|
||||
_createdb () {
|
||||
local curcontext="$curcontext" state line expl
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -s \
|
||||
"$_pgsql_common_opts[@]" \
|
||||
{-e,--echo}'[display SQL queries]' \
|
||||
{-q,--quiet}'[non verbose mode]' \
|
||||
{-D+,--location=}':database location:_directories' \
|
||||
{-T+,--template=}':database template:_pgsql_databases' \
|
||||
{-E+,--encoding=}':database encoding:_values "encoding" $_pgsql_encodings[@]' \
|
||||
':PostgreSQL database:' \
|
||||
':comment:'
|
||||
}
|
||||
|
||||
_dropdb () {
|
||||
local curcontext="$curcontext" state line expl
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -s \
|
||||
"$_pgsql_common_opts[@]" \
|
||||
{-e,--echo}'[display SQL queries]' \
|
||||
{-q,--quiet}'[non verbose mode]' \
|
||||
{-i,--interactive}'[confirm before drop]' \
|
||||
':PostgreSQL database:_pgsql_databases'
|
||||
}
|
||||
|
||||
_vacuumdb () {
|
||||
local curcontext="$curcontext" state line expl
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -s \
|
||||
"$_pgsql_common_opts[@]" \
|
||||
{-a,--all}'[vacuum all databases]' \
|
||||
{-d+,--dbname=}':database to connect to:_pgsql_databases' \
|
||||
{-t+,--table=}':table to dump:_pgsql_tables' \
|
||||
{-f,--full}'[do full vacuuming]' \
|
||||
{-z,--analyze}'[update optimizer hints]' \
|
||||
{-e,--echo}'[show the commands being sent to the server]' \
|
||||
{-q,--quiet}'[do not write any messages]' \
|
||||
{-v,--verbose}'[write a lot of output]' \
|
||||
'--help[show this help, then exit]' \
|
||||
'--version[output version information, then exit]' \
|
||||
'1:PostgreSQL database:_pgsql_databases'
|
||||
}
|
||||
|
||||
_pgsql_utils () {
|
||||
local _pgsql_common_opts _pgsql_encodings
|
||||
|
||||
_pgsql_common_opts=(
|
||||
{-\?,--help}'[display help]'
|
||||
{-h+,--host=}':database host:_pgsql_host_or_dir'
|
||||
# Postgres doesn't like service names here, which is why we
|
||||
# don't use _ports.
|
||||
{-p+,--port=}':database port number:'
|
||||
{-U+,--username=}':connect as user:_pgsql_users'
|
||||
{-W,--password}'[prompt for password]'
|
||||
)
|
||||
|
||||
# Taken from
|
||||
# <http://www.postgresql.org/docs/7.4/static/multibyte.html#CHARSET-TABLE>.
|
||||
# It'd be real nice if postgres could tell us these...
|
||||
_pgsql_encodings=(
|
||||
SQL_ASCII
|
||||
EUC_{JP,CN,KR,TW}
|
||||
JOHAB
|
||||
UNICODE
|
||||
MULE_INTERNAL
|
||||
LATIN{1,2,3,4,5,6,7,8,9,10}
|
||||
ISO_8859_{5,6,7,8}
|
||||
KOI8
|
||||
WIN
|
||||
ALT
|
||||
WIN1256
|
||||
TCVN
|
||||
WIN874
|
||||
)
|
||||
|
||||
case "$service" in
|
||||
psql) _psql "$@" ;;
|
||||
pg_dump) _pg_dump "$@" ;;
|
||||
createdb) _createdb "$@" ;;
|
||||
dropdb) _dropdb "$@" ;;
|
||||
vacuumdb) _vacuumdb "$@" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
_pgsql_utils "$@"
|
||||
119
_pip
119
_pip
|
|
@ -1,119 +0,0 @@
|
|||
#compdef pip
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for pip (http://pypi.python.org/pypi/pip).
|
||||
#
|
||||
# Source: https://github.com/technolize/zsh-completion-funcs
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * technolize (https://github.com/technolize)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local ret=1 state
|
||||
|
||||
declare -ga common_ops
|
||||
common_ops=(
|
||||
"--version[display version number]"
|
||||
{-h,--help}"[show help]"
|
||||
{-E,--environment=}"[virtualenv environment to run pip]:environment:_directories"
|
||||
{-s,--enable-site-packages}"[include site-packages in virtualenv]"
|
||||
{-v,--verbose}"[give more output]"
|
||||
{-q,--quiet}"[give less output]"
|
||||
"--log=[log file where a complete record will be kept]"
|
||||
"--proxy=[specify a proxy in the form user:passwd@proxy.server:port]:proxy"
|
||||
"--timeout=[set the socket timeout (default 15 seconds)]:second"
|
||||
)
|
||||
|
||||
_directories () {
|
||||
_wanted directories expl directory _path_files -/ "$@" -
|
||||
}
|
||||
|
||||
typeset -A opt_args
|
||||
_arguments \
|
||||
':subcommand:->subcommand' \
|
||||
$common_ops \
|
||||
'*::options:->options' && ret=0
|
||||
|
||||
case $state in
|
||||
subcommand)
|
||||
subcommands=(
|
||||
"bundle:create pybundle"
|
||||
"freeze:put all currently installed packages"
|
||||
"help:show available commands"
|
||||
"install:install packages"
|
||||
"search:search pypi"
|
||||
"usinstall:uninstall packages"
|
||||
"unzip:unzip undividual packages"
|
||||
"zip:zip dividual packages"
|
||||
)
|
||||
|
||||
_describe -t subcommands 'pip subcommand' subcommands && ret=0
|
||||
;;
|
||||
|
||||
options)
|
||||
declare -a args
|
||||
args=(
|
||||
$common_ops
|
||||
)
|
||||
|
||||
declare -a requirement
|
||||
requirement=(
|
||||
{-r,--requirement=}"[install all the packages listed in the given requirements file]:filename"
|
||||
)
|
||||
|
||||
declare -a findlink
|
||||
findlink=(
|
||||
{-f,--find-links=}"[URL to look for packages at]:url"
|
||||
)
|
||||
|
||||
case $words[1] in
|
||||
bundle | install)
|
||||
args+=(
|
||||
{-e,--editable=}"[install a package directly from a checkout]:VCS+REPOS_URL[@REV]#egg=PACKAGE"
|
||||
$requirement
|
||||
$findlink
|
||||
{-i,--index-url=,--pypi-url=}"[base URL of Python Package Index]:URL"
|
||||
"--extra-index-url=[extra URLs of package indexes to use]:URL"
|
||||
{-b,--build=,--build-dir=}"[unpack packages into DIR]:directory:_directories"
|
||||
{--src=,--source=}"[check out --editable packages into DIR]:directory:_directories"
|
||||
{-U,--upgrade}"[upgrade all packages to the newest available version]"
|
||||
{-I,--ignore-installed}"[ignore the installed packages]"
|
||||
"--noinstall[download and unpack all packages, but don't actually install them]"
|
||||
"--install-option=[extra arguments to be supplied to the setup.py install command]"
|
||||
)
|
||||
;;
|
||||
|
||||
freeze)
|
||||
args+=(
|
||||
$requirement
|
||||
$findlink
|
||||
)
|
||||
;;
|
||||
|
||||
unzip | zip)
|
||||
args+=(
|
||||
"--unzip[unzip a package]"
|
||||
"--no-pyc[do not include .pyc files in zip files]"
|
||||
{-l,--list}"[list the packages available, and their zip status]"
|
||||
"--sort-files[with --list, sort packages according to how many files they contain]"
|
||||
"--path=[restrict operation to the given paths]:paths"
|
||||
{-n,--simulate}"[do not actually perform the zip/unzip operation]"
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments $args && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
210
_play
210
_play
|
|
@ -1,210 +0,0 @@
|
|||
#compdef play
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Play! framework 1.2.2 (http://www.playframework.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
# * Mario Fernandez (https://github.com/sirech)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local context curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_play() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :_play_cmds' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
curcontext="${curcontext%:*:*}:play-cmd-$words[1]:"
|
||||
case $line[1] in
|
||||
(build-module|list-modules|lm|check|id)
|
||||
_message 'no more arguments' && ret=0
|
||||
;;
|
||||
(dependencies|deps)
|
||||
_arguments \
|
||||
'1:: :_play_apps' \
|
||||
'(--debug)--debug[Debug mode (even more informations logged than in verbose mode)]' \
|
||||
'(--jpda)--jpda[Listen for JPDA connection. The process will suspended until a client is plugged to the JPDA port.]' \
|
||||
'(--sync)--sync[Keep lib/ and modules/ directory synced. Delete unknow dependencies.]' \
|
||||
'(--verbose)--verbose[Verbose Mode]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(clean|javadoc|jd|out|pid|secret|stop)
|
||||
_arguments '1:: :_play_apps' && ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments '1: :_play_cmds -F "(cp deps ec idea jd st lm nb nm help antify evolutions evolutions:apply evolutions:markApplied evolutions:resolve)"' && ret=0
|
||||
;;
|
||||
(status|st)
|
||||
_arguments \
|
||||
'1:: :_play_apps' \
|
||||
'(--url)--url[If you want to monitor an application running on a remote server, specify the application URL using this option]:URL:_urls' \
|
||||
'(--secret)--secret[You can provide your own secret key using this option]:Secret key' \
|
||||
&& ret=0
|
||||
;;
|
||||
(new)
|
||||
_arguments \
|
||||
'1: :_play_apps' \
|
||||
'(--with)--with[Automatically enable this set of module for the newly created application]:Modules list:_play_modules_list' \
|
||||
&& ret=0
|
||||
;;
|
||||
(install)
|
||||
_arguments '1:Play! module:_play_modules_dash_versions' && ret=0
|
||||
;;
|
||||
(new-module)
|
||||
_arguments '1:Module directory:_files -/' && ret=0
|
||||
;;
|
||||
(test|precompile|run|start|war|auto-test|classpath|cp|eclipsify|ec|idealize|idea|modules|netbeansify|nb)
|
||||
local cmd_args; cmd_args=(
|
||||
'1:: :_play_apps'
|
||||
'(--deps)--deps[Resolve and install dependencies before running the command]'
|
||||
)
|
||||
case $line[1] in
|
||||
(precompile|run|start|restart|war)
|
||||
local app_dir="$line[2]"
|
||||
[[ -d "$app_dir" ]] || app_dir=.
|
||||
[[ -f "$app_dir/conf/application.conf" ]] && cmd_args+=('--'${(u)${(M)$(<$app_dir/conf/application.conf):#%*}%%.*}'[Use this ID to run the application (override the default framework ID)]')
|
||||
;|
|
||||
(test|run)
|
||||
cmd_args+=('(-f)-f[Disable the JPDA port checking and force the jpda.port value]')
|
||||
;|
|
||||
(war)
|
||||
cmd_args+=(
|
||||
'(-o --output)'{-o,--output}'[The path where the WAR directory will be created. The contents of this directory will first be deleted]:output directory:_files -/'
|
||||
'(--zip)--zip[By default, the script creates an exploded WAR. If you want a zipped archive, specify the --zip option]'
|
||||
'(--exclude)--exclude[Excludes a list of colon separated directories]:excluded directories list:_play_colon_dirs_list'
|
||||
)
|
||||
;|
|
||||
(test|run|start|restart|war)
|
||||
cmd_args+=('*:Java option')
|
||||
;;
|
||||
esac
|
||||
_arguments "$cmd_args[@]" && ret=0
|
||||
;;
|
||||
*)
|
||||
_call_function ret _play_cmd_$words[1] && ret=0
|
||||
(( ret )) && _message 'no more arguments'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# FIXME Completes only core commands, some modules add commands too (eg Maven). Where do we get them ?
|
||||
# FIXME Parse 'play help' and 'play help <command>' (for aliases) instead of hard-coding.
|
||||
(( $+functions[_play_cmds] )) ||
|
||||
_play_cmds() {
|
||||
local commands; commands=(
|
||||
'antify:Create a build.xml file for this project'
|
||||
'auto-test:Automatically run all application tests'
|
||||
'build-module:Build and package a module'
|
||||
'check:Check for a release newer than the current one'
|
||||
{classpath,cp}':Display the computed classpath'
|
||||
'clean:Delete temporary files (including the bytecode cache)'
|
||||
{dependencies,deps}':Resolve and retrieve project dependencies'
|
||||
{eclipsify,ec}':Create all Eclipse configuration files'
|
||||
'evolutions:Run the evolution check'
|
||||
'evolutions\:apply:Automatically apply pending evolutions'
|
||||
'evolutions\:mark:AppliedMark pending evolutions as manually applied'
|
||||
'evolutions\:resolve:Resolve partially applied evolution'
|
||||
'help:Display help on a specific command'
|
||||
'id:Define the framework ID'
|
||||
{idealize,idea}':Create all IntelliJ Idea configuration files'
|
||||
'install:Install a module'
|
||||
{javadoc,jd}':Generate your application Javadoc'
|
||||
{list-modules,lm}':List modules available from the central modules repository'
|
||||
'modules:Display the computed modules list'
|
||||
{netbeansify,nb}':Create all NetBeans configuration files'
|
||||
'new:Create a new application'
|
||||
{new-module,nm}':Create a module'
|
||||
'out:Follow logs/system.out file'
|
||||
'pid:Show the PID of the running application'
|
||||
'precompile:Precompile all Java sources and templates to speed up application start-up'
|
||||
'restart:Restart the running application'
|
||||
'run:Run the application in the current shell'
|
||||
'secret:Generate a new secret key'
|
||||
'start:Start the application in the background'
|
||||
{status,st}':Display the running application status'
|
||||
'stop:Stop the running application'
|
||||
'test:Run the application in test mode in the current shell'
|
||||
'war:Export the application as a standalone WAR archive'
|
||||
)
|
||||
_describe -t commands 'Play! command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_play_apps] )) ||
|
||||
_play_apps() {
|
||||
_wanted application expl 'Play! application directory' _files -/
|
||||
}
|
||||
|
||||
(( $+functions[_play_modules] )) ||
|
||||
_play_modules() {
|
||||
local modules; modules=(${(ps:,:)${${${(S)${(f)$(_call_program modules $service list-modules)}//\]*\[/,}%%\]*}##*\[}})
|
||||
_describe -t modules 'Play! module' modules "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_play_modules_dash_versions] )) ||
|
||||
_play_modules_dash_versions() {
|
||||
local ret=1
|
||||
if compset -P '*-'; then
|
||||
local versions; versions=(${(ps:,:)${${${${${(f)$(_call_program versions $service list-modules)}##*${IPREFIX%-}\]}#*Versions:}%%"~"*}//[[:space:]]/}})
|
||||
_describe -t module-versions "${IPREFIX%-} module versions" versions && ret=0
|
||||
else
|
||||
_wanted modules expl 'Play! module' _play_modules -qS- && ret=0
|
||||
fi
|
||||
}
|
||||
|
||||
(( $+functions[_play_modules_list] )) ||
|
||||
_play_modules_list() {
|
||||
compset -P '*,'; compset -S ',*'
|
||||
_wanted module-list expl 'Play! modules list' _play_modules -qS,
|
||||
}
|
||||
|
||||
(( $+functions[_play_colon_dirs_list] )) ||
|
||||
_play_colon_dirs_list() {
|
||||
compset -P '*:'; compset -S ':*'
|
||||
_wanted directories-list expl 'Directories list' _files -/ -qS:
|
||||
}
|
||||
|
||||
_play "$@"
|
||||
102
_port
102
_port
|
|
@ -1,102 +0,0 @@
|
|||
#compdef port
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for MacPorts (http://www.macports.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Matt Cable <wozz@wookie.net>
|
||||
# * Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local subcmds
|
||||
|
||||
# Cache the list of ports.
|
||||
if (( ! $+_port_list )); then
|
||||
_port_list=($(port echo all; echo "all current active inactive installed uninstalled outdated"))
|
||||
fi
|
||||
|
||||
subcmds=(
|
||||
'activate'
|
||||
'archive'
|
||||
'build'
|
||||
'cat'
|
||||
'clean'
|
||||
'configure'
|
||||
'contents'
|
||||
'deactivate'
|
||||
'dependents'
|
||||
'deps'
|
||||
'destroot'
|
||||
'dir'
|
||||
'distcheck'
|
||||
'distclean'
|
||||
'dmg'
|
||||
'echo'
|
||||
'edit'
|
||||
'extract'
|
||||
'fetch'
|
||||
'file'
|
||||
'help'
|
||||
'info'
|
||||
'install'
|
||||
'installed'
|
||||
'list'
|
||||
'livecheck'
|
||||
'location'
|
||||
'mpkg'
|
||||
'outdated'
|
||||
'patch'
|
||||
'pkg'
|
||||
'provides'
|
||||
'rpmpackage'
|
||||
'search'
|
||||
'selfupdate'
|
||||
'sync'
|
||||
'test'
|
||||
'unarchive'
|
||||
'uninstall'
|
||||
'upgrade'
|
||||
'variants'
|
||||
'version'
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
'-v[verbose mode (generate verbose messages)]' \
|
||||
'-d[debug mode (generate debugging messages)]' \
|
||||
'-q[quiet mode (suppress messages)]' \
|
||||
'-D[specify portdir]' \
|
||||
'-k[keep mode (do not autoclean after install)]' \
|
||||
'-n[dont follow dependencies in upgrade (only for upgrading)]' \
|
||||
'-a[upgrade all installed ports (only for upgrading)]' \
|
||||
'-u[uninstall non-active ports when upgrading and uninstalling]' \
|
||||
'-f[force mode (ignore state file)]' \
|
||||
'-s[source-only mode]' \
|
||||
'-b[binary-only mode]' \
|
||||
'-o[honor state files older than Portfile]' \
|
||||
'*::command:->command' \
|
||||
&& return 0
|
||||
|
||||
case "$state" in
|
||||
(command)
|
||||
if (( CURRENT == 1 )); then
|
||||
state='subcommands'
|
||||
else
|
||||
state='portname'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$state" in
|
||||
(subcommands)
|
||||
_describe -t commands 'port commands' subcmds
|
||||
;;
|
||||
(portname)
|
||||
_describe -t commands 'available ports' _port_list
|
||||
;;
|
||||
esac
|
||||
352
_portage
352
_portage
|
|
@ -1,352 +0,0 @@
|
|||
#compdef emerge ebuild quickpkg emaint env-update portageq repoman tbz2tool
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Portage (Gentoo source packages manager) utils.
|
||||
# TODO: Entropy (binary portage-compatible packages manager) support.
|
||||
# (equo, entropy-server, administrative scripts)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#<sys-apps/portage-2.1.4.4>
|
||||
# TODO: <sys-apps/portage-2.2_aplha*> (sets, some other candies)
|
||||
#
|
||||
# Status:
|
||||
# emerge (fully done)
|
||||
# ebuild (fully done)
|
||||
# emaint (fully done)
|
||||
# env-update (fully done)
|
||||
# portageq (fully done)
|
||||
# repoman (fully done)
|
||||
# tbz2tool (fully done)
|
||||
# xpak (nothing todo)
|
||||
|
||||
|
||||
# Stuff for ebuild
|
||||
_ebuild () {
|
||||
if (( CURRENT == 2 ));then
|
||||
_files -g \*.ebuild
|
||||
elif (( CURRENT > 2 ));then
|
||||
_values "ebuild command" \
|
||||
'clean[Cleans the temporary build directory]' \
|
||||
'help[Show help]' \
|
||||
'setup[Run all package specific setup actions and exotic system checks]' \
|
||||
'fetch[Fetch all necessary files]' \
|
||||
'digest[Creates a digest file for the package]' \
|
||||
'unpack[Extracts the sources to a subdirectory in the build directory]' \
|
||||
'compile[Compiles the extracted sources by running the src_compile()]' \
|
||||
'preinst[Run specific actions that need to be done before installation]' \
|
||||
'install[Installs the package to the temporary install directory]' \
|
||||
'postinst[Run specific actions that need to be done after installation]' \
|
||||
'qmerge[Installs the package to the filesystem]' \
|
||||
'merge[perform the following actions: fetch, unpack, compile, install and qmerge]' \
|
||||
'unmerge[Remove the installed files of the packages]' \
|
||||
'prerm[Run specific actions that need to be executed before unmerge]' \
|
||||
'postrm[Run specific actions that need to be executed after unmerge]' \
|
||||
'config[Run specific actions needed to be executed after the emerge process has completed]' \
|
||||
'package[This command is a lot like the merge command, but creates a .tbz2 package instead of installing]' \
|
||||
'manifest[Updates the manifest file for the package]' \
|
||||
'rpm[Builds a RedHat RPM package]'
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Stuff for quickpkg
|
||||
|
||||
_quickpkg () {
|
||||
if compset -P '(\\|)(>=|<=|<|>|=)'; then
|
||||
_arguments -s \
|
||||
'*:installed package:_gentoo_packages installed_versions'
|
||||
elif compset -P '(\\|)[/]'; then
|
||||
_path_files -W / -/
|
||||
else
|
||||
_arguments \
|
||||
'*:installed package:_gentoo_packages installed'
|
||||
fi
|
||||
}
|
||||
|
||||
# Stuff for emerge
|
||||
|
||||
_emerge () {
|
||||
local nopkg_opts all noask_opts bopts install_args common_args profiles
|
||||
|
||||
noask_opts=(-p -a --pretend --ask --regen --info --search -s --searchdesc \
|
||||
-S --version -V --help -h --metadata)
|
||||
|
||||
nopkg_opts=(--resume --skipfirst -c --clean -h --help --depclean --info \
|
||||
--metadata -P --prune --regen -s --search -S --searchdesc --sync -C \
|
||||
--unmerge -V --version -i --inject)
|
||||
|
||||
bopts=($nopkg_opts -b --buildpkg -B --buildpkgonly -G --getbinpkgonly -g \
|
||||
--getbinpkg -k --usepkg -K --usepkgonly --fetch-all-uri -f -F --fetchonly)
|
||||
|
||||
all=($bopts -l --changelog --columns --deep -D --emptytree -e --newuse \
|
||||
--noconfmem --nodeps -O --noreplace -n --oneshot -1 -o --onlydeps --tree -t \
|
||||
-u --update -U --upgradeonly)
|
||||
|
||||
common_args=(
|
||||
"($noask_opts --sync)"{-p,--pretend}'[Simply display what would be done]'
|
||||
"($noask_opts)"{-a,--ask}'[Ask what would be done]'
|
||||
'(-d --debug --help -h --version -V)'{-d,--debug}'[Tells emerge to run the emerge command in debug mode]'
|
||||
'(--quiet -q --verbose -v)'{-q,--quiet}'[General outcome is a reduced or condensed output]'
|
||||
'(--verbose -v --quiet -q)'{-v,--verbose}'[Tell emerge to run in verbose mode]'
|
||||
'--nospinner[Disables the spinner for the session]'
|
||||
)
|
||||
install_args=(
|
||||
"($bopts)"{-b,--buildpkg}'[Tells emerge to build binary packages]'
|
||||
"($bopts)"{-B,--buildpkgonly}'[Tells emerge to only build binary packages]'
|
||||
"($nopkg_opts --emptytree -e -l --changelog --usepkgonly -K)"{-l,--changelog}'[This will show the ChangeLog]'
|
||||
"($nopkg_opts -t --tree)--columns[Displays versions in aligned format]"
|
||||
"($nopkg_opts -D --deep)"{-D,--deep}'[Consider the entire dependency tree of packages]'
|
||||
"($nopkg_opts -e -l --changelog --emptytree)"{-e,--emptytree}'[Only consider glibc as installed packages]'
|
||||
"($all --nospinner --pretend -p)"{-i,--inject}'[Portage thinks that this package is installed]'
|
||||
"($nopkg_opts $bopts)"{-f,--fetchonly}'[Just perform fetches for all packages]'
|
||||
"($nopkg_opts $bopts)"{-F,--fetch-all-uri}'[Fetch all possible files for all packages]'
|
||||
"($bopts)"{-g,--getbinpkg}'[Tells emerge to download binary package]'
|
||||
"($bopts)"{-G,--getbinpkgonly}'[As --getbinpkg, but does not use local info]'
|
||||
"($nopkg_opts)--noconfmem[Causes portage to disregard merge records]"
|
||||
"($nopkg_opts -O --nodeps)"{-O,--nodeps}'[Merges specified packages without merging dependencies]'
|
||||
"($nopkg_opts -n --noreplace)"{-n,--noreplace}'[Skip packages already installed]'
|
||||
"($nopkg_opts)"{-1,--oneshot}'[Do not add package to the world profile]'
|
||||
"($nopkg_opts --onlydeps -o)"{-o,--onlydeps}'[Only merge (or pretend to merge) the dependencies]'
|
||||
"($nopkg_opts --columns -t --tree)"{-t,--tree}'[Show dependency tree]'
|
||||
"($nopkg_opts --update -u)"{-u,--update}'[Updates packages to the most recent version available]'
|
||||
"($nopkg_opts --upgradeonly -U)"{-U,--upgradeonly}'[Do not update packages to a lower version]'
|
||||
"($bopts)"{-k,--usepkg}'[Tells emerge to use binary packages if available]'
|
||||
"($bopts --changelog -l)"{-K,--usepkgonly}'[Tells emerge to use binary packages only]'
|
||||
"($all)"{-c,--clean}'[Cleans the system by removing packages]'
|
||||
'(: -)'{-h,--help}'[Displays help]:subject:(sync config system)'
|
||||
"(: $all)--depclean[Clean all packages that have no reason for being installed]"
|
||||
"(: $all $noask_opts --nospinner --quiet -q)--info[This is a list of information to include in bug reports]"
|
||||
'(: -)--metadata[Generate metadata]'
|
||||
"($nopkg_opts --usepkgonly -K)--newuse[Include installed packages which have changed USE flags]"
|
||||
"($all)"{-P,--prune}'[Removes all but the latest versions of matching packages]'
|
||||
"(: $all $noask_opts --verbose -v)--regen[Causes portage to check and update the dependency cache]"
|
||||
"(: $all $noask_opts --verbose -v)"{-s,--search}'[Searches for matches]'
|
||||
"(: $all $noask_opts --verbose -v)"{-S,--searchdesc}'[Matches the seachdesc string against the description field]'
|
||||
"(: $all --pretend -p)--sync[Initiates a portage tree update]"
|
||||
"($all)"{-C,--unmerge}'[Removes all matching packages]'
|
||||
'(: -)'{-V,--version}'[Display version info]'
|
||||
"(: $all[3,-1])--resume[Resumes the last merge operation]"
|
||||
"(: $all[3,-1])--skipfirst[Removes the first package in the resume list]"
|
||||
)
|
||||
profiles=(
|
||||
'world[All packages in the world profile]'
|
||||
'system[All packages in the system profile]'
|
||||
)
|
||||
|
||||
|
||||
# Dispatch
|
||||
if (( $words[(I)(--(unmerge|clean|prune)|-[[:alpha:]]#(C|c|P)[[:alpha:]]#)] )) ; then
|
||||
if compset -P '(\\|)(>=|<=|<|>|=)'; then
|
||||
_arguments -s \
|
||||
'*:installed package:_gentoo_packages installed_versions' && return 0
|
||||
else
|
||||
_arguments -s \
|
||||
"$common_args[@]" "$install_args[@]" \
|
||||
"*:installed package:_gentoo_packages installed" && return 0
|
||||
fi
|
||||
|
||||
elif (( $words[(I)(world|system)] )) ; then
|
||||
_arguments -s \
|
||||
"$common_args[@]" "$install_args[@]" \
|
||||
"($nopkg_opts[1,-2] --inject -i --oneshot -1):" && return 0
|
||||
|
||||
elif (( $words[(I)(--usepkgonly|-[[:alnum:]]#K[[:alnum:]]#)] )) ; then
|
||||
_arguments -s \
|
||||
"$common_args[@]" "$install_args[@]" \
|
||||
'*:binary package:_gentoo_packages binary' && return 0
|
||||
|
||||
elif [[ $words[-3] == (--help|-h) ]] ; then
|
||||
_message "No more arguments" && return 0
|
||||
|
||||
else
|
||||
if compset -P '(\\|)(>=|<=|<|>|=)'; then
|
||||
_arguments \
|
||||
"*:portage:_gentoo_packages available_versions" && return 0
|
||||
|
||||
elif (( $words[(I)(--inject|-i)] )) ; then
|
||||
_arguments -s \
|
||||
"$common_args[@]" "$install_args[@]" \
|
||||
"*:portage:_gentoo_packages available_versions" && return 0
|
||||
else
|
||||
_arguments -s \
|
||||
"$common_args[@]" "$install_args[@]" \
|
||||
"($nopkg_opts)::portage: _values 'profile' \$profiles[@] " \
|
||||
"($nopkg_opts)::portage:_gentoo_packages sets " \
|
||||
"($nopkg_opts)*:portage:_gentoo_packages available" && return 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_emaint () {
|
||||
_arguments -s \
|
||||
'(: -)'{-h,--help}'[show help message and exit]' \
|
||||
'(: -)'--version"[show program's version number and exit]" \
|
||||
'(-c --check -f --fix)'{-c,--check}"[Check for any problems that may exist]:emaint:((all\:'check all' world\:'check only world file'))" \
|
||||
'(-c --check -f --fix)'{-f,--fix}"[Fix any problems that may exist]:emaint:((all\:'check all' world\:'check only world file'))"
|
||||
}
|
||||
|
||||
|
||||
_env-update () {
|
||||
_arguments -s '(: -)--no-ldconfig[Do not run ldconfig]'
|
||||
}
|
||||
|
||||
|
||||
_portageq () {
|
||||
local action
|
||||
|
||||
action="$words[2]"
|
||||
|
||||
if (( CURRENT == 2 )); then
|
||||
_values 'command' \
|
||||
'--help[Show help]' \
|
||||
'config_protect_mask[Returns the CONFIG_PROTECT_MASK paths]' \
|
||||
'config_protect[Returns the CONFIG_PROTECT paths]' \
|
||||
'portdir[Returns PORTDIR paths]' \
|
||||
'contents[List the files that are installed for a given package]' \
|
||||
'vdb_path[Returns the path used for the var(installed) package database]' \
|
||||
'gentoo_mirrors[Returns the mirrors set to use in the portage configuration]' \
|
||||
'exithandler[MISSING DOCUMENTATION!]' \
|
||||
'all_best_visible[Returns all best_visible packages (without .ebuild)]' \
|
||||
'match[Returns a \n separated list of category/package-version]' \
|
||||
'metadata[Returns metadata values for the specified package]' \
|
||||
'best_visible[Returns category/package-version (without .ebuild)]' \
|
||||
'mass_best_visible[Returns category/package-version (without .ebuild)]' \
|
||||
"has_version[Return code 0 if it's available, 1 otherwise]" \
|
||||
'envvar[Returns a specific environment variable as exists prior to ebuild.sh]' \
|
||||
'pkgdir[Returns the PKGDIR path]' \
|
||||
'best_version[Returns category/package-version (without .ebuild)]' \
|
||||
'mass_best_version[Returns category/package-version (without .ebuild)]' \
|
||||
'portdir_overlay[Returns the PORTDIR_OVERLAY path]' \
|
||||
'distdir[Returns the DISTDIR path]' \
|
||||
'owners[print the packages that own the files and which files belong to each package]'
|
||||
elif (( CURRENT == 3 )); then
|
||||
if [[ "$action" =~ (contents|(all_|mass_|)best_visible|match|metadata|(has|best)_version|owners|mass_best_version) ]]; then
|
||||
_arguments -s '*:root:_files'
|
||||
fi
|
||||
elif (( CURRENT > 3 )); then
|
||||
if [[ "$action" =~ ((mass_|)best_(visible|version)|has_version) ]]; then
|
||||
_arguments -s '*:package:_gentoo_packages available'
|
||||
elif [[ "$action" == owners ]]; then
|
||||
_arguments -s '*:root:_files'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_repoman () {
|
||||
local previous
|
||||
|
||||
previous="$words[CURRENT-1]"
|
||||
|
||||
_arguments -s \
|
||||
'(--force)'--force'[Force commit to proceed, regardless of QA issues]' \
|
||||
'(-q --quiet -v --verbose)'{-q,--quiet}'[Be less verbose about extraneous info]' \
|
||||
'(-p --pretend -m --commitmsg -M --commitmsgfile)'{-p,--pretend}'[Don’t commit or fix anything; just show what would be done]' \
|
||||
'(-i --include-masked)'{-i,--include-masked}'[Include masked packages in scans at category or tree level]' \
|
||||
'(-x --xmlparse)'{-x,--xmlparse}'[Forces the metadata.xml parse check to be carried out]' \
|
||||
'(-q --quiet -v --verbose)'{-v,--verbose}'[Displays every package name while checking]' \
|
||||
'(-I --ignore-arches)'{-I,--ignore-arches}'[Ignore arch-specific failures (where arch != host)]' \
|
||||
'(-m --commitmsg -M --commitmsgfile)'{-m,--commitmsg}'[Adds a commit message via the command line]:message:' \
|
||||
'(-m --commitmsg -M --commitmsgfile)'{-M,--commitmsgfile}'[Adds a commit message from the specified file]:commit_file:_files' \
|
||||
'(: -)'{-V,--version}'[Show version info]' \
|
||||
'(: -)'{-h,--help}'[Show this screen]'
|
||||
|
||||
# if we don't have an option that cancel action, or if we don't already have an action.
|
||||
if ! [[ "$previous" =~ (-h|-V|-m|-M|--version|--help|--commitmsg|--commitmsgfile) ]] &&
|
||||
! (( $words[(I)(full|last|help|scan|fix|lfull|manifest|commit)] )); then
|
||||
_values 'action' \
|
||||
'full[Scan directory tree for QA issues (full listing)]' \
|
||||
'last[Remember report from last run]' \
|
||||
'help[Show this screen]' \
|
||||
'scan[Scan directory tree for QA issues (short listing)]' \
|
||||
'fix[Fix simple QA issues (stray digests, missing digests)]' \
|
||||
'lfull[Remember report from last run (full listing)]' \
|
||||
'manifest[Generate a Manifest (fetches files if necessary)]' \
|
||||
'commit[Scan directory tree for QA issues; if OK, commit via cvs]'
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
_tbz2tool () {
|
||||
if (( CURRENT == 2 )); then
|
||||
_values 'action' 'join' 'split'
|
||||
elif (( CURRENT > 2 )) && (( CURRENT < 6 )); then
|
||||
_arguments -s '*:file:_files'
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
zparseopts -D -E -A Args -- -emerge
|
||||
if (( ${+Args[--emerge]} ));then
|
||||
_emerge "$@" && return 0
|
||||
fi
|
||||
|
||||
case "$service" in
|
||||
emerge)
|
||||
_emerge "$@" && return 0
|
||||
;;
|
||||
ebuild)
|
||||
_ebuild "$@" && return 0
|
||||
;;
|
||||
quickpkg)
|
||||
_quickpkg "$@" && return 0
|
||||
;;
|
||||
emaint)
|
||||
_emaint "$@" && return 0
|
||||
;;
|
||||
env-update)
|
||||
_env-update "$@" && return 0
|
||||
;;
|
||||
portageq)
|
||||
_portageq "$@" && return 0
|
||||
;;
|
||||
repoman)
|
||||
_repoman "$@" && return 0
|
||||
;;
|
||||
tbz2tool)
|
||||
_tbz2tool "$@" && return 0
|
||||
;;
|
||||
esac
|
||||
189
_portage_utils
189
_portage_utils
|
|
@ -1,189 +0,0 @@
|
|||
#compdef qatom qcheck qdepends qfile qgrep qcache qlist qlop qsearch qsize quse qtbz2 qpkg qxpak
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Portage Utils (small and faster portage helper tools,
|
||||
# writen in C, partially — Gentoolkit analog).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vadim A. Misbakh-Soloviev <mva@mva.name>
|
||||
# * Bapt <bapt@tuxfamily.org>
|
||||
# * kaworu <kaworu@kaworu.ch>
|
||||
# * David Durrleman <dualmoo@gmail.com>
|
||||
# * oberyno <oberyno@gmail.com>
|
||||
# * Mamoru Komachi <usata@usata.org>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
#<app-portage/portage-utils-0.19>
|
||||
#
|
||||
|
||||
local common_args PORTDIR
|
||||
var=PORTDIR
|
||||
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
|
||||
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
|
||||
[[ -z ${(P)var} && -r /etc/make.globals ]] &&
|
||||
local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
|
||||
common_args=(
|
||||
{'(--verbose)-v','(-v)--verbose'}'[Make a lot of noise]' \
|
||||
{'(--quiet)-q','(-q)--quiet'}'[Tighter output; suppress warnings]' \
|
||||
{'(--nocolor)-C','(-C)--nocolor'}'[Do not output color]' \
|
||||
{'(--help)-h','(-h)--help'}'[Print this help and exit]' \
|
||||
{'(--version)-V','(-V)--version'}'[Print version and exit]' \
|
||||
)
|
||||
case $service in
|
||||
qcheck)
|
||||
_arguments -s $common_args \
|
||||
{'(--all)-a','(-a)--all'}'[List all packages]' \
|
||||
{'(--update)-u','(-u)--update'}'[Update chksum and mtimes for packages]' \
|
||||
'*:packages:_gentoo_packages installed'
|
||||
;;
|
||||
qdepends)
|
||||
_arguments -s $common_args \
|
||||
{'(--depend)-d','(-d)--depend'}'[Show DEPEND info (default)]' \
|
||||
{'(--rdepend)-r','(-r)--rdepend'}'[Show RDEPEND info]' \
|
||||
{'(--pdepend)-p','(-p)--pdepend'}'[Show PDEPEND info]' \
|
||||
{'(--key)-k','(-k)--key'}'[User defined vdb key]' \
|
||||
{'(--query)-Q','(-Q)--query'}'[Query reverse deps]' \
|
||||
{'(--name-only)-N','(-N)--name-only'}'[Only show package name]' \
|
||||
{'(--all)-a','(-a)--all'}'[Show all DEPEND info]' \
|
||||
'*:packages:_gentoo_packages installed'
|
||||
;;
|
||||
qfile)
|
||||
_arguments -s $common_args \
|
||||
{'(--exact)-e','(-e)--exact'}'[Exact match]' \
|
||||
'*:filename:_files'
|
||||
;;
|
||||
qgrep)
|
||||
_arguments -s $common_args \
|
||||
{'(--invert-match)-I','(-I)--invert-match'}'[Select non-matching lines]' \
|
||||
{'(--ignore-case)-i','(-i)--ignore-case'}'[Ignore case distinctions]' \
|
||||
{'(--with-filename)-H','(-H)--with-filename'}'[Print the filename for each match]' \
|
||||
{'(--count)-c','(-c)--count'}'[Only print a count of matching lines per FILE]' \
|
||||
{'(--regexp)-e','(-e)--regexp'}'[Use PATTERN as a regular expression]' \
|
||||
'*:pattern::'
|
||||
;;
|
||||
qcache)
|
||||
local arches allarches arch
|
||||
show_archs(){
|
||||
arches=(${(f)"$(<$PORTDIR/profiles/arch.list)"})
|
||||
allarches=($archs)
|
||||
for arch in $arches;do
|
||||
allarches=($allarches $arch)
|
||||
done
|
||||
_describe -t available-arches "arch" allarches
|
||||
}
|
||||
_arguments -s $common_args \
|
||||
'*:arch:show_archs'
|
||||
;;
|
||||
qlist)
|
||||
_arguments -s $common_args \
|
||||
{'(--installed)-I','(-I)--installed'}'[Just show installed packages]' \
|
||||
{'(--slots)-S','(-S)--slots'}'[Display installed packages with slots]' \
|
||||
{'(--umap)-U','(-U)--umap'}'[Display installed packages with flags used]' \
|
||||
{'(--dups)-D','(-D)--dups'}'[Only show package dups]' \
|
||||
{'(--exact)-e','(-e)--exact'}'[Exact match (only CAT/PN or PN without PV)]' \
|
||||
{'(--all)-a','(-a)--all'}'[Show every installed package]' \
|
||||
{'(--dir)-d','(-d)--dir'}'[Only show directories]' \
|
||||
{'(--obj)-o','(-o)--obj'}'[Only show objects]' \
|
||||
{'(--sym)-s','(-s)--sy'}'[Only show symlinks]' \
|
||||
'*:packages:_gentoo_packages installed'
|
||||
;;
|
||||
qlop)
|
||||
_arguments -s $common_args \
|
||||
{'(--guage)-g','(-g)--guage'}'[Guage number of times a package has been merged]' \
|
||||
{'(--time)-t','(-t)--time'}'[Calculate merge time for a specific package]' \
|
||||
{'(--human)-H','(-H)--human'}'[Print seconds in human readable format (needs -t)]' \
|
||||
{'(--list)-l','(-l)--list'}'[Show merge history]' \
|
||||
{'(--unlist)-u','(-u)--unlist'}'[Show unmerge history]' \
|
||||
{'(--sync)-s','(-s)--sync'}'[Show sync history]' \
|
||||
{'(--current)-c','(-c)--current'}'[Show current emerging packages]' \
|
||||
{'(--logfile)-f','(-f)--logfile'}'[Read emerge logfile instead of /var/log/emerge.log]:log:_files' \
|
||||
'*:packages:_gentoo_packages available'
|
||||
;;
|
||||
qsearch)
|
||||
_arguments -s $common_args \
|
||||
{'(--all)-a','(-a)--all'}'[List the descriptions of every package in the cache]' \
|
||||
{'(--cache)-c','(-c)--cache'}'[Use the portage cache]' \
|
||||
{'(--search)-s','(-s)--search'}'[Regex search package basenames]' \
|
||||
{'(--desc)-S','(-S)--desc'}'[Regex search package descriptions]' \
|
||||
{'(--name-only)-N','(-N)--name-only'}'[Only show package name]' \
|
||||
{'(--homepage)-H','(-H)--homepage'}'[Show homepage info]' \
|
||||
'*:pattern::'
|
||||
;;
|
||||
qsize)
|
||||
_arguments -s $common_args \
|
||||
{'(--filesystem)-f','(-f)--filesystem'}'[Show size used on disk]' \
|
||||
{'(--all)-a','(-a)--all'}'[Size all installed packages]' \
|
||||
{'(--sum)-s','(-s)--sum'}'[Include a summary]' \
|
||||
{'(--sum-only)-S','(-S)--sum-only'}'[Show just the summary]' \
|
||||
{'(--megabyte)-m','(-m)--megabyte'}'[Display size in megabytes]' \
|
||||
{'(--kilobyte)-k','(-k)--kilobyte'}'[Display size in kilobytes]' \
|
||||
{'(--byte)-b','(-b)--byte'}'[Display size in bytes]' \
|
||||
'*:packages:_gentoo_packages installed'
|
||||
;;
|
||||
quse)
|
||||
_arguments -s $common_args \
|
||||
{'(--exact)-e','(-e)--exact'}'[Show exact non regexp matching using strcmp]' \
|
||||
{'(--all)-a','(-a)--all'}'[Show annoying things in IUSE]' \
|
||||
{'(--keywords)-K','(-K)--keywords'}'[Use the KEYWORDS vs IUSE]' \
|
||||
{'(--license)-L','(-L)--license'}'[Use the LICENSE vs IUSE]' \
|
||||
{'(--describe)-D','(-D)--describe'}'[Describe the USE flag]' \
|
||||
{'(--name-only)-N','(-N)--name-only'}'[Only show package name]' \
|
||||
'*:use flag:_gentoo_packages useflag'
|
||||
;;
|
||||
qtbz2)
|
||||
_arguments -s $common_args \
|
||||
{'(--join -s --split -t --tarbz2 -x --xpak)-j','(-t --tarbz2 -j -s --split -x --xpak)--join'}'[Join tar.bz2 + xpak into a tbz2]:*:tar.bz2 file and xpak file:_files -g \*.\(tar.bz2\|xpak\)' \
|
||||
{'(--join -j --split -t --tarbz2 -x --xpak)-s','(-t --tarbz2 -j --join -s -x --xpak)--split'}'[Split a tbz2 into a tar.bz2 + xpak]:tbz2 file:_files -g \*.tbz2' \
|
||||
{'(--join -j -s --split --tarbz2 -x --xpak)-t','(--join -j -s --split -t -x --xpak)--tarbz2'}'[Just split the tar.bz2]:tbz2 file:_files -g \*.tbz2' \
|
||||
{'(--join -j -s --split -t --tarbz2 --xpak)-x','(--join -j -s --split -t --tarbz2 -x)--xpak'}'[Just split the xpak]:tbz2 file:_files -g \*.tbz2' \
|
||||
{'(--stdout)-O','(-O)--stdout'}'[Write files to stdout]'
|
||||
;;
|
||||
qpkg)
|
||||
_arguments -s $common_args \
|
||||
{'(--pretend)-p','(-p)--pretend'}'[pretend only]' \
|
||||
{'(--pkgdir)-P','(-P)--pkgdir'}'[alternate package directory]:alternate pkgdir:_files -/' \
|
||||
'*:Installed packages:_gentoo_packages installed_versions'
|
||||
;;
|
||||
qxpak)
|
||||
_arguments -s $common_args \
|
||||
{'(--list --extract -x --create -c)-l','(-l --extract -x --create -c)--list'}'[List the contents of an archive]:xpak archive:_files -g \*.xpak' \
|
||||
{'(--list -l --extract --create -c)-x','(--list -l -x --create -c)--extract'}'[Extract the contents of an archive]:xpak archive:_files -g \*.xpak' \
|
||||
{'(--list -l --extract -x --create)-c','(--list -l --extract -x -c)--create'}'[Create an archive of a directory/files]:*:archive name and files to archive:_files' \
|
||||
{'(--dir)-d','(-d)--dir'}'[Change to specified directory]:directory:_files -/' \
|
||||
{'(--stdout)-O','(-O)--stdout'}'[Write files to stdout]'
|
||||
|
||||
;;
|
||||
esac
|
||||
118
_rvm
118
_rvm
|
|
@ -1,118 +0,0 @@
|
|||
#compdef rvm
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for rvm (https://rvm.beginrescueend.com/).
|
||||
#
|
||||
# Source: https://github.com/wayneeseguin/rvm/blob/master/scripts/zsh/Completion/_rvm
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line cmds ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'(-l|--level)'{-l,--level}'+[patch level to use with rvm use / install]:number' \
|
||||
'(--prefix)--prefix[path for all rvm files (~/.rvm/), with trailing slash!]:path:_files' \
|
||||
'(--bin)--bin[path for binaries to be placed (~/.rvm/bin/)]:path:_files' \
|
||||
'(--source)--source[src directory to use (~/.rvm/src/)]:path:_files' \
|
||||
'(--archives)--archives[directory for downladed files (~/.rvm/archives/)]:path:_files' \
|
||||
'-S[Specify a script file to attempt to load and run (rubydo)]:file:_files' \
|
||||
'-e[Execute code from the command line]:code' \
|
||||
'(-G)-G[root gem path to use]:path:_files' \
|
||||
'(--gems)--gems[Used to set the gems_flag, use with remove to remove gems]' \
|
||||
'(--archive)--archive[Used to set the archive_flag, use with remove to remove archive]' \
|
||||
'(--patch)--patch[With MRI Rubies you may specify one or more full paths to patches]' \
|
||||
'(-C|--configure)'{-C,--configure}'=[custom configure options]' \
|
||||
'(--nice)--nice[process niceness (for slow computers, default 0)]:number' \
|
||||
'(--ree)--ree-options[Options passed directly to ree ./installer on the command line]:options' \
|
||||
'(--head)--head[with update, updates rvm to git head version]' \
|
||||
'(--rubygems)--rubygems[with update, updates rubygems for selected ruby]' \
|
||||
'(--default)--default[with ruby select, sets a default ruby for new shells]' \
|
||||
'(--debug)--debug[Toggle debug mode on for very verbose output]' \
|
||||
'(--trace)--trace[Toggle trace mode on to see EVERYTHING rvm is doing]' \
|
||||
'(--force)--force[Force install, removes old install & source before install]' \
|
||||
'(--summary)--summary[Used with rubydo to print out a summary of the commands run]' \
|
||||
'(--latest)--latest[with gemset --dump skips version strings for latest gem]' \
|
||||
'(--gems)--gems[with uninstall/remove removes gems with the interpreter]' \
|
||||
'(--docs)--docs[with install, attempt to generate ri after installation]' \
|
||||
'(--reconfigure)--reconfigure[Force ./configure on install even if Makefile already exists]' \
|
||||
'1: :->cmds' \
|
||||
'*: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
|
||||
cmds)
|
||||
|
||||
cmds=( ${(f)"$(_call_program commands rvm help 2> /dev/null | sed -e '/^== Action/,/^== Implementation/!d; / - /!d; s/^[ *]*\([^ ]*\) *\- *\(.*\)/\1:\2/')"} )
|
||||
cmds+=( $(rvm list strings) )
|
||||
_describe -t commands 'rvm command' cmds && ret=0
|
||||
;;
|
||||
|
||||
args)
|
||||
|
||||
case $line[1] in
|
||||
|
||||
(use|uninstall|remove|list)
|
||||
|
||||
if (( CURRENT == 3 )); then
|
||||
# See if we’ve made it to the ‘@’; eg, 1.9.2@
|
||||
if ! \grep -q '@' <<< "${line[CURRENT-1]}" ; then
|
||||
_values -S , 'rubies' \
|
||||
$(rvm list strings | sed -e 's/ruby-\([^) ]*\)-\([^) ]*\)/ruby-\1-\2 \1-\2 \1/g') \
|
||||
default system $(rvm alias list | cut -d' ' -f1) && ret=0
|
||||
else
|
||||
# Construct a full version string for each of the gemsets.
|
||||
# Eg, 1.9.2@min 1.9.2@rail3 …
|
||||
_values -S , 'gemsets' \
|
||||
$(rvm ${line[CURRENT-1]%%@*} gemset list | awk '/^[ -_[:alnum:]]+$/ {print "'${line[CURRENT-1]%%@*}'@"$1}')
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
(install|fetch)
|
||||
|
||||
_values -S , 'rubies' $(rvm list known_strings) && ret=0
|
||||
;;
|
||||
|
||||
gemset)
|
||||
|
||||
if (( CURRENT == 3 )); then
|
||||
_values 'gemset_commands' $(rvm gemset | sed -e '/create/!d; s/^.*[{]\(.*\)[}].*$/\1/; s/,/ /g')
|
||||
else
|
||||
#_values -S , 'gemsets' $(rvm gemset list | \grep -v gemset 2>/dev/null)
|
||||
_values -S , 'gemsets' $(rvm gemset list | \grep -Ev '(gemset|info)' 2>/dev/null | awk '/^[ -_[:alnum:]]+$/ {print '$1'}')
|
||||
fi
|
||||
ret=0
|
||||
;;
|
||||
|
||||
package)
|
||||
|
||||
if (( CURRENT == 3 )); then
|
||||
_values 'package_commands' $(rvm package | sed -e '/Usage/!d; s/^.*[{]\(.*\)[}] [{].*$/\1/; s/,/ /g')
|
||||
else
|
||||
_values 'packages' $(rvm package | sed -e '/Usage/!d; s/^.*[}] [{]\(.*\)[}].*$/\1/; s/,/ /g')
|
||||
fi
|
||||
ret=0
|
||||
;;
|
||||
|
||||
*)
|
||||
(( ret )) && _message 'no more arguments'
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
79
_showoff
79
_showoff
|
|
@ -1,79 +0,0 @@
|
|||
#compdef showoff
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Showoff (https://github.com/schacon/showoff).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line cmds ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :->cmds' \
|
||||
'*: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
cmds=(
|
||||
'add:Add a new slide at the end in a given dir'
|
||||
'new:Add a new slide at the end in a given dir'
|
||||
'create:Create new showoff presentation'
|
||||
'init:Create new showoff presentation'
|
||||
'help:Shows list of commands or help for one command'
|
||||
'heroku:Setup your presentation to serve on Heroku'
|
||||
'serve:Serves the showoff presentation in the current directory'
|
||||
'static:Generate static version of presentation'
|
||||
)
|
||||
_describe -t commands 'showoff command' cmds && ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
(add|new)
|
||||
_arguments \
|
||||
'(-d --dir)'{-d,--dir}'=[Slide dir (where to put a new slide file)]:directory:_files' \
|
||||
'(-n --name)'{-n,--name}'=[Slide name (name of the new slide file)]:basename' \
|
||||
{-s,--source}'=[Include code from the given file as the slide body]:file:_files' \
|
||||
'(-t --style --type)'{-t,--style,--type}'=[Slide Type/Style (default: title)]:style' \
|
||||
'(-u --no-number)'{-u,--no-number}'[Dont number the slide, use the given name verbatim]' \
|
||||
'1:title' && ret=0
|
||||
;;
|
||||
(create|init)
|
||||
_arguments \
|
||||
'(-d --slidedir)'{-d,--slidedir}'=[Sample slide directory name (default: one)]:arg' \
|
||||
'(-n --nosamples)'{-n,--nosamples}'=[Dont create sample slides]' \
|
||||
'1:dir_name' && ret=0
|
||||
;;
|
||||
help)
|
||||
_values 'commands' add new create init help heroku serve static && ret=0
|
||||
;;
|
||||
heroku)
|
||||
_message 'please entrer an heroku_name' && ret=0
|
||||
;;
|
||||
serve)
|
||||
_arguments \
|
||||
'(-h --host)'{-h,--host}'=[Host or ip to run on (default: localhost)]:host' \
|
||||
'(-p --port)'{-p,--port}'=[Port on which to run (default: 9090)]:port' \
|
||||
'1:title' && ret=0
|
||||
;;
|
||||
static)
|
||||
_message 'please entrer a name' && ret=0
|
||||
;;
|
||||
*)
|
||||
(( ret )) && _message 'no more arguments'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
110
_smartmontools
110
_smartmontools
|
|
@ -1,110 +0,0 @@
|
|||
#compdef smartctl smartd
|
||||
# ------------------------------------------------------------------------------
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for smartmontools (http://smartmontools.sourceforge.net).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_smartctl() {
|
||||
local context state line expl
|
||||
local -A opt_args
|
||||
|
||||
_arguments -A "-*" \
|
||||
'(-h --help --usage)'{-h,--help,--usage}'[Show help message]' \
|
||||
'(-V --version --copyright --license)'{-v,--version,--copyright,--license}'[Print license, copyright, and version information and exit]' \
|
||||
'(-i --info)'{-i,--info}'[Show identity information for device]' \
|
||||
'(-a --all)'{-a,--all}"[Show all SMART information for device]" \
|
||||
'(-x --xall)'{-xa,--xall}"[Show all information for device]" \
|
||||
'--scan[Scan for devices]' \
|
||||
'--scan-open[Scan for devices and try to open each device]' \
|
||||
\
|
||||
'(-q --quietmode)'{-q,--quietmode}'[Set smartctl quiet mode]:TYPE:(errorsonly silent noserial)' \
|
||||
'(-d --device)'{-d,--device}'[Specify device type]:TYPE:(ata scsi sat usbcypress usbjmicron usbsunplus marvell areca 3ware hpt megaraid cciss auto test)' \
|
||||
'(-T --tolerance)'{-T,--tolerance}'[Set tolerance]:TOLERANCE:(normal conservative permissive verypermissive)' \
|
||||
'(-b --badsum)'{-q,--badsum}'[Set action on bad checksum]:TYPE:(warn exit ignore)' \
|
||||
'(-r --report)'{-r,--report}'[Report transactions]:TYPE:' \
|
||||
'(-n --nocheck)'{-n,--nocheck}'[No check if MODE]:MODE:(never sleep standby idle)' \
|
||||
\
|
||||
'(-s --smart)'{-s,--smart}'[Enable/disable SMART on device]:VALUE:(on off)' \
|
||||
'(-o --offlineauto)'{-s,--smart}'[Enable/disable automatic offline testing on device]:VALUE:(on off)' \
|
||||
'(-S --saveauto)'{-S,--saveauto}'[Enable/disable attribute autosave on device]:VALUE:(on off)' \
|
||||
\
|
||||
'(-H --health)'{-h,--health}'[Show device SMART health status]' \
|
||||
'(-c --capabilities)'{-c,--capabilities}'[Show device SMART capabilities]' \
|
||||
'(-A --attributes)'{-A,--attributes}'[Show device SMART vendor-specific attributes and values]' \
|
||||
'(-f --format)'{-f,--format}'[Set output format for attributes]:FORMAT:(old brief)' \
|
||||
'(-l --log)'{-l,--log}'[Show device log]:TYPE:(error selftest selective directory background sasphy sataphy scttemp scterc gplog smartlog xerror xselftest)' \
|
||||
'(-v --vendorattribute)'{-v,--vendorattribute}'[Set display option for vendor attribute]:N,OPTION:' \
|
||||
'(-F --firmwarebug)'{-F,--firmwarebug}'[Use firmware bug workaround]:TYPE:(none samsung samsung2 samsung3 swapid)' \
|
||||
'(-P --presets)'{-P,--presets}'[Drive-specific presets]:TYPE:(use ignore show showall)' \
|
||||
'(-B --drivedb)'{-B,--drivedb}'[Read and replace drive database from file]:FILE:_files' \
|
||||
\
|
||||
'(-t --test)'{-t,--test}'[Run test]:TEST:(offline short long conveyance vendor select pending afterselect,on afterselect,off scttempint)' \
|
||||
'(-C --captive)'{-C,--captive}'[Do test in captive mode]' \
|
||||
'(-X --abort)'{-X,--abort}'[Abort any non-captive test on device]' \
|
||||
\
|
||||
'1:Device:_files'
|
||||
}
|
||||
|
||||
_smartd() {
|
||||
local context state line expl
|
||||
local -A opt_args
|
||||
|
||||
_arguments -A "-*" \
|
||||
'(-h --help --usage)'{-h,--help,--usage}'[Show help message]' \
|
||||
'(-V --version --copyright --license)'{-v,--version,--copyright,--license}'[Print license, copyright, and version information and exit]' \
|
||||
\
|
||||
'(-A --attributelog)'{-A,--attributelog}'[Log ATA attribute information to {PREFIX}MODEL-SERIAL.ata.csv]:PREFIX:' \
|
||||
'(-B --drivedb)'{-B,--drivedb}'[Read and replace drive database from file]:FILE:_files' \
|
||||
'(-c --configfile)'{-c,--configfile}'[Read configuration file or stdin]:FILE:_files' \
|
||||
'(-d --debug)'{-d,--debug}'[Start smartd in debug mode]' \
|
||||
'(-D --showdirectives)'{-D,--showdirectives}'[Print the configuration file directives and exit]' \
|
||||
'(-i --interval)'{-i,--interval}'[Set interval between disk checks to N seconds, where N >= 10]:Seconds >= 10:' \
|
||||
'(-l --logfacility)'{-l,--logfacility}'[Use syslogfacility local0 - local7 or daemon]:FACILITY:(local0 local1 local2 local3 local4 local5 local6 local7)' \
|
||||
'(-n --no-fork)'{-n,--no-fork}'[Do not fork into background]' \
|
||||
'(-p --pidfile)'{-p,--pidfile}'[Write PID file]:FILE:_files' \
|
||||
'(-q --quit)'{-q,--quit}'[Quit on...]:WHEN:(nodev errors nodevstartup never onecheck showtests)' \
|
||||
'(-r --report)'{-r,--report}'[Report transactions for...]:TYPE:(ioctl ataioctl scsiioctl)' \
|
||||
'(-s --savestates)'{-s,--savestates}'[Save disk states to {PREFIX}MODEL-SERIAL.TYPE.state]:TYPE:'
|
||||
}
|
||||
|
||||
_smartmontools() {
|
||||
local ret=1
|
||||
_call_function ret _$service
|
||||
return ret
|
||||
}
|
||||
|
||||
_smartmontools "$@"
|
||||
63
_srm
63
_srm
|
|
@ -1,63 +0,0 @@
|
|||
#compdef srm
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for srm.
|
||||
#
|
||||
# It is based on the rm completion script from Zsh.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
declare -a opts args
|
||||
args=(
|
||||
'(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]'
|
||||
'(-r --interactive)'{-i,--interactive}'[prompt before any removal]'
|
||||
'(-r -R --recursive)'{-r,-R,--recursive}'[remove the contents of directories recursively]'
|
||||
'(-s --simple)'{-s,--simple}'[only overwrite with a single pass of random data]'
|
||||
'(-v --verbose)'{-v,--verbose}'[explain what is being done]'
|
||||
'(- *)--help[display help message and exit]'
|
||||
'(- *)--version[output version information and exit]'
|
||||
'*::files:->file'
|
||||
)
|
||||
|
||||
if _pick_variant gnu=gnu unix --help; then
|
||||
args+=(
|
||||
'(-x --one-file-system)'{-x,--one-file-system}'[stay within filesystems of files given as arguments]'
|
||||
'(-P --openbsd)'{-P,--openbsd}'[overwrite the file 3 times (0xff, 0x00, 0xff)]'
|
||||
'(-D --dod)'{-D,--dod}'[overwrite the file with 7 US DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random)]'
|
||||
'(-E --doe)'{-E,--doe}'[overwrite the file with 3 US DoE compliant passes (random, random, DoE)]'
|
||||
)
|
||||
else
|
||||
args+=(
|
||||
'(-m --medium)'{-m,--medium}'[overwrite the file with 7 US DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random)]'
|
||||
'(-z --zero)'{-z,--zero}'[after overwriting, zero blocks used by file]'
|
||||
'(-n --nounlink)'{-n,--nounlink}'[overwrite file, but do not rename or unlink it]'
|
||||
)
|
||||
fi
|
||||
|
||||
local curcontext=$curcontext state line ret=1
|
||||
declare -A opt_args
|
||||
|
||||
_arguments -s -S -C $opts \
|
||||
$args && ret=0
|
||||
|
||||
case $state in
|
||||
(file)
|
||||
declare -a ignored
|
||||
ignored=()
|
||||
((CURRENT > 1)) &&
|
||||
ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
|
||||
((CURRENT < $#line)) &&
|
||||
ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
|
||||
_files -F ignored && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
451
_symfony
451
_symfony
|
|
@ -1,451 +0,0 @@
|
|||
#compdef symfony
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Symfony (http://www.symfony-project.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * aki77 (https://github.com/aki77)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_symfony () {
|
||||
local curcontext="$curcontext" state line expl ret=1 cache_version
|
||||
|
||||
cache_version=$(_get_sf_cache_var version)
|
||||
(( ${(P)+cache_version} == 0 )) && {
|
||||
eval $cache_version=${${${(z)$($service -V)}[3]}%.*}
|
||||
}
|
||||
|
||||
if [ ${(P)cache_version} = "1.0" ] ; then
|
||||
_symfony10
|
||||
return
|
||||
fi
|
||||
|
||||
_arguments -C \
|
||||
'(-T --tasks)'{-T,--tasks}'[list of the symfony tasks]' \
|
||||
'(-V --version)'{-V,--version}'[version]' \
|
||||
'1: :->tasks' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
tasks)
|
||||
_sf_tasks
|
||||
;;
|
||||
args)
|
||||
local task args
|
||||
|
||||
task=$words[1]
|
||||
args=(
|
||||
${${${${${(M)${${${(z)${${"$($service help $task)"#*Usage:}#[[:cntrl:]]}%%[[:cntrl:]]*}//\[/}//\]/}:#--*}%%\"*}/=/"=-"}/(#b)--(app|application)=-/--$match[1]=-:application:_sf_apps}//(#b)--(env|environment)=-/--$match[1]=-:environment:_sf_environments}
|
||||
)
|
||||
|
||||
case $task in
|
||||
help)
|
||||
args+=(
|
||||
':task:_sf_tasks'
|
||||
)
|
||||
;;
|
||||
|
||||
app:routes)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':"route name":'
|
||||
)
|
||||
;;
|
||||
|
||||
configure:author)
|
||||
_message 'project author'
|
||||
;;
|
||||
|
||||
configure:database)
|
||||
_message 'database dsn'
|
||||
;;
|
||||
|
||||
generate:app)
|
||||
_message 'new application name'
|
||||
;;
|
||||
|
||||
generate:module)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':"new module name":'
|
||||
)
|
||||
;;
|
||||
|
||||
generate:project)
|
||||
_message 'new project name'
|
||||
;;
|
||||
|
||||
generate:task)
|
||||
_message 'new task name'
|
||||
;;
|
||||
|
||||
i18n:extract)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':"target culture":'
|
||||
)
|
||||
;;
|
||||
|
||||
i18n:find)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
)
|
||||
;;
|
||||
|
||||
log:rotate)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':environment:_sf_environments'
|
||||
)
|
||||
;;
|
||||
|
||||
plugin:add-channel)
|
||||
_message 'channel name'
|
||||
;;
|
||||
|
||||
plugin:install)
|
||||
_message 'plugin name'
|
||||
;;
|
||||
|
||||
plugin:publish-assets)
|
||||
args+=(
|
||||
':plugin:_sf_plugins'
|
||||
)
|
||||
;;
|
||||
|
||||
plugin:uninstall)
|
||||
_message 'plugin name'
|
||||
;;
|
||||
|
||||
plugin:upgrade)
|
||||
_message 'plugin name'
|
||||
;;
|
||||
|
||||
project:deploy)
|
||||
_message 'server name'
|
||||
;;
|
||||
|
||||
project:disable|project:enable)
|
||||
args+=(
|
||||
':environment:_sf_environments'
|
||||
'*:application:_sf_apps'
|
||||
)
|
||||
;;
|
||||
|
||||
project:optimize)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':environment:_sf_environments'
|
||||
)
|
||||
;;
|
||||
|
||||
propel:data-dump|doctrine:data-dump)
|
||||
_message 'target filename'
|
||||
;;
|
||||
|
||||
propel:data-load|doctrine:data-load)
|
||||
args+=(
|
||||
'*:file:_files'
|
||||
)
|
||||
;;
|
||||
|
||||
propel:generate-admin)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':model:_sf_models'
|
||||
)
|
||||
;;
|
||||
|
||||
propel:generate-module|propel:init-admin)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':module:_sf_modules_candidate'
|
||||
':model:_sf_models'
|
||||
)
|
||||
;;
|
||||
|
||||
propel:generate-module-for-route|doctrine:generate-module-for-route)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':"route name":'
|
||||
)
|
||||
;;
|
||||
|
||||
doctrine:create-model-tables|doctrine:delete-model-files)
|
||||
args+=(
|
||||
'*:model:_sf_doctrine_models'
|
||||
)
|
||||
;;
|
||||
|
||||
doctrine:generate-admin)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
'*:model:_sf_doctrine_models'
|
||||
)
|
||||
;;
|
||||
|
||||
doctrine:generate-module)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':module:_sf_doctrine_modules_candidate'
|
||||
':model:_sf_doctrine_models'
|
||||
)
|
||||
;;
|
||||
|
||||
test:coverage)
|
||||
args+=(
|
||||
'*:file:_files'
|
||||
)
|
||||
;;
|
||||
|
||||
test:functional)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
'*:test:_sf_functionaltests'
|
||||
)
|
||||
;;
|
||||
|
||||
test:unit)
|
||||
args+=(
|
||||
'*:test:_sf_unittests'
|
||||
)
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
_arguments "$args[@]" && ret=0
|
||||
return
|
||||
;;
|
||||
esac
|
||||
return ret
|
||||
}
|
||||
|
||||
_symfony10 () {
|
||||
local curcontext="$curcontext" state line expl ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(-T --tasks)'{-T,--tasks}'[list of the symfony tasks]' \
|
||||
'(-V --version)'{-V,--version}'[version]' \
|
||||
'1: :->tasks' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
tasks)
|
||||
_sf10_tasks
|
||||
;;
|
||||
args)
|
||||
local task args
|
||||
|
||||
task=$words[1]
|
||||
args=()
|
||||
|
||||
case $task in
|
||||
init-project)
|
||||
_message 'new project name'
|
||||
;;
|
||||
|
||||
init-app)
|
||||
_message 'application name'
|
||||
;;
|
||||
|
||||
init-module)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
)
|
||||
;;
|
||||
|
||||
init-batch)
|
||||
args+=(
|
||||
':skeleton name:compadd default rotate'
|
||||
':"script name":'
|
||||
':application:_sf_apps'
|
||||
)
|
||||
;;
|
||||
|
||||
init-controller)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':environment:_sf_environments'
|
||||
':"script name":'
|
||||
':"debug?":compadd true false'
|
||||
)
|
||||
;;
|
||||
|
||||
log-rotate)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':environment:_sf_environments'
|
||||
)
|
||||
;;
|
||||
|
||||
propel-load-data|propel-build-all-load)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':environment:_sf_environments'
|
||||
':fixtures:_sf_fixtures'
|
||||
)
|
||||
;;
|
||||
|
||||
clear-cache|cc)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':what:compadd template config'
|
||||
)
|
||||
;;
|
||||
|
||||
sync)
|
||||
args+=(
|
||||
':environment:_sf_environments'
|
||||
':"real run?":compadd go'
|
||||
)
|
||||
;;
|
||||
|
||||
propel-init-crud|propel*-init-admin|propel-generate-crud)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':module:_sf_modules_candidate'
|
||||
':model:_sf_models'
|
||||
)
|
||||
;;
|
||||
|
||||
doctrine-init-admin|doctrine-generate-crud)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':module:_sf_doctrine_modules_candidate'
|
||||
':model:_sf_doctrine_models'
|
||||
)
|
||||
;;
|
||||
|
||||
test-unit)
|
||||
args+=(
|
||||
':test:_sf_unittests'
|
||||
)
|
||||
;;
|
||||
|
||||
test-functional)
|
||||
args+=(
|
||||
':application:_sf_apps'
|
||||
':test:_sf_functionaltests'
|
||||
)
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
_arguments "$args[@]" && ret=0
|
||||
return
|
||||
;;
|
||||
esac
|
||||
return ret
|
||||
}
|
||||
|
||||
_sf_tasks () {
|
||||
local tmp ns line cache_task
|
||||
|
||||
cache_task=$(_get_sf_cache_var task)
|
||||
(( ${(P)+cache_task} == 0 )) && {
|
||||
tmp=(
|
||||
${${${(f)${"$($service -T)"##*Available tasks:}}##[[:blank:]][[:blank:]]}%%[[:blank:]]*}
|
||||
)
|
||||
eval "$cache_task=()"
|
||||
ns=''
|
||||
|
||||
for line in $tmp; do
|
||||
if [ $line[1] = ":" ] ; then
|
||||
eval "$cache_task+=( ${ns}${line#:} )"
|
||||
else
|
||||
ns="${line}:"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
_wanted symfony-task expl 'Symfony task' compadd -a $cache_task
|
||||
}
|
||||
|
||||
_sf10_tasks () {
|
||||
local sf_tasks
|
||||
|
||||
sf_tasks=(
|
||||
${${${(f)${"$($service -T)"#available pake tasks:}%%task aliases:*}#[[:blank:]][[:blank:]]}/[[:blank:]]*>[[:blank:]]/:}
|
||||
)
|
||||
|
||||
_describe -t symfony-tasks 'Symfony task' sf_tasks
|
||||
}
|
||||
|
||||
_sf_apps () {
|
||||
_wanted application expl 'application' compadd \
|
||||
${$(echo apps/*):t}
|
||||
}
|
||||
|
||||
_sf_environments () {
|
||||
local app
|
||||
|
||||
app=$([ -f apps/"$words[2]"/config/settings.yml ] && echo $words[2] || echo frontend)
|
||||
if [ -r apps/$app/config/settings.yml ] ; then
|
||||
_wanted environment expl 'environment' compadd \
|
||||
${${${(M)${(@f)"$(<apps/$app/config/settings.yml)"}:#[[:alpha:]]*}%%:*}:#all}
|
||||
fi
|
||||
}
|
||||
|
||||
_sf_plugins () {
|
||||
_wanted application expl 'plugin' compadd \
|
||||
${$(echo plugins/*):t}
|
||||
}
|
||||
|
||||
_sf_models () {
|
||||
_wanted application expl 'model' compadd \
|
||||
$(_get_sfmodels)
|
||||
}
|
||||
|
||||
_sf_doctrine_models () {
|
||||
_wanted model expl 'model' compadd \
|
||||
$(_get_sf_doctrine_models)
|
||||
}
|
||||
|
||||
|
||||
_sf_modules_candidate () {
|
||||
_wanted module expl 'module' compadd \
|
||||
${$(_get_sfmodels):l}
|
||||
}
|
||||
|
||||
_sf_doctrine_modules_candidate () {
|
||||
_wanted module expl 'module' compadd \
|
||||
${$(_get_sf_doctrine_models):l}
|
||||
}
|
||||
|
||||
_sf_unittests () {
|
||||
_wanted test expl 'test' compadd \
|
||||
${${${$(echo test/unit/**/*Test.php):r}#test/unit/}%Test}
|
||||
}
|
||||
|
||||
_sf_functionaltests () {
|
||||
_wanted test expl 'test' compadd \
|
||||
${${$(echo test/functional/$words[2]/*ActionsTest.php):t:r}%Test}
|
||||
}
|
||||
|
||||
_sf_fixtures () {
|
||||
_files -W $(pwd)/data
|
||||
}
|
||||
|
||||
_get_sfmodels () {
|
||||
echo ${${$(echo lib/model/*Peer.php):t:r}%Peer}
|
||||
}
|
||||
|
||||
_get_sf_doctrine_models () {
|
||||
echo ${${$(echo lib/model/doctrine/*Table.class.php):t:r:r}%Table}
|
||||
}
|
||||
|
||||
_get_sf_cache_var () {
|
||||
echo ${$(echo "_sf_cache_${(j:_:)@}$(pwd)")//[^[:alnum:]]/_}
|
||||
}
|
||||
|
||||
_symfony "$@"
|
||||
291
_task
291
_task
|
|
@ -1,291 +0,0 @@
|
|||
#compdef task
|
||||
# ------------------------------------------------------------------------------
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the
|
||||
#
|
||||
# Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA
|
||||
# 02110-1301
|
||||
# USA
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Taskwarrior (http://taskwarrior.org).
|
||||
#
|
||||
# Source: The Taskwarrior project.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * P.C. Shyamshankar (http://lucentbeing.com)
|
||||
# * Johannes Schlatow <johannes@schlatow.name>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
typeset -g _task_cmds _task_projects _task_tags _task_config _task_modifiers
|
||||
_task_projects=($(task _projects))
|
||||
_task_tags=($(task _tags))
|
||||
_task_ids=($(task _ids))
|
||||
_task_config=($(task _config))
|
||||
_task_modifiers=(
|
||||
'before' \
|
||||
'after' \
|
||||
'none' \
|
||||
'any' \
|
||||
'is' \
|
||||
'isnt' \
|
||||
'has' \
|
||||
'hasnt' \
|
||||
'startswith' \
|
||||
'endswith' \
|
||||
'word' \
|
||||
'noword'
|
||||
)
|
||||
_task_cmds=($(task _commands))
|
||||
_task_zshcmds=( ${(f)"$(task _zshcommands)"} )
|
||||
|
||||
|
||||
_task_idCmds=(
|
||||
'append' \
|
||||
'prepend' \
|
||||
'annotate' \
|
||||
'denotate' \
|
||||
'edit' \
|
||||
'duplicate' \
|
||||
'info' \
|
||||
'start' \
|
||||
'stop' \
|
||||
'done'
|
||||
)
|
||||
|
||||
_task_idCmdsDesc=(
|
||||
'append:Appends more description to an existing task.' \
|
||||
'prepend:Prepends more description to an existing task.' \
|
||||
'annotate:Adds an annotation to an existing task.' \
|
||||
'denotate:Deletes an annotation of an existing task.' \
|
||||
'edit:Launches an editor to let you modify a task directly.' \
|
||||
'duplicate:Duplicates the specified task, and allows modifications.' \
|
||||
'info:Shows all data, metadata for specified task.' \
|
||||
'start:Marks specified task as started.' \
|
||||
'stop:Removes the start time from a task.' \
|
||||
'done:Marks the specified task as completed.'
|
||||
)
|
||||
|
||||
_task() {
|
||||
_arguments -s -S \
|
||||
"*::task command:_task_commands"
|
||||
return 0
|
||||
}
|
||||
|
||||
local -a reply args word
|
||||
word=$'[^\0]#\0'
|
||||
|
||||
# priorities
|
||||
local -a task_priorities
|
||||
_regex_words values 'task priorities' \
|
||||
'H:High' \
|
||||
'M:Middle' \
|
||||
'L:Low'
|
||||
task_priorities=("$reply[@]")
|
||||
|
||||
# projects
|
||||
local -a task_projects
|
||||
task_projects=(
|
||||
/"$word"/
|
||||
":values:task projects:compadd -a _task_projects"
|
||||
)
|
||||
|
||||
local -a _task_dates
|
||||
_regex_words values 'task dates' \
|
||||
'tod*ay:Today' \
|
||||
'yes*terday:Yesterday' \
|
||||
'tom*orrow:Tomorrow' \
|
||||
'sow:Start of week' \
|
||||
'soww:Start of work week' \
|
||||
'socw:Start of calendar week' \
|
||||
'som:Start of month' \
|
||||
'soy:Start of year' \
|
||||
'eow:End of week' \
|
||||
'eoww:End of work week' \
|
||||
'eocw:End of calendar week' \
|
||||
'eom:End of month' \
|
||||
'eoy:End of year' \
|
||||
'mon:Monday' \
|
||||
'tue:Tuesday'\
|
||||
'wed:Wednesday' \
|
||||
'thu:Thursday' \
|
||||
'fri:Friday' \
|
||||
'sat:Saturday' \
|
||||
'sun:Sunday'
|
||||
_task_dates=("$reply[@]")
|
||||
|
||||
local -a _task_reldates
|
||||
_regex_words values 'task reldates' \
|
||||
'hrs:n hours' \
|
||||
'day:n days' \
|
||||
'1st:first' \
|
||||
'2nd:second' \
|
||||
'3rd:third' \
|
||||
'th:4th, 5th, etc.' \
|
||||
'wks:weeks'
|
||||
_task_reldates=("$reply[@]")
|
||||
|
||||
task_dates=(
|
||||
\( "$_task_dates[@]" \|
|
||||
\( /$'[0-9][0-9]#'/- \( "$_task_reldates[@]" \) \)
|
||||
\)
|
||||
)
|
||||
|
||||
_regex_words values 'task frequencies' \
|
||||
'daily:Every day' \
|
||||
'day:Every day' \
|
||||
'weekdays:Every day skipping weekend days' \
|
||||
'weekly:Every week' \
|
||||
'biweekly:Every two weeks' \
|
||||
'fortnight:Every two weeks' \
|
||||
'quarterly:Every three months' \
|
||||
'semiannual:Every six months' \
|
||||
'annual:Every year' \
|
||||
'yearly:Every year' \
|
||||
'biannual:Every two years' \
|
||||
'biyearly:Every two years'
|
||||
_task_freqs=("$reply[@]")
|
||||
|
||||
local -a _task_frequencies
|
||||
_regex_words values 'task frequencies' \
|
||||
'd:days' \
|
||||
'w:weeks' \
|
||||
'q:quarters' \
|
||||
'y:years'
|
||||
_task_frequencies=("$reply[@]")
|
||||
|
||||
task_freqs=(
|
||||
\( "$_task_freqs[@]" \|
|
||||
\( /$'[0-9][0-9]#'/- \( "$_task_frequencies[@]" \) \)
|
||||
\)
|
||||
)
|
||||
|
||||
# attributes
|
||||
local -a task_attributes
|
||||
_regex_words -t ':' default 'task attributes' \
|
||||
'pro*ject:Project name:$task_projects' \
|
||||
'du*e:Due date:$task_dates' \
|
||||
'wa*it:Date until task becomes pending:$task_dates' \
|
||||
're*cur:Recurrence frequency:$task_freqs' \
|
||||
'pri*ority:priority:$task_priorities' \
|
||||
'un*til:Recurrence end date:$task_dates' \
|
||||
'fg:Foreground color' \
|
||||
'bg:Background color' \
|
||||
'li*mit:Desired number of rows in report'
|
||||
task_attributes=("$reply[@]")
|
||||
|
||||
args=(
|
||||
\( "$task_attributes[@]" \|
|
||||
\( /'(project|due|wait|recur|priority|until|fg|bg|limit).'/- \( /$'[^:]#:'/ ":default:modifiers:compadd -S ':' -a _task_modifiers" \) \) \|
|
||||
\( /'(rc).'/- \( /$'[^:]#:'/ ":arguments:config:compadd -S ':' -a _task_config" \) \) \|
|
||||
\( /'(+|-)'/- \( /"$word"/ ":values:remove tag:compadd -a _task_tags" \) \) \|
|
||||
\( /"$word"/ \)
|
||||
\) \#
|
||||
)
|
||||
_regex_arguments _task_attributes "${args[@]}"
|
||||
|
||||
## task commands
|
||||
|
||||
# default completion
|
||||
(( $+functions[_task_default] )) ||
|
||||
_task_default() {
|
||||
_task_attributes "$@"
|
||||
}
|
||||
|
||||
# commands expecting an ID
|
||||
(( $+functions[_task_id] )) ||
|
||||
_task_id() {
|
||||
if (( CURRENT < 3 )); then
|
||||
# update IDs
|
||||
_task_zshids=( ${(f)"$(task _zshids)"} )
|
||||
_describe -t values 'task IDs' _task_zshids
|
||||
else
|
||||
_task_attributes "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# merge completion
|
||||
(( $+functions[_task_merge] )) ||
|
||||
_task_merge() {
|
||||
# TODO match URIs in .taskrc
|
||||
_files
|
||||
}
|
||||
|
||||
# push completion
|
||||
(( $+functions[_task_push] )) ||
|
||||
_task_push() {
|
||||
# TODO match URIs in .taskrc
|
||||
_files
|
||||
}
|
||||
|
||||
# pull completion
|
||||
(( $+functions[_task_pull] )) ||
|
||||
_task_pull() {
|
||||
# TODO match URIs in .taskrc
|
||||
_files
|
||||
}
|
||||
|
||||
|
||||
# modify (task [0-9]* ...) completion
|
||||
(( $+functions[_task_modify] )) ||
|
||||
_task_modify() {
|
||||
_describe -t commands 'task command' _task_idCmdsDesc
|
||||
_task_attributes "$@"
|
||||
}
|
||||
|
||||
## first level completion => task sub-command completion
|
||||
(( $+functions[_task_commands] )) ||
|
||||
_task_commands() {
|
||||
local cmd ret=1
|
||||
if (( CURRENT == 1 )); then
|
||||
# update IDs
|
||||
_task_zshids=( ${(f)"$(task _zshids)"} )
|
||||
|
||||
_describe -t commands 'task command' _task_zshcmds
|
||||
_describe -t values 'task IDs' _task_zshids
|
||||
# TODO match more than one ID
|
||||
elif [[ $words[1] =~ ^[0-9]*$ ]] then
|
||||
_call_function ret _task_modify
|
||||
return ret
|
||||
else
|
||||
# local curcontext="${curcontext}"
|
||||
# cmd="${_task_cmds[(r)$words[1]:*]%%:*}"
|
||||
cmd="${_task_cmds[(r)$words[1]]}"
|
||||
idCmd="${(M)_task_idCmds[@]:#$words[1]}"
|
||||
if (( $#cmd )); then
|
||||
# curcontext="${curcontext%:*:*}:task-${cmd}"
|
||||
|
||||
if (( $#idCmd )); then
|
||||
_call_function ret _task_id
|
||||
else
|
||||
_call_function ret _task_${cmd} ||
|
||||
_call_function ret _task_default ||
|
||||
_message "No command remaining."
|
||||
fi
|
||||
else
|
||||
_message "Unknown subcommand ${cmd}"
|
||||
fi
|
||||
return ret
|
||||
fi
|
||||
}
|
||||
|
||||
23
_thor
23
_thor
|
|
@ -1,23 +0,0 @@
|
|||
#compdef thor
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for thor (https://github.com/wycats/thor).
|
||||
#
|
||||
# Source: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/thor
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Andrew Hodges (https://github.com/betawaffle)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# FIXME This should be rewritten using up-to-date ZSH completion API.
|
||||
compadd `thor list | grep thor | cut -d " " -f 2`
|
||||
127
_vagrant
127
_vagrant
|
|
@ -1,127 +0,0 @@
|
|||
#compdef vagrant
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Vagrant (http://vagrantup.com).
|
||||
#
|
||||
# Source: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/vagrant
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Nikita Fedyashev (https://github.com/nfedyashev)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'box:Box commands'
|
||||
'destroy:Destroys the vagrant environment'
|
||||
'halt:Halts the currently running vagrant environment'
|
||||
'help:[TASK] Describe available tasks or one specific task'
|
||||
'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
|
||||
'package:Packages a vagrant environment for distribution'
|
||||
'provision:Run the provisioner'
|
||||
'reload:Reload the vagrant environment'
|
||||
'resume:Resumes a suspend vagrant environment'
|
||||
'ssh:SSH into the currently running environment'
|
||||
'ssh_config:outputs .ssh/config valid syntax for connecting to this environment via ssh.'
|
||||
'status:Shows the status of the current Vagrant environment.'
|
||||
'suspend:Suspends the currently running vagrant environment'
|
||||
'up:Creates the vagrant environment'
|
||||
'version:Prints the Vagrant version information'
|
||||
)
|
||||
|
||||
local -a _box_arguments
|
||||
_box_arguments=(
|
||||
'add:NAME URI Add a box to the system'
|
||||
'help:COMMAND Describe subcommands or one specific subcommand'
|
||||
'list:Lists all installed boxes'
|
||||
'remove:NAME Remove a box from the system'
|
||||
'repackage:NAME Repackage an installed box into a `.box` file.'
|
||||
)
|
||||
|
||||
__task_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a tasks
|
||||
|
||||
tasks=(box destroy halt init package provision reload resume ssh ssh_config status suspend up version)
|
||||
|
||||
_wanted tasks expl 'help' compadd $tasks
|
||||
}
|
||||
|
||||
__box_list ()
|
||||
{
|
||||
_wanted application expl 'command' compadd $(command ls -1 $HOME/.vagrant/boxes 2>/dev/null| sed -e 's/ /\\ /g')
|
||||
}
|
||||
|
||||
__vm_list ()
|
||||
{
|
||||
_wanted application expl 'command' compadd $(command grep Vagrantfile -oe '^[^#]*\.vm\.define *:\([a-zA-Z0-9]\+\)' 2>/dev/null | cut -d: -f2)
|
||||
}
|
||||
|
||||
__vagrant-box ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _box_arguments
|
||||
return
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(repackage|remove)
|
||||
_arguments ':feature:__box_list'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
local expl
|
||||
local -a boxes installed_boxes
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _1st_arguments
|
||||
return
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(help)
|
||||
_arguments ':feature:__task_list'
|
||||
;;
|
||||
|
||||
(box)
|
||||
__vagrant-box
|
||||
;;
|
||||
(up|provision|package|destroy|reload|ssh|halt|resume|status)
|
||||
_arguments ':feature:__vm_list'
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
312
_virtualbox
312
_virtualbox
|
|
@ -1,312 +0,0 @@
|
|||
#compdef VBoxManage=vboxmanage VBoxHeadless=vboxheadless
|
||||
# ------------------------------------------------------------------------------
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for VirtualBox (http://www.virtualbox.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_vboxmachines() {
|
||||
VBoxManage list vms | egrep -o '^"[^"]+"' 2>/dev/null | sed -e 's|"||g' | while read machine; do
|
||||
_wanted 'machine' expl 'machine' compadd $machine
|
||||
done
|
||||
}
|
||||
|
||||
# Roughly guess command options
|
||||
_vboxcommandoptions() {
|
||||
cmd="$1"
|
||||
cmdoutput=$(VBoxManage "$cmd" 2>/dev/null | tail -n +2 | grep -v 'Syntax error:' | grep -v '<uuid>|<name>' | sed 's|<[^>]\+>||g' | sed 's|VBoxManage [^ ]\+ | |')
|
||||
|
||||
optcount=0
|
||||
option=""
|
||||
optlines=()
|
||||
echo "$cmdoutput" | egrep -o ' [\[A-Za-z0-9\-\<].*' | while read line; do
|
||||
option="${option}${line}"
|
||||
if [[ $line[-1] != '|' ]]; then
|
||||
optcount=$(($optcount+1))
|
||||
optlines[$optcount]="$option"
|
||||
option=""
|
||||
fi
|
||||
done
|
||||
|
||||
# optionals ([abc])
|
||||
for line in $optlines; do
|
||||
echo "$line" | egrep -o '\[[^]]+\]' | while read option; do
|
||||
option=$(echo $option | sed 's|[]\[]||g' | cut -d ' ' -f 1)
|
||||
_options=(${(s:|:)option})
|
||||
for option in $_options; do
|
||||
_wanted "${cmd}_option" expl "${cmd} option" compadd -- $option
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
# mandatory
|
||||
for line in $optlines; do
|
||||
echo "$line" | sed 's|\[[^]]\+\]|\n|g' | while read option; do
|
||||
if [[ "$option" != "" ]]; then
|
||||
_option=$(echo $option | cut -d ' ' -f 1)
|
||||
_options=(${(s:|:)option})
|
||||
for option in $_options; do
|
||||
_wanted "${cmd}_option" expl "${cmd} option" compadd -- $option
|
||||
done
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# List possible mediums
|
||||
_vboxmediums() {
|
||||
_wanted "mediums" expl "mediums" compadd -- "none"
|
||||
_wanted "mediums" expl "mediums" compadd -- "emptydrive"
|
||||
_wanted "mediums" expl "mediums" compadd -- "iscsi"
|
||||
|
||||
_files -g '*.{iso,vmdk,vdi}'
|
||||
|
||||
for CD in /dev/cd/*; do
|
||||
readlink -f $CD
|
||||
done | uniq | while read CD; do
|
||||
_wanted "host drives" expl "host drives" compadd -- "host:$CD"
|
||||
done
|
||||
}
|
||||
|
||||
# List available os types
|
||||
_vboxostypes() {
|
||||
VBoxManage list ostypes | grep '^ID' | awk '{print $2}' | while read OSTYPE; do
|
||||
_wanted 'ostype' expl 'os type' compadd -- $OSTYPE
|
||||
done
|
||||
}
|
||||
|
||||
# Guess options for this commands
|
||||
_vboxopts_controlvm() { _vboxcommandoptions controlvm }
|
||||
_vboxopts_modifyvm() { _vboxcommandoptions modifyvm }
|
||||
_vboxopts_export() { _vboxcommandoptions export }
|
||||
|
||||
_vboxmanage() {
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
"list:gives information about VirtualBox's current settings"
|
||||
'showvminfo:shows information about a particular virtual machine'
|
||||
'registervm:import a virtual machine definition in an XML file into VirtualBox'
|
||||
'unregistervm:unregisters a virtual machine'
|
||||
'createvm:creates a new XML virtual machine definition file'
|
||||
'modifyvm:changes the properties of a registered virtual machine which is not running'
|
||||
'import:imports a virtual appliance in OVF format by copying the virtual disk images and creating virtual machines in VirtualBox'
|
||||
'export:exports one or more virtual machines from VirtualBox into a virtual appliance in OVF format'
|
||||
'startvm:starts a virtual machine that is currently in the "Powered off" or "Saved" states'
|
||||
'controlvm:change the state of a virtual machine that is currently running'
|
||||
'discardstate:discards the saved state of a virtual machine which is not currently running'
|
||||
'adoptstate:adopt a saved state file (.sav)'
|
||||
'snapshot:control snapshots'
|
||||
'closemedium:removes a hard disk, DVD or floppy image from a VirtualBox media registry'
|
||||
'storageattach:attaches/modifies/removes a storage medium connected to a storage controller'
|
||||
'storagectl:attaches/modifies/removes a storage controller'
|
||||
'bandwidthctl:creates/deletes/modifies bandwidth groups'
|
||||
'showhdinfo:shows information about a virtual hard disk image'
|
||||
'createhd:creates a new virtual hard disk image'
|
||||
'modifyhd:change the characteristics of a disk image after it has been created'
|
||||
'clonehd:duplicates a registered virtual hard disk image to a new image file with a new unique identifier'
|
||||
'convertfromraw:converts a raw disk image to a VirtualBox Disk Image (VDI) file'
|
||||
'getextradata:retrieve string data to a virtual machine or to a VirtualBox configuration'
|
||||
'setextradata:attach string data to a virtual machine or to a VirtualBox configuration'
|
||||
'setproperty:change global settings which affect the entire VirtualBox installation'
|
||||
'usbfilter:used for working with USB filters in virtual machines, or global filters'
|
||||
'sharedfolder:share folders on the host computer with guest operating systems'
|
||||
'guestproperty:get or set properties of a running virtual machine'
|
||||
'guestcontrol:control certain things inside a guest from the host'
|
||||
'debugvm:for experts who want to tinker with the exact details of virtual machine execution'
|
||||
'metrics:monitor the usage of system resources'
|
||||
'hostonlyif:change the IP configuration of a host-only network interface'
|
||||
'dhcpserver:control the DHCP server that is built into VirtualBox'
|
||||
'extpack:add or remove VirtualBox extension packs'
|
||||
)
|
||||
|
||||
local context state line expl
|
||||
local -A opt_args
|
||||
|
||||
_arguments '*:: :->subcmds' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "VBoxManage commands" _1st_arguments -V1
|
||||
return
|
||||
fi
|
||||
|
||||
case "$words[1]" in
|
||||
list)
|
||||
_arguments \
|
||||
'--long' \
|
||||
':list option:(vms runningvms ostypes hostdvds hostfloppies bridgedifs hostonlyifs dhcpservers hostinfo hostcpuids hddbackends hdds dvds floppies usbhost usbfilters systemproperties extpacks)'
|
||||
;;
|
||||
showvminfo)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
'--details' \
|
||||
'--machinereadable' \
|
||||
'--log: :'
|
||||
;;
|
||||
unregistervm)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
'--delete'
|
||||
;;
|
||||
createvm)
|
||||
_arguments \
|
||||
'--name: :' \
|
||||
'--ostype:os type:_vboxostypes' \
|
||||
'--register' \
|
||||
'--basefolder:folder:_files -/' \
|
||||
'--settingsfile:file:_files' \
|
||||
'--uuid: :'
|
||||
;;
|
||||
modifyvm)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
:modifyvm_option:_vboxopts_modifyvm
|
||||
;;
|
||||
import)
|
||||
_arguments \
|
||||
':ovf file:_files -g \*.{ovf,ova}' \
|
||||
'--dry-run'
|
||||
;;
|
||||
export)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
:export_option:_vboxopts_export
|
||||
;;
|
||||
startvm)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
'--type:running mode:(gui sdl headless)'
|
||||
;;
|
||||
controlvm)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
:controlvm_option:_vboxopts_controlvm
|
||||
;;
|
||||
adoptstate)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
':sav file:_files -g \*.sav'
|
||||
;;
|
||||
closemedium)
|
||||
_arguments \
|
||||
':type:(disk dvd floppy)' \
|
||||
':file:_files' \
|
||||
'--delete'
|
||||
;;
|
||||
discardstate|bandwidthctl|getextradata|setextradata|debugvm)
|
||||
_arguments \
|
||||
:machine:_vboxmachines
|
||||
;;
|
||||
storagectl)
|
||||
_arguments \
|
||||
:machine:_vboxmachines \
|
||||
'--name: :' \
|
||||
'--add:type:(ide scsi floppy sas)' \
|
||||
'--controller:type:(LSILogic|LSILogicSAS|BusLogic|IntelAHCI|PIIX3|PIIX4|ICH6|I82078)' \
|
||||
--sataideemulation{1..4}":port:({1..30})" \
|
||||
"--sataportcount:num:({1..30})" \
|
||||
'--hostiocache:bool:(on off)' \
|
||||
'--bootable:bool:(on off)' \
|
||||
'--remove' #"
|
||||
;;
|
||||
storageattach)
|
||||
_arguments \
|
||||
:machine:_vboxmachines\
|
||||
'--storagectl:storage ctl:("IDE Controller" "SATA Controller")' \
|
||||
'--port: :' \
|
||||
'--device: :' \
|
||||
'--type:drive type:(dvddrive hdd fdd)' \
|
||||
'--medium:mediums:_vboxmediums' \
|
||||
'--mtype:behaviour:(normal writethrough immutable shareable)' \
|
||||
'--comment: :' \
|
||||
'--passthrough:enabled?:(on off)' \
|
||||
'--bandwidthgroup: :' \
|
||||
'--forceunmount' '--server: :' \
|
||||
'--target: :' \
|
||||
'--lun: :' \
|
||||
'--encodedlun: :' \
|
||||
'--username: :' \
|
||||
'--password: :' \
|
||||
'--intnet: :'
|
||||
;;
|
||||
createhd)
|
||||
_arguments \
|
||||
'--filename:filename:_files -g \*.{vdi,vmdk,vhd}' \
|
||||
'--size:megabytes:' \
|
||||
'--sizebyte:bytes:' \
|
||||
'--format:type:(VDI VMDK VHD)' \
|
||||
'--variant:type:(Standard Fixed Split2G Stream ESX)'
|
||||
;;
|
||||
sharedfolder)
|
||||
_arguments \
|
||||
':action:(add remove)' \
|
||||
:machine:_vboxmachines \
|
||||
'--name: :' \
|
||||
'--hostpath:path:_files -/' \
|
||||
'--transient' \
|
||||
'--readonly' \
|
||||
'--automount'
|
||||
;;
|
||||
esac
|
||||
return 1
|
||||
}
|
||||
|
||||
_vboxheadless() {
|
||||
local context state line expl
|
||||
local -A opt_args
|
||||
|
||||
_arguments \
|
||||
'(-s -startvm --startvm)'{-s,-startvm,--startvm}'[Start given VM]:machine:_vboxmachines' \
|
||||
'(-n --vnc)'{-n,--vnc}'[Enable the built in VNC server]' \
|
||||
'(-m --vncport)'{-m,--vncport}'[TCP port number to use for the VNC server]:port:' \
|
||||
'(-o --vncpass)'{-o,--vncpass}'[Set the VNC server password]:pw:' \
|
||||
'(-v -vrde --vrde)'{-v,-vrde,--vrde}"[Enable (default) or disable the VRDE server or don't change the setting]::(on off config)" \
|
||||
'(-e -vrdeproperty --vrdeproperty)'{-e,-vrdeproperty,--vrdeproperty}'[Set a VRDE property]: :' \
|
||||
'(-c -capture --capture)'{-c,-capture,--capture}'[Record the VM screen output to a file]' \
|
||||
'(-w --width)'{-w,--width}'[Frame width when recording]:width:' \
|
||||
'(-h --height)'{-h,--height}'[Frame height when recording]:height:' \
|
||||
'(-r --bitrate)'{-r,--bitrate}'[Recording bit rate when recording]:bitrate:' \
|
||||
'(-f --filename)'{-f,--filename}'[File name when recording. The codec used will be chosen based on the file extension]:filename:_files'
|
||||
}
|
||||
|
||||
_virtualbox() {
|
||||
local ret=1
|
||||
_call_function ret _$service
|
||||
return ret
|
||||
}
|
||||
|
||||
_virtualbox "$@"
|
||||
202
_vpnc
202
_vpnc
|
|
@ -1,202 +0,0 @@
|
|||
#compdef vpnc vpnc-connect vpnc-disconnect
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for vpnc.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
(( $+functions[_vpnc-connect] )) ||
|
||||
_vpnc-connect() {
|
||||
_arguments \
|
||||
'(- : *)--version[display version information]' \
|
||||
'(- : *)--'{,long-}'help[display help information]' \
|
||||
'--gateway[IP/name of your IPSec gateway]: :_hosts' \
|
||||
'--id[your group name]: :_groups' \
|
||||
'--username[your username]: :_users' \
|
||||
'--domain[domain name for authentication]: :_domains' \
|
||||
'--xauth-inter[enable interactive extended authentication]' \
|
||||
'--vendor[vendor of your IPSec gateway]: :_vpnc_gateway_vendors' \
|
||||
'--natt-mode[NAT-Traversal method]: :_vpnc_nat_traversal_methods' \
|
||||
'--script[command executed using system() to configure the interface, routing and so on]:command path:_files' \
|
||||
'--dh[name of the IKE DH Group]: :_vpnc_ike_diffie_hellman_groups' \
|
||||
'--pfs[Diffie-Hellman group to use for PFS]: :_vpnc_pfs_diffie_hellman_groups' \
|
||||
'--enable-1des[enable weak single DES encryption]' \
|
||||
'--enable-no-encryption[enable using no encryption for data traffic (key exchanged must be encrypted)]' \
|
||||
'--application-version[application version to report]:application version' \
|
||||
'--ifname[visible name of the TUN/TAP interface]:name' \
|
||||
'--ifmode[mode of TUN/TAP interface]: :_vpnc_tun_tap_modes' \
|
||||
'--debug[show verbose debug messages]: :_vpnc_debug_levels' \
|
||||
'--no-detach[Don'\''t detach from the console after login]' \
|
||||
'--pid-file[store the pid of background process in the file]:pid file:_files' \
|
||||
'--local-addr[local IP to use for ISAKMP/ESP/...]: :_hosts' \
|
||||
'--local-port[local ISAKMP port number to use]: :_vpnc_isakmp_port_numbers' \
|
||||
'--udp-port[local UDP port number to use]: :_vpnc_udp_port_numbers' \
|
||||
'--dpd-idle[send DPD packet after not receiving anything for X seconds]: :_vpnc_dpd_idle_times' \
|
||||
'--non-inter[Don'\''t ask anything, exit on missing options]' \
|
||||
'--auth-mode[authentication mode]: :_vpnc_authentication_modes' \
|
||||
'--ca-file[filename and path to the CA-PEM-File]:CA-PEM file:_files' \
|
||||
'--ca-dir[path of the trusted CA-Directory]:CA directory:_files -/' \
|
||||
'--target-network[target network in dotted decimal or CIDR notation]:target network/netmask' \
|
||||
'--print-config[print your configuration; output can be used as vpnc.conf]' \
|
||||
'*: :_vpnc_confs'
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc-disconnect] )) ||
|
||||
_vpnc-disconnect() {
|
||||
_message 'no more arguments'
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_confs] )) ||
|
||||
_vpnc_confs() {
|
||||
# FIXME /etc/vpnc/ is only accessible to root, how do we deal with this ?
|
||||
local confs; confs=(/etc/vpnc/*.conf(:t:s/\.conf/))
|
||||
_describe -t confs 'VPNC conf' confs "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_gateway_vendors] )) ||
|
||||
_vpnc_gateway_vendors() {
|
||||
local vendors; vendors=(
|
||||
'cisco'
|
||||
'netscreen'
|
||||
)
|
||||
_describe -t vendors 'vendor' vendors "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_nat_traversal_methods] )) ||
|
||||
_vpnc_nat_traversal_methods() {
|
||||
local methods; methods=(
|
||||
'natt:NAT-T as defined in RFC3947 (default)'
|
||||
'none:disable use of any NAT-T method'
|
||||
'force-natt:always use NAT-T encapsulation even without presence of a NAT device'
|
||||
'cisco-udp:Cisco proprietary UDP encapsulation, commonly over Port 10000'
|
||||
)
|
||||
_describe -t methods 'NAT traversal method' methods "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_ike_diffie_hellman_groups] )) ||
|
||||
_vpnc_ike_diffie_hellman_groups() {
|
||||
local groups; groups=(
|
||||
'dh1'
|
||||
'dh2'
|
||||
'dh5'
|
||||
)
|
||||
_describe -t groups 'IKE Diffie Hellman group' groups "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_pfs_diffie_hellman_groups] )) ||
|
||||
_vpnc_pfs_diffie_hellman_groups() {
|
||||
local groups; groups=(
|
||||
'nopfs'
|
||||
'dh1'
|
||||
'dh2'
|
||||
'dh5'
|
||||
'server'
|
||||
)
|
||||
_describe -t groups 'PFS Diffie Hellman group' groups "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_tun_tap_modes] )) ||
|
||||
_vpnc_tun_tap_modes() {
|
||||
local modes; modes=(
|
||||
'tun:virtual point to point interface (default)'
|
||||
'tap:virtual ethernet interface'
|
||||
)
|
||||
_describe -t modes 'TUN/TAP interface mode' modes "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_debug_levels] )) ||
|
||||
_vpnc_debug_levels() {
|
||||
local levels; levels=(
|
||||
'0:do not print debug information'
|
||||
'1:print minimal debug information'
|
||||
'2:show statemachine and packet/payload type information'
|
||||
'3:dump everything exluding authentication data'
|
||||
'99:dump everything INCLUDING AUTHENTICATION data (e.g. PASSWORDS)'
|
||||
)
|
||||
_describe -t levels 'debug level' levels "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_isakmp_port_numbers] )) ||
|
||||
_vpnc_isakmp_port_numbers() {
|
||||
local ports; ports=(
|
||||
'0:use random port'
|
||||
'1:minimum port number'
|
||||
'500:default port number'
|
||||
'65535:maximum port number'
|
||||
)
|
||||
_describe -t ports 'ISAKMP port number' ports "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_udp_port_numbers] )) ||
|
||||
_vpnc_udp_port_numbers() {
|
||||
local ports; ports=(
|
||||
'0:use random port'
|
||||
'1:minimum port number'
|
||||
'10000:default port number'
|
||||
'65535:maximum port number'
|
||||
)
|
||||
_describe -t ports 'UDP port number' ports "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_dpd_idle_times] )) ||
|
||||
_vpnc_dpd_idle_times() {
|
||||
local times; times=(
|
||||
'0:completely disable DPD'
|
||||
'10:minimum value'
|
||||
'300:default value'
|
||||
'86400:maximum value'
|
||||
)
|
||||
_describe -t times 'DPD idle wait time (seconds)' times "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_vpnc_authentication_modes] )) ||
|
||||
_vpnc_authentication_modes() {
|
||||
local modes; modes=(
|
||||
'psk:pre-shared key (default)'
|
||||
'cert:server + client certificate'
|
||||
'hybrid:server certificate + xauth'
|
||||
)
|
||||
_describe -t modes 'authentication mode' modes "$@"
|
||||
}
|
||||
|
||||
case $service in
|
||||
vpnc|vpnc-connect) _call_function ret _vpnc-connect && return ret ;;
|
||||
vpnc-disconnect) _call_function ret _vpnc-disconnect && return ret ;;
|
||||
esac
|
||||
338
_yaourt
338
_yaourt
|
|
@ -1,338 +0,0 @@
|
|||
#compdef yaourt yaourt.static=yaourt
|
||||
|
||||
# Completion file for yaourt, based on pacman's
|
||||
|
||||
# copy this file to /usr/share/zsh/site-functions/_pacman
|
||||
|
||||
typeset -A opt_args
|
||||
|
||||
# options for passing to _arguments: main pacman commands
|
||||
_yaourt_opts_commands=(
|
||||
'-Q[Query the package database]'
|
||||
'-R[Remove a package from the system]'
|
||||
'-S[Synchronize packages]'
|
||||
'-U[Upgrade a package]'
|
||||
'-V[Display version and exit]'
|
||||
'-h[Display usage]'
|
||||
'-B[backup pacman database]'
|
||||
'-G[Get PKGBUILD]'
|
||||
'-C[Clean backup files]'
|
||||
'--stats[Package Statistics]'
|
||||
)
|
||||
|
||||
# options for passing to _arguments: options common to all commands
|
||||
_yaourt_opts_common=(
|
||||
'-b[Alternate database location]:database_location:_files -/'
|
||||
'-h[Display syntax for the given operation]'
|
||||
'-r[Set alternate installation root]:installation root:_files -/'
|
||||
'-v[Be more verbose]'
|
||||
'--cachedir[Alternate package cache location]:cache_location:_files -/'
|
||||
'--config[An alternate configuration file]:config file:_files'
|
||||
'--logfile[An alternate log file]:config file:_files'
|
||||
'--noconfirm[Do not ask for confirmation]'
|
||||
'--noprogressbar[Do not show a progress bar when downloading files]'
|
||||
'--noscriptlet[Do not execute the install scriptlet if one exists]'
|
||||
'--print[Only print the targets instead of performing the operation]'
|
||||
)
|
||||
|
||||
# options for passing to _arguments: options for --upgrade commands
|
||||
_yaourt_opts_pkgfile=(
|
||||
'-d[Skip dependency checks]'
|
||||
'-f[Overwrite conflicting files]'
|
||||
'*:package file:_files -g "*.pkg.tar.*(.)"'
|
||||
)
|
||||
|
||||
# options for passing to _arguments: subactions for --query command
|
||||
_yaourt_opts_query_actions=(
|
||||
'-g[View all members of a package group]:*:package groups:->query_group'
|
||||
'-o[Query the package that owns a file]:file:_files'
|
||||
'-p[Package file to query]:*:package file:->query_file'
|
||||
'-s[Search package names and descriptions]:*:search text:->query_search'
|
||||
)
|
||||
|
||||
# options for passing to _arguments: options for --query and subcommands
|
||||
_yaourt_opts_query_modifiers=(
|
||||
'-c[List package changelog]'
|
||||
'-d[List packages installed as dependencies]'
|
||||
'-e[List packages explicitly installed]'
|
||||
'-i[View package information]'
|
||||
'-ii[View package information including backup files]'
|
||||
'-k[Check package files]'
|
||||
'-l[List package contents]'
|
||||
'-m[List installed packages not found in sync db(s)]'
|
||||
'-t[List packages not required by any package]'
|
||||
'-u[List packages that can be upgraded]'
|
||||
'--aur[Install packages from aur, even if they are in community, or, with the -u option, update packages installed from aur]'
|
||||
'--devel[Used with -u updates all cvs/svn/git/hg/bzr packages]'
|
||||
)
|
||||
|
||||
# options for passing to _arguments: options for --remove command
|
||||
_yaourt_opts_remove=(
|
||||
'-c[Remove all dependent packages]'
|
||||
'-d[Skip dependency checks]'
|
||||
'-k[Only remove database entry, do not remove files]'
|
||||
'-n[Remove protected configuration files]'
|
||||
'-s[Remove dependencies not required by other packages]'
|
||||
'*:installed package:_yaourt_completions_installed_packages'
|
||||
)
|
||||
|
||||
# options for passing to _arguments: options for --sync command
|
||||
_yaourt_opts_sync_actions=(
|
||||
'*-c[Remove old packages from cache]:*:clean:->sync_clean'
|
||||
'*-cc[Remove all packages from cache]:*:clean:->sync_clean'
|
||||
'-g[View all members of a package group]:*:package groups:->sync_group'
|
||||
'-s[Search package names and descriptions]:*:search text:->sync_search'
|
||||
)
|
||||
|
||||
# options for passing to _arguments: options for --sync command
|
||||
_yaourt_opts_sync_modifiers=(
|
||||
'-d[Skip dependency checks]'
|
||||
'-f[Overwrite conflicting files]'
|
||||
'-i[View package information]'
|
||||
'-l[List all packages in a repository]'
|
||||
'-p[Print download URIs for each package to be installed]'
|
||||
'-u[Upgrade all out-of-date packages]'
|
||||
'-w[Download packages only]'
|
||||
'-y[Download fresh package databases]'
|
||||
'*--ignore[Ignore a package upgrade]:package:
|
||||
_yaourt_completions_all_packages'
|
||||
'*--ignoregroup[Ignore a group upgrade]:package group:
|
||||
_yaourt_completions_all_groups'
|
||||
'--asdeps[Install packages as non-explicitly installed]'
|
||||
'--asexplicit[Install packages as explicitly installed]'
|
||||
)
|
||||
|
||||
# handles --help subcommand
|
||||
_yaourt_action_help() {
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_commands[@]"
|
||||
}
|
||||
|
||||
# handles cases where no subcommand has yet been given
|
||||
_yaourt_action_none() {
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_commands[@]"
|
||||
}
|
||||
|
||||
# handles --query subcommand
|
||||
_yaourt_action_query() {
|
||||
local context state line
|
||||
typeset -A opt_args
|
||||
|
||||
# _arguments -s : \
|
||||
# "$_yaourt_opts_common[@]" \
|
||||
# "$_yaourt_opts_query_actions[@]" \
|
||||
# "$_yaourt_opts_query_modifiers[@]"
|
||||
|
||||
case $state in
|
||||
query_file)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:package file:_files -g "*.pkg.tar.*"'
|
||||
;;
|
||||
query_group)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:groups:_yaourt_completions_installed_groups'
|
||||
;;
|
||||
query_owner)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:file:_files'
|
||||
;;
|
||||
query_search)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:search text: '
|
||||
;;
|
||||
*)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_actions[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:package:_yaourt_completions_installed_packages'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# handles --remove subcommand
|
||||
_yaourt_action_remove() {
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_remove[@]"
|
||||
}
|
||||
|
||||
# handles --sync subcommand
|
||||
_yaourt_action_sync() {
|
||||
local context state line
|
||||
typeset -A opt_args
|
||||
|
||||
# _arguments -s : \
|
||||
# "$_yaourt_opts_common[@]" \
|
||||
# "$_yaourt_opts_sync_actions[@]" #\
|
||||
# #"$_yaourt_opts_sync_modifiers[@]"
|
||||
|
||||
case $state in
|
||||
sync_clean)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_sync_modifiers[@]" \
|
||||
'*-c[Remove old packages from cache]' \
|
||||
;;
|
||||
sync_group)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_sync_modifiers[@]" \
|
||||
'*:package group:_yaourt_completions_all_groups'
|
||||
;;
|
||||
sync_search)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_sync_modifiers[@]" \
|
||||
'*:search text: '
|
||||
;;
|
||||
*)
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_sync_modifiers[@]" \
|
||||
'*:package:_yaourt_completions_all_packages'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# handles --upgrade subcommand
|
||||
_yaourt_action_upgrade() {
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_pkgfile[@]"
|
||||
}
|
||||
|
||||
# handles --version subcommand
|
||||
_yaourt_action_version() {
|
||||
# no further arguments
|
||||
return 0
|
||||
}
|
||||
|
||||
# provides completions for package groups
|
||||
_yaourt_completions_all_groups() {
|
||||
local -a cmd groups
|
||||
_yaourt_get_command
|
||||
groups=( $(_call_program groups $cmd[@] -Sg) )
|
||||
typeset -U groups
|
||||
compadd "$@" -a groups
|
||||
}
|
||||
|
||||
# provides completions for packages available from repositories
|
||||
# these can be specified as either 'package' or 'repository/package'
|
||||
_yaourt_completions_all_packages() {
|
||||
local -a cmd packages repositories packages_long
|
||||
_yaourt_get_command
|
||||
|
||||
if compset -P1 '*/*'; then
|
||||
packages=( $(_call_program packages $cmd[@] -Sql ${words[CURRENT]%/*}) )
|
||||
typeset -U packages
|
||||
_wanted repo_packages expl "repository/package" compadd ${(@)packages}
|
||||
else
|
||||
packages=( $(_call_program packages $cmd[@] -Sql) )
|
||||
typeset -U packages
|
||||
_wanted packages expl "packages" compadd - "${(@)packages}"
|
||||
|
||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||
typeset -U repositories
|
||||
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
|
||||
fi
|
||||
}
|
||||
|
||||
# provides completions for package groups
|
||||
_yaourt_completions_installed_groups() {
|
||||
local -a cmd groups
|
||||
_yaourt_get_command
|
||||
groups=(${(o)${(f)"$(_call_program groups $cmd[@] -Qg)"}% *})
|
||||
typeset -U groups
|
||||
compadd "$@" -a groups
|
||||
}
|
||||
|
||||
# provides completions for installed packages
|
||||
_yaourt_completions_installed_packages() {
|
||||
local -a cmd packages packages_long
|
||||
packages_long=(/var/lib/pacman/local/*(/))
|
||||
packages=( ${${packages_long#/var/lib/pacman/local/}%-*-*} )
|
||||
compadd "$@" -a packages
|
||||
}
|
||||
|
||||
# provides completions for repository names
|
||||
_yaourt_completions_repositories() {
|
||||
local -a cmd repositories
|
||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||
# Uniq the array
|
||||
typeset -U repositories
|
||||
compadd "$@" -a repositories
|
||||
}
|
||||
|
||||
# builds command for invoking pacman in a _call_program command - extracts
|
||||
# relevant options already specified (config file, etc)
|
||||
# $cmd must be declared by calling function
|
||||
_yaourt_get_command() {
|
||||
# this is mostly nicked from _perforce
|
||||
cmd=( "pacman" )
|
||||
integer i
|
||||
for (( i = 2; i < CURRENT - 1; i++ )); do
|
||||
if [[ ${words[i]} = "--config" || ${words[i]} = "--root" ]]; then
|
||||
cmd+=( ${words[i,i+1]} )
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# main dispatcher
|
||||
_pacman() {
|
||||
case $words[2] in
|
||||
-Q*g*) # ipkg groups
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:groups:_yaourt_completions_installed_groups'
|
||||
;;
|
||||
-Q*o*) # file
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:package file:_files'
|
||||
;;
|
||||
-Q*p*) # file *.pkg.tar.*
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_query_modifiers[@]" \
|
||||
'*:package file:_files -g "*.pkg.tar.*"'
|
||||
;;
|
||||
-Q*) _yaourt_action_query ;;
|
||||
-R*) _yaourt_action_remove ;;
|
||||
-S*c*) # no completion
|
||||
return 0
|
||||
;;
|
||||
-S*l*) # repos
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_sync_modifiers[@]" \
|
||||
'*:package repo:_yaourt_completions_repositories' \
|
||||
;;
|
||||
-S*g*) # pkg groups
|
||||
_arguments -s : \
|
||||
"$_yaourt_opts_common[@]" \
|
||||
"$_yaourt_opts_sync_modifiers[@]" \
|
||||
'*:package group:_yaourt_completions_all_groups'
|
||||
;;
|
||||
-S*) _yaourt_action_sync ;;
|
||||
-U*) _yaourt_action_upgrade ;;
|
||||
-V*) _yaourt_action_version ;;
|
||||
-h*) _yaourt_action_help ;;
|
||||
- ) _yaourt_action_none ;;
|
||||
* ) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# run the main dispatcher
|
||||
_pacman "$@"
|
||||
36
_zargs
36
_zargs
|
|
@ -1,36 +0,0 @@
|
|||
#compdef zargs
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for zargs.
|
||||
#
|
||||
# Source: http://smasher.org/tmp/_zargs.gz
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Atom Smasher <atom@smasher.org>
|
||||
# * Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_arguments -s -S \
|
||||
'(--eof -e)'{--eof=,-e+}'[Change the end-of-input-args string from "--" to eof-str]:string' \
|
||||
'(--exit -x)'{--exit,-x}'[Exit if the size (see --max-chars) is exceeded]' \
|
||||
'(--interactive -p)'{--interactive,-p}'[Prompt before executing each command line]' \
|
||||
'--help[Print this summary and exit]' \
|
||||
'(--max-args -n)'{--max-args=,-n+}'[Use at most max-args arguments per command line]:integer' \
|
||||
'(--max-chars -s)'{--max-chars=,-s+}'[Use at most max-chars characters per command line]:integer' \
|
||||
'(--max-lines -l)'{--max-lines=,-l+}'[Use at most max-lines of the input-args per command line]:integer' \
|
||||
'(--max-procs -P)'{--max-procs=,-P+}'[Run up to max-procs command lines in the background at once]:integer' \
|
||||
'(--no-run-if-empty, -r)'{--no-run-if-empty,-r}'[Do nothing if there are no input arguments before the eof-str]' \
|
||||
'(--null -0)'{--null,-0}'[Split each input-arg at null bytes, for xargs compatibility]' \
|
||||
'(--replace -i)'{--replace=,-i+}'[Substitute replace-str in the initial-args by each initial-arg]:string' \
|
||||
'(--verbose -t)'{--verbose,-t}'[Print each command line to stderr before executing it]' \
|
||||
'--version[Print the version number and exit]' \
|
||||
'(-):command: _command_names -e' \
|
||||
'*::args: _normal'
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
#compdef ab
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for ab 2.4 (https://httpd.apache.org/docs/2.4/programs/ab.html)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'-A[Supply BASIC Authentication credential to the server]:auth' \
|
||||
'-b[Size of TCP send/receive buffer in bytes]:bytes' \
|
||||
'-B[Address to bind to when making outgoing connections]:address' \
|
||||
'-c[Number of multiple requests to perform at a time(Default 1)]:num' \
|
||||
'*-C[Add a cookie]:cookie' \
|
||||
'-d[Do not display "percentage served within XX ms table"]' \
|
||||
'-e[Write a CSV file which contains the time it took to serve that percentage of the requests]:file:_files' \
|
||||
'-E[Specify client certificate in PEM format to authenticate with the server]:file:_files' \
|
||||
'-f[Specify SSL/TLS protocol]:protocol:(SSL2 SSL3 TLS1 TLS1.1 TLS1.2 ALL)' \
|
||||
'-g[Write all measured values out as a "gnuplot" or TSV file]:file:_files' \
|
||||
'(- *)-h[Display usage information]' \
|
||||
'*-H[Append extra headers to the request]:header' \
|
||||
'-i[Do HEAD requests instead of GET]' \
|
||||
'-k[Enable the HTTP KeepAlive feature]' \
|
||||
'-l[Do not report errors if the length of the responses is not constant]' \
|
||||
'-m[Custom HTTP method for the requests]:method:(DELETE GET HEAD POST PUT)' \
|
||||
'-n[Number of requests to perform for the benchmarking session]:requests' \
|
||||
'-p[File containing data to POST, remember to also set -T]:file:_files' \
|
||||
'-P[Supply BASIC Authentication credentials to a proxy en-route]:auth' \
|
||||
'-q[Suppress messages when processing more than 150 requests]' \
|
||||
'-r[Do not exit on socket receive errors]' \
|
||||
'-s[Maximum number of seconds to wait before the socket times out(Default 30seconds)]:seconds' \
|
||||
'-S[Do not display the median and standard deviation values]' \
|
||||
'-t[Maximum number of seconds to spend for benchmarking]:time' \
|
||||
'-T[Content-Type header to use for POST/PUT data]:content_type' \
|
||||
'-u[File containing data to PUT, remember to also set -T]:file:_files' \
|
||||
'-v[Set verbosity level]:level:(1 2 3 4)' \
|
||||
'(- *)-V[Display version number and exit]' \
|
||||
'-w[Print out results in HTML tables]' \
|
||||
'*-x[String to use as attributes for "table" tag]:attribute' \
|
||||
'-X[use a proxy server for the requests]:proxy' \
|
||||
'*-y[String to use as attributes for "tr" tag]:attribute' \
|
||||
'*-z[String to use as attributes for "td" tag]:attribute' \
|
||||
'-Z[Specify SSL/TLS cipher suite(See openssl ciphers)]:cipher' \
|
||||
'*:: :_urls'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
#compdef afew
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for afew(version 3.0.1) an initial tagging script for notmuch mail.
|
||||
# (https://github.com/teythoon/afew)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Jindřich Pilař (https://github.com/JindrichPilar)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- 1 *)'{-h,--help}'[display usage information]' \
|
||||
'(- 1 *)'{-V,--version}"[show program's version number and exit]" \
|
||||
"(-t --tag -m --move-mails)"{-w,--watch}"[continuously monitor the mailbox for new messages matching the given query]" \
|
||||
"(-m --move-mails -w --watch)"{-t,--tag}"[run the tag filters]" \
|
||||
"(-w --watch -m --move-mails)"{-m,--move-mails}"[move mail files between maildir folders]" \
|
||||
"(-a --all)"{-a,--all}"[operate on all email]" \
|
||||
"(-n --new)"{-n,--new}"[operate on all new email]" \
|
||||
{-C,--notmuch-config=}"[specify path to notmuch configuration file]:files:_files" \
|
||||
{-e,--enable-filters=}"[specify filter classes to use]:filter" \
|
||||
{-d,--dry-run}"[don't change the DB]" \
|
||||
{-R,--reference-set-size=}"[specify size of the reference set]:size [1000]" \
|
||||
{-T,--reference-set-timeframe-days=}"[don't use emails older than specified age]:age (days) [30]" \
|
||||
{-N,--notmuch-args=}"[arguments for notmuch new(in move mode)]:notmuch arg" \
|
||||
{-v,--verbose}"[be more verbose]" \
|
||||
'*: :_guard "^-*" query'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
#compdef age age-keygen
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for age 1.2.1 (https://github.com/FiloSottile/age).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Hydrargyrum (https://github.com/hydrargyrum)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
case $service in
|
||||
(age)
|
||||
_arguments \
|
||||
-A '-*' \
|
||||
'(- *)'{-h,--help}'[show help message and exit]' \
|
||||
'(-e --encrypt -d --decrypt)'{-e,--encrypt}'[Encrypt the input to the output. Default if omitted]' \
|
||||
'(-e --encrypt -d --decrypt -a --armor -p --passphrase -r --recipient -R --recipients-file)'{-d,--decrypt}'[Decrypt the input to the output]' \
|
||||
'(-o --output)'{-o,--output=}'[Write the result to the given file]:OUTPUT:_files' \
|
||||
'(-a --armor -d --decrypt)'{-a,--armor}'[Encrypt to a PEM encoded format]' \
|
||||
'(-p --passphrase -d --decrypt)'{-p,--passphrase}'[Encrypt with a passphrase]' \
|
||||
'(-d --decrypt)'\*{-r,--recipient=}'[Encrypt to the explicitly specified RECIPIENT]:RECIPIENT:' \
|
||||
'(-d --decrypt)'\*{-R,--recipients-file=}'[Encrypt to the RECIPIENTS listed in the file at PATH]:RECIPIENTS_FILE:_files' \
|
||||
\*{-i,--identity=}'[Use the given identify file]:IDENTITY:_files' \
|
||||
:INPUT:_files
|
||||
;;
|
||||
(age-keygen)
|
||||
_arguments \
|
||||
'(-o --output)'{-o,--output}'[write the result to the given file]:file:_files' \
|
||||
'-y[convert an identity file to a recipients file]' \
|
||||
'*:input'
|
||||
;;
|
||||
esac
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
#compdef archlinux-java
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for archlinux-java a tool for selecting default Java runtime (https://wiki.archlinux.org/index.php/java).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Jindřich Pilař (https://github.com/JindrichPilar)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_archlinux-java_command_arguments() {
|
||||
case $words[1] in
|
||||
(set)
|
||||
local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}")
|
||||
_describe -t output 'Java environments' java_versions
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_archlinux-java() {
|
||||
local -a commands
|
||||
|
||||
commands=(
|
||||
"status:List installed Java environments and enabled one"
|
||||
"get:Return the short name of the Java environment set as default"
|
||||
"set:Force <JAVA_ENV> as default"
|
||||
"unset:Unset current default Java environment"
|
||||
"fix:Fix an invalid/broken default Java environment configuration"
|
||||
"help:Show help"
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
'1:cmd:->cmds' \
|
||||
'*:: :->args' \
|
||||
|
||||
case "$state" in
|
||||
(cmds)
|
||||
_describe -t commands 'commands' commands
|
||||
;;
|
||||
(*)
|
||||
_archlinux-java_command_arguments
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_archlinux-java
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
#compdef atach
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for atach (https://github.com/sorin-ionescu/atach).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local state mode_values existing_sessions ret=1
|
||||
|
||||
mode_values=(
|
||||
"none:disable redrawing"
|
||||
"ctrl_l:use ctrl + l to redraw"
|
||||
"winch:use sigwinch to redraw"
|
||||
)
|
||||
|
||||
existing_sessions=($(_call_program session atach))
|
||||
|
||||
_arguments -C -s -S \
|
||||
'(--list -l)'{--list,-l}'[list sessions]' \
|
||||
'(--sockets -L)'{--sockets,-L}'[list sockets]' \
|
||||
'(--session -s)'{--session=,-s+}'[set the session name]:session' \
|
||||
'(--char -c)'{--char=,-c+}'[set the detach character (default: ^\\)]:char' \
|
||||
'(--redraw -r)'{--redraw=,-r+}'[set the redraw method (none, ctrl_l, or winch)]:mode:->mode' \
|
||||
'(--detached -d)'{--detached,-d}'[start the session detached]' \
|
||||
'(--no-detach -D)'{--no-detach,-D}'[disable detaching]' \
|
||||
'(--no-suspend -Z)'{--no-suspend,-Z}'[disable suspending]' \
|
||||
'(--version -v)'{--version,-v}'[display version and copyright]' \
|
||||
'(--help -h)'{--help,-h}'[display help]' \
|
||||
'(-)::args:->session-or-command' && ret=0
|
||||
|
||||
case "$state" in
|
||||
(mode)
|
||||
_describe -t mode 'redraw mode' mode_values && ret=0
|
||||
;;
|
||||
(session-or-command)
|
||||
_describe -t 'session' 'sessions' existing_sessions && ret=0
|
||||
_path_commands && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
#compdef augmatch
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for augmatch 1.14.1 (https://augeas.net/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_augmatch_lens() {
|
||||
local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//'))
|
||||
_values lenses $lenses
|
||||
}
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'(-a --all)'{-a,--all}'[print all tree nodes, even ones without an associated value]' \
|
||||
'(-e --extract)'{-e,--extract}'[only print the parts of the tree that are matched with --match]' \
|
||||
\*{-I,--include=}'[add directory to the module loadpath]:dir:_files -/' \
|
||||
'(-l --lens)'{-l,--lens=}'[use lens for the given file]:lens:_augmatch_lens' \
|
||||
'(-L --print-lens)'{-L,--print-lens}'[print the name of lens]' \
|
||||
'(-m --match)'{-m,--match=}'[only print the parts of the tree that match]:expr' \
|
||||
'(-r --root)'{-r,--root=}'[use directory as the root of the filesystem]:dir:_files -/' \
|
||||
'(-S --nostdinc)'{-S,--nostdinc}'[do not search any of the default directories for lenses]' \
|
||||
'(-o --only-value)'{-o,--only-value}'[print only the value and not label or the path of nodes]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[do not print anything]' \
|
||||
'*:: :_files'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
#compdef augparse
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for augparse 1.14.1 (https://augeas.net/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'(- *)--version[print version information and exit]' \
|
||||
\*{-I,--include=}'[add directory to the module loadpath]:dir:_files -/' \
|
||||
'(-t --trace)'{-t,--trace}'[print a trace of modules that are being loaded]' \
|
||||
'--nostdinc[do not search any of the default directories for modules]' \
|
||||
'--notypecheck[do not perform lens type checks]' \
|
||||
'*:: :_files'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
#compdef augprint
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for augprint 1.14.1 (https://augeas.net/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_augprint_lens() {
|
||||
local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//'))
|
||||
_values lenses $lenses
|
||||
}
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[include the original numbered paths as comments in the output]' \
|
||||
'(-r --regexp)'{-r-,--regexp=-}'[generate regular expressions to match values]:num' \
|
||||
'(-l --lens)'{-l,--lens=}'[use lens for the given file]:lens:_augprint_lens' \
|
||||
'(-t --target)'{-t,--target=}'[generate the script as if its path was really targetfile]:file:_files' \
|
||||
'(-s --noseq)'{-s,--noseq}'[do not use "seq::*" in the output]' \
|
||||
'*:: :_files'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
#compdef avdmanager
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for avdmanager(https://developer.android.com/studio/command-line/avdmanager)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_avdmanager() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments -C -A "-*" \
|
||||
'(- *)'{-h,--help}'[Print help message]' \
|
||||
'(-s --silent)'{-s,--silent}'[Silent mode, shows error only]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Verbose mode, shows errors, warnings and all messages]' \
|
||||
'--clear-cache[Clear the SDK Manager repository manifest cache]' \
|
||||
'1: :_avdmanager_subcommands' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(args)
|
||||
if (( $+functions[_avdmanager_${words[1]}] )); then
|
||||
_avdmanager_${words[1]} && ret=0
|
||||
else
|
||||
ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_avdmanager_list] )) ||
|
||||
_avdmanager_list() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :(avd target device)' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(avd|target|device)
|
||||
_arguments \
|
||||
'(-0 --null)'{-0,--null}'[Terminate lines with \0 instead of \n]' \
|
||||
'(-c --compact)'{-c,--compact}'[Compact output]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_avdmanager_create] )) ||
|
||||
_avdmanager_create() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :(avd)' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(avd)
|
||||
_arguments \
|
||||
'(-c --sdcard)'{-c,--sdcard}'[Path to a shared SD card image]: :_files' \
|
||||
'(-g --tag)'{-g,--tag}'[The sys-img tag to use for the AVD]:tag' \
|
||||
'(-p --path)'{-p,--path}'[Directory where the new AVD will be created]' \
|
||||
'(-k --package)'{-k,--package}'[Package path of the system image for this AVD]:package' \
|
||||
'(-n --name)'{-n,--name}'[Name of the new AVD]:name' \
|
||||
'--skin[The optional name of a skin to use with this device]' \
|
||||
'(-f --force)'{-f,--force}'[Forces creation]' \
|
||||
'(-b --abi)'{-b,--abi}'[The ABI to use for the AVD]:abi' \
|
||||
'(-d --device)'{-d,--device}'[The optional device definition to use]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_avdmanager_move] )) ||
|
||||
_avdmanager_move() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :(avd)' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(avd)
|
||||
_arguments \
|
||||
'(-p --path)'{-p,--path}"[Path to the AVD's new directory]: :_files -/" \
|
||||
'(-n --name)'{-n,--name}'[Name of the AVD to delete]: :_avdmanager_avds' \
|
||||
'(-r --rename)'{-r,--rename}'[New name of the AVD]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_avdmanager_delete] )) ||
|
||||
_avdmanager_delete() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :(avd)' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(avd)
|
||||
_arguments \
|
||||
'(-n --name)'{-n,--name}'[Name of the AVD to delete]: :_avdmanager_avds' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_avdmanager_subcommands] )) ||
|
||||
_avdmanager_subcommands() {
|
||||
local -a commands=(
|
||||
"list:Lists existing targets or virtual devices"
|
||||
"create:Creates a new Android Virtual Device"
|
||||
"move:Moves or renames an Android Virtual Device"
|
||||
"delete:Deletes an Android Virtual Device"
|
||||
)
|
||||
_describe -t commands 'subcommand' commands
|
||||
}
|
||||
|
||||
(( $+functions[_avdmanager_avds] )) ||
|
||||
_avdmanager_avds() {
|
||||
local -a avds=(${(@f)"$(avdmanager list avd -c)"})
|
||||
_values 'android virtual devices' $avds
|
||||
}
|
||||
|
||||
_avdmanager "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,318 @@
|
|||
#compdef aac2mp4 mp42aac mp42avc mp42hevc mp42hls mp42ts mp4compact mp4dash mp4dashclone mp4dcfpackager mp4decrypt mp4dump mp4edit mp4encrypt mp4extract mp4fragment mp4hls mp4iframeindex mp4info mp4mux mp4rtphintinfo mp4split mp4tag
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for bento4 tools 1.6.0-641 (https://github.com/axiomatic-systems/Bento4)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local -a encrypt_methods=(
|
||||
OMA-PDCF-CBC OMA-PDCF-CTR MARLIN-IPMP-ACBC MARLIN-IPMP-ACGK ISMA-IAEC PIFF-CBC
|
||||
PIFF-CTR MPEG-CENC MPEG-CBC1 MPEG-CENS MPEG-CBCS
|
||||
)
|
||||
local -a options=()
|
||||
|
||||
case $service in
|
||||
(mp42aac|mp42avc|mp42hevc)
|
||||
options+=('--key[128-bit decryption key (in hex: 32 chars)]:key')
|
||||
;;
|
||||
(mp42hls)
|
||||
options+=(
|
||||
'--verbose[enable verbose mode]'
|
||||
'--show-info[show information]'
|
||||
'--hls-version[HLS version(default: 3)]:version'
|
||||
'--pmt-pid[PID to use for the PMT(default: 0x100)]:pid'
|
||||
'--audio-pid[PID to use for audio packets(default: 0x101)]:pid'
|
||||
'--video-pid[PID to use for video packets(default: 0x102)]:pid'
|
||||
'--audio-track-id[Read audio from the given track ID(0 means no audio)]:track_id'
|
||||
'--video-track-id[Read video from the given track ID(0 means no video)]:track_id'
|
||||
'--audio-format[Format to use for audio-only segments(default: ts)]:format:(ts packed)'
|
||||
'--segment-duration[Target segment duration in seconds(default: 6)]:seconds'
|
||||
'--segment-duration-threshold[Segment duration threshold in milliseconds(default: 15)]:seconds'
|
||||
'--pcr-offset[offset in units of 90kHz(default: 1000)]:offset'
|
||||
'--index-filename[File name to use for the playlist/index(default: stream.m3u8)]:name:_files'
|
||||
'--allow-cache[set #EXT-X-ALLOW_CACHE to YES or NO]: :(YES NO)'
|
||||
'--segment-filename-template[File name pattern to use for the segment(default: segment-%d.<ext> or stream.<ext>)]:pattern'
|
||||
'--segment-url-template[URL pattern to use for segments(default: segment-%d.<ext> or stream.<ext>)]:pattern'
|
||||
'--iframe-index-filename[File name to use for the I-Frame playlist(default: iframes.m3u8)]:file:_files'
|
||||
'--output-single-file[Output all the media in a single file instead of separate segment files]'
|
||||
'--encryption-mode[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)'
|
||||
'--encryption-key[Encryption key in hexadecimal(default: no encryption)]:key'
|
||||
'--encryption-iv-mode[Encryption IV mode(default: separate)]:mode:(sequence random fps)'
|
||||
'--encryption-key-uri[Encryption key URI, relative or absolute URI(default: key.bin)]:uri'
|
||||
'--encryption-key-format[Encryption key format(default: identity)]:format'
|
||||
'--encryption-key-format-versions[Encryption key format versions]:versions'
|
||||
'--encryption-key-line[Preformatted encryption key line]:ext_x_key_line'
|
||||
)
|
||||
;;
|
||||
(mp42ts)
|
||||
options+=(
|
||||
'--pmt-pid[PID to use for the PMT(default: 0x100)]:pid'
|
||||
'--audio-pid[PID to use for audio packets(default: 0x101)]:pid'
|
||||
'--video-pid[PID to use for video packets(default: 0x102)]:pid'
|
||||
'--segment[Segment duration in seconds]:seconds'
|
||||
'--segment-duration-threshold[Segment duration threshold in milliseconds(default: 50)]:seconds'
|
||||
'--pcr-offset[offset in units of 90kHz(default: 1000)]:offset'
|
||||
'--verbose[enable verbose mode]'
|
||||
'--playlist[Playlist file name]:file:_files'
|
||||
'--playlist-hls-version[HLS version(default: 3)]:version'
|
||||
)
|
||||
;;
|
||||
(mp4compact)
|
||||
options+=('--verbose[Enable verbose mode]')
|
||||
;;
|
||||
(mp4dash)
|
||||
options+=(
|
||||
'(- *)'{-h,--help}'[Show help message and exit]'
|
||||
'(-v --verbose)'{-v,--verbose}'[Be verbose]'
|
||||
'(-d --debug)'{-d,--debug}'[Print out debugging information]'
|
||||
'(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/'
|
||||
'(-f --force)'{-f,--force}'[Allow output to an existing directory]'
|
||||
'--mpd-name=[MPD file name]:file:_files'
|
||||
'--profiles=[Comma-separated list of one or more profile(s)]:profiles'
|
||||
'--no-media[Do not output media files (MPD/Manifests only)]'
|
||||
'--rename-media[Use a file name pattern instead of the base name of input files]'
|
||||
'--media-prefix=[Use this prefix for prefixed media file names(default: media)]:prefix'
|
||||
'--init-segment=[Initialization segment name]:file:_files'
|
||||
'--no-split[Do not split the file into individual segment files]'
|
||||
'--use-segment-list[Use segment lists instead of segment templates]'
|
||||
'--use-segment-template-number-padding[Use padded numbers in segment URL/filename templates]'
|
||||
'--use-segment-timeline[Use segment timelines]'
|
||||
'--min-buffer-time=[Minimum buffer time in seconds]:seconds'
|
||||
'--max-playout-rate=[Max Playout Rate setting strategy for trick-play support]:strategy:(lowest:X)'
|
||||
'--language-map=[Remap language code <lang_from> to <lang_to>]:from_to_list'
|
||||
'--always-output-lang[Always output an @lang attribute for audio tracks]'
|
||||
'--subtitles[Enable Subtitles]'
|
||||
*'--attributes=[Specify the attributes of a set of tracks]:attribute'
|
||||
'--smooth[Produce an output compatible with Smooth Streaming]'
|
||||
'--smooth-client-manifest-name=[Smooth Streaming Client Manifest file name]:file:_files'
|
||||
'--smooth-server-manifest-name=[Smooth Streaming Server Manifest file name]:file:_files'
|
||||
'--smooth-h264-fourcc=[Smooth Streaming FourCC value for H.264 video(default H264)]:fourcc'
|
||||
'--hls[Output HLS playlists in addition to MPEG DASH]'
|
||||
'--hls-key-url=[HLS key URL (default: key.bin)]:url'
|
||||
'--hls-master-playlist-name=[HLS master playlist name (default: master.m3u8)]:file:_files'
|
||||
'--hls-media-playlist-name=[HLS media playlist name (default: media.m3u8)]:file:_files'
|
||||
'--hls-iframes-playlist-name=[HLS I-Frames playlist name (default: iframes.m3u8)]'
|
||||
'--hippo[Produce an output compatible with the Hippo Media Server]'
|
||||
'--hippo-server-manifest-name=[Hippo Media Server Manifest file name]:file:_files'
|
||||
'--use-compat-namespace[Use the original DASH MPD namespace]'
|
||||
'--use-legacy-audio-channel-config-uri[Use the legacy DASH namespace URI]'
|
||||
'--encryption-key=[Encryption key specifications]:key_spec'
|
||||
'--encryption-cenc-scheme=[MPEG Common Encryption scheme(default: cenc)]:scheme:(cenc cbc1 cens cbcs)'
|
||||
'--encryption-args=[Pass additional command line arguments to mp4encrypt]:args'
|
||||
'--eme-signaling=[Add EME-compliant signaling in the MPD and PSSH boxes]:type:(pssh-v0 pssh-v1)'
|
||||
'--merge-keys[Merge all keys in a single set used for all ContentProtection elements]'
|
||||
'--marlin[Add Marlin signaling to the MPD]'
|
||||
'--marlin-add-pssh[Add an (optional) Marlin "pssh" box in the init segment(s)]'
|
||||
'--playready[Add PlayReady signaling to the MPD]'
|
||||
'--playready-version=[PlayReady version to use]:version:(4.0 4.1 4.2 4.3)'
|
||||
'--playready-header=[Add a PlayReady PRO element in the MPD and a PlayReady PSSH box in the init segments]:header'
|
||||
'--playready-no-pssh[Do not store the PlayReady header in a "pssh" box in the init segment(s)]'
|
||||
'--widevine[Add Widevine signaling to the MPD]'
|
||||
'--widevine-header=[Add a Widevine entry in the MPD, and a Widevine PSSH box in the init segments]:header'
|
||||
'--primetime[Add Primetime signaling to the MPD]'
|
||||
'--primetime-metadata=[Add Primetime metadata in a PSSH box in the init segments]:metadata'
|
||||
'--fairplay-key-uri=[Specify the key URI to use for FairPlay Streaming key delivery]:uri'
|
||||
'--clearkey[Add Clear Key signaling to the MPD]'
|
||||
'--clearkey-license-uri=[Specify the license/key URI to use for Clear Key]'
|
||||
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
|
||||
)
|
||||
;;
|
||||
(mp4dashclone)
|
||||
options+=(
|
||||
'(- *)'{-h,--help}'[Show help message and exit]'
|
||||
'--quiet[Be quiet]'
|
||||
'--encrypt=[Encrypt the media with KID and KEY specified in HEX(32 characters each)]:key'
|
||||
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
|
||||
)
|
||||
;;
|
||||
(mp4dcfpackager)
|
||||
options+=(
|
||||
'--method[method name]:method:(NULL CBC CTR)'
|
||||
'--content-type[Content MIME type]:mime_type'
|
||||
'--content-id[Content ID]:id'
|
||||
'--rights-issuer[rights issuer URL]:url'
|
||||
'--key[Specify the key to use for encryption]:key'
|
||||
*'--textual-header[Specify a textual header]:header'
|
||||
)
|
||||
;;
|
||||
(mp4decrypt)
|
||||
options+=(
|
||||
'--show-progress[Show progress details]'
|
||||
'--key[Specify the key to use for decryption]:key'
|
||||
'--fragments-info[File to decrypt the fragments read from]:file:_files'
|
||||
)
|
||||
;;
|
||||
(mp4dump)
|
||||
options+=(
|
||||
'--verbosity[Set the verbosity level]:level:(0 1 2 3)'
|
||||
'--track[Write the track data into a file]:file:_files'
|
||||
'--format[Format to use for the output(default: text)]:format:(text json)'
|
||||
)
|
||||
;;
|
||||
(mp4edit)
|
||||
options+=(
|
||||
'--insert[insert atom data]:atom_path_and_source_and_position'
|
||||
'--remove[remove atom data]:atom_path'
|
||||
'--replace[replace atom data]:atom_path_and_source'
|
||||
)
|
||||
;;
|
||||
(mp4encrypt)
|
||||
options+=(
|
||||
'--method=[Encryption method]:method:($encrypt_methods)'
|
||||
'--show-progress[Show progress details]'
|
||||
'--fragments-info[Encrypt the fragments read from <input> with track info read from the given file]:file:_files'
|
||||
'--multi[Encrypt multiple individual fragment files]'
|
||||
'--key[Specify the key to use for a track (or group key)]:key_spec'
|
||||
'--strict[Fail if there is a warning]'
|
||||
*'--property[Specify a named string property for a track]:property'
|
||||
'--global-option[Set the global option]:option'
|
||||
'--pssh[Add a "pssh" atom for this system ID with the payload]:pssh'
|
||||
'--pssh-v1[Same as --pssh but generates a version=1 "pssh" atom]:pssh'
|
||||
'--kms-uri[Specify the KMS URI for the ISMA-IAEC method]:uri'
|
||||
)
|
||||
;;
|
||||
(mp4extract)
|
||||
options+=(
|
||||
'--payload-only[Omit the atom header]'
|
||||
)
|
||||
;;
|
||||
(mp4fragment)
|
||||
options+=(
|
||||
'--verbosity[Set the verbosity level]:level:(0 1 2 3)'
|
||||
'--debug[Enable debugging information output]'
|
||||
'--quiet[Do not print out notice messages]'
|
||||
'--fragment-duration[Fragment duration in milliseconds(default: automatic)]:msecs'
|
||||
'--timescale[Time scale]:time_scale'
|
||||
'--track[Specify track ID or type only include media from one track]:id_or_type:(audio video subtitles)'
|
||||
'--index[(Re)create the segment index]'
|
||||
'--trim[Trim excess media in longer tracks]'
|
||||
'--no-tfdt[Do not add "tfdt boxes in the fragments"]'
|
||||
'--tfdt-start[Set start value of the first tfdt timestamp]:start'
|
||||
'--sequence-number-start[Set start value of the first segment sequence number(default: 1)]:number'
|
||||
'--force-i-frame-sync[Treat all I-frames as sync samples]:type:(auto all)'
|
||||
'--copy-udta[Copy the moov/udta atom from input to output]'
|
||||
'--no-zero-elst[Do not set the last edit list entry to 0 duration]'
|
||||
'--trun-version-zero[Set the "trun" box version to zero(default version: 1)]'
|
||||
)
|
||||
;;
|
||||
(mp4hls)
|
||||
options+=(
|
||||
'(- *)'{-h,--help}'[Show help message and exit]'
|
||||
'(-v --verbose)'{-v,--verbose}'[Be verbose]'
|
||||
'(-d --debug)'{-d,--debug}'[Print out debugging information]'
|
||||
'(-o --output-dir)'{-o,--output-dir=}'[Output directory]:dir:_files -/'
|
||||
'(-f --force)'{-f,--force}'[Allow output to an existing directory]'
|
||||
'--hls-version=[HLS version]:version'
|
||||
'--master-playlist-name=[Master Playlist name]:file:_files'
|
||||
'--media-playlist-name=[Media Playlist name]:file:_files'
|
||||
'--iframe-playlist-name=[I-frame Playlist name]:name'
|
||||
'--output-single-file[Store segment data in a single output file per input file]'
|
||||
'--audio-format=[Format for audio segments]:format:(packed ts)'
|
||||
'--segment-duration=[Segment duration(default: 6)]:duration'
|
||||
'--encryption-mode=[Encryption mode(default: AES-128)]:mode:(AES-128 SAMPLE-AES)'
|
||||
'--encryption-key=[Encryption key in hexadecimal]:key'
|
||||
'--encryption-iv-mode=[Encryption IV mode]:mode:(sequence random fps)'
|
||||
'--encryption-key-uri=[Encryption key URI(default: key.bin)]:uri'
|
||||
'--encryption-key-format=[Encryption key format (default: identity)]:mode:(identity)'
|
||||
'--encryption-key-format-versions=[Encryption key format versions]:versions'
|
||||
'--signal-session-key[Signal an #EXT-X-SESSION-KEY tag in the master playlist]'
|
||||
'--fairplay=[Enable FairPlay Key Delivery and set parameters]:parameters'
|
||||
'--widevine=[Enable Widevine Key Delivery and set parameters]:parameters'
|
||||
'--output-encryption-key[Output the encryption key to a file]'
|
||||
'--exec-dir=[Directory where the Bento4 executables are located]:dir:_files -/'
|
||||
'--base-url=[The base URL for the Media Playlists and TS files listed in the playlists]:uri'
|
||||
)
|
||||
;;
|
||||
(mp4iframeindex)
|
||||
options+=(
|
||||
'--track[ID of the video track]:id'
|
||||
)
|
||||
;;
|
||||
(mp4info)
|
||||
options+=(
|
||||
'--verbose[Show extended information when available]'
|
||||
'--format[Display the information in this format(default: text)]:format:(text json)'
|
||||
'--show-layout[Show sample layout]'
|
||||
'--show-samples[Show sample details]'
|
||||
'--show-sample-data[Show sample data]'
|
||||
'--fast[Skip some details that are slow to compute]'
|
||||
)
|
||||
;;
|
||||
(mp4mux)
|
||||
options+=(
|
||||
*'--track=[Track type, input, parameters]:track'
|
||||
'--verbose[Show more details]'
|
||||
)
|
||||
;;
|
||||
(mp4rtphintinfo)
|
||||
options+=(
|
||||
'--trackid[Hint track ID]:id'
|
||||
)
|
||||
;;
|
||||
(mp4split)
|
||||
options+=(
|
||||
'--verbose[Print verbose information when running]'
|
||||
'--init-segment[Name of init segment(default: init.mp4)]:file:_files'
|
||||
'--init-only[Only output the init segment(no media segments)]'
|
||||
'--media-segment[Segment file name pattern(default: segment-%llu.%04llu.m4s)]:pattern'
|
||||
'--start-number[Start numbering segments at n(default=1)]:number'
|
||||
'--pattern-parameters[One or more selector letter(default: IN)]:params'
|
||||
'--track-id[Only output segments with this track ID]:id'
|
||||
'--audio[Only output audio segments]'
|
||||
'--video[Only output video segments]'
|
||||
)
|
||||
;;
|
||||
(mp4tag)
|
||||
options+=(
|
||||
'--help[Print this usage information]'
|
||||
'--show-tags[Show tags found in the input file]'
|
||||
'--list-symbols[List all the builtin symbols]'
|
||||
'--list-keys[List all the builtin symbolic key names]'
|
||||
'--set[Set a tag]:tag'
|
||||
'--add[Set/Add a tag]:tag'
|
||||
'--remove[Remove a tag]:key'
|
||||
'--extract[extract the value of a tag and save it to a file]:key_file'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments \
|
||||
"${options[@]}" \
|
||||
"*::file:_files"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
#compdef bitcoin-cli
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for bitcoin-cli v29.0.0 (https://bitcoin.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Ian Ker-Seymer (https://github.com/ianks)
|
||||
# * notmike (https://github.com/notmike-5)
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_bitcoin-cli() {
|
||||
local context state line curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
-?'[Show help message]' \
|
||||
-addrinfo'[Get the number of addresses known to the node, per network and total]' \
|
||||
-chain='[Use the chain <chain> (default: main). Allowed values: main, test, signet, regtest]:chain:(main test signet regtest)' \
|
||||
-color='[Color setting for CLI output (default: auto)]:when:(always auto never)' \
|
||||
-conf='[Specify configuration file. Relative paths will be prefixed by datadir location. (default: bitcoin.conf)]:PATH:_files' \
|
||||
-datadir='[Specify data directory]:PATH:_directories' \
|
||||
-getinfo'[Get general information from the remote server]' \
|
||||
-testnet'[Use the test chain]' \
|
||||
-regtest'[Enter regression test mode]' \
|
||||
-named'[Pass named instead of positional arguments (default: false)]' \
|
||||
-netinfo=-'[Get network peer connection information from the remote server.]::level_or_help:(0 1 2 3 4 help)' \
|
||||
-stdin'[Read extra arguments from standard input, one per line until EOF/Ctrl-D]' \
|
||||
-rpcport='[Connect to JSON-RPC on <port> (default: 8332, testnet: 18332, regtest: 18443)]: :_guard "[[\:digit\:]]#" "PORT"' \
|
||||
-rpcwait'[Wait for RPC server to start]' \
|
||||
-rpcwaittimeout='[Timeout in seconds to wait for the RPC server to start, or 0 for no timeout. (default: 0)]:timeout' \
|
||||
-rpcuser='[Username for JSON-RPC connections]:RPCUSER:()' \
|
||||
-rpcpassword='[Password for JSON-RPC connections]:RPCPASSWORD:()' \
|
||||
-rpccookiefile='[Location of the auth cookie(default: data dir)]:dir:_files' \
|
||||
-rpcwallet='[Send RPC for non-default wallet on RPC server]:server' \
|
||||
-rpcconnect='[Send commands to node running on <ip> (default: 127.0.0.1)]:RPCCONNECT:_hosts' \
|
||||
-rpcclienttimeout='[Timeout during HTTP requests, or 0 for no timeout. (default: 900)]: :_guard "[[\:digit\:]]#" "RPCCLIENTTIMEOUT"' \
|
||||
-version'[Print version and exit]' \
|
||||
':subcommand:->subcommand' && ret=0
|
||||
|
||||
case $state in
|
||||
subcommand)
|
||||
subcommands=(
|
||||
'dumptxoutset'
|
||||
'getbestblockhash'
|
||||
'getblock'
|
||||
'getblockchaininfo'
|
||||
'getblockcount'
|
||||
'getblockfilter'
|
||||
'getblockfrompeer'
|
||||
'getblockhash'
|
||||
'getblockheader'
|
||||
'getblockstats'
|
||||
'getchainstates'
|
||||
'getchaintips'
|
||||
'getchaintxstats'
|
||||
'getdeploymentinfo'
|
||||
'getdifficulty'
|
||||
'getmempoolancestors'
|
||||
'getmempooldescendants'
|
||||
'getmempoolentry'
|
||||
'getmempoolinfo'
|
||||
'getrawmempool'
|
||||
'gettxout'
|
||||
'gettxoutproof'
|
||||
'gettxoutsetinfo'
|
||||
'gettxspendingprevout'
|
||||
'importmempool'
|
||||
'loadtxoutset'
|
||||
'preciousblock'
|
||||
'pruneblockchain'
|
||||
'savemempool'
|
||||
'scanblocks'
|
||||
'scantxoutset'
|
||||
'verifychain'
|
||||
'verifytxoutproof'
|
||||
'getmemoryinfo'
|
||||
'getrpcinfo'
|
||||
'help'
|
||||
'logging'
|
||||
'stop'
|
||||
'uptime'
|
||||
'getblocktemplate'
|
||||
'getmininginfo'
|
||||
'getnetworkhashps'
|
||||
'getprioritisedtransactions'
|
||||
'prioritisetransaction'
|
||||
'submitblock'
|
||||
'submitheader'
|
||||
'addnode'
|
||||
'clearbanned'
|
||||
'disconnectnode'
|
||||
'getaddednodeinfo'
|
||||
'getaddrmaninfo'
|
||||
'getconnectioncount'
|
||||
'getnettotals'
|
||||
'getnetworkinfo'
|
||||
'getnodeaddresses'
|
||||
'getpeerinfo'
|
||||
'listbanned'
|
||||
'ping'
|
||||
'setban'
|
||||
'setnetworkactive'
|
||||
'analyzepsbt'
|
||||
'combinepsbt'
|
||||
'combinerawtransaction'
|
||||
'converttopsbt'
|
||||
'createpsbt'
|
||||
'createrawtransaction'
|
||||
'decodepsbt'
|
||||
'decoderawtransaction'
|
||||
'decodescript'
|
||||
'descriptorprocesspsbt'
|
||||
'finalizepsbt'
|
||||
'fundrawtransaction'
|
||||
'getrawtransaction'
|
||||
'joinpsbts'
|
||||
'sendrawtransaction'
|
||||
'signrawtransactionwithkey'
|
||||
'submitpackage'
|
||||
'testmempoolaccept'
|
||||
'utxoupdatepsbt'
|
||||
'enumeratesigners'
|
||||
'createmultisig'
|
||||
'deriveaddresses'
|
||||
'estimatesmartfee'
|
||||
'getdescriptorinfo'
|
||||
'getindexinfo'
|
||||
'signmessagewithprivkey'
|
||||
'validateaddress'
|
||||
'verifymessage'
|
||||
'abandontransaction'
|
||||
'abortrescan'
|
||||
'backupwallet'
|
||||
'bumpfee'
|
||||
'createwallet'
|
||||
'createwalletdescriptor'
|
||||
'encryptwallet'
|
||||
'getaddressesbylabel'
|
||||
'getaddressinfo'
|
||||
'getbalance'
|
||||
'getbalances'
|
||||
'gethdkeys'
|
||||
'getnewaddress'
|
||||
'getrawchangeaddress'
|
||||
'getreceivedbyaddress'
|
||||
'getreceivedbylabel'
|
||||
'gettransaction'
|
||||
'getunconfirmedbalance'
|
||||
'getwalletinfo'
|
||||
'importdescriptors'
|
||||
'importprunedfunds'
|
||||
'keypoolrefill'
|
||||
'listaddressgroupings'
|
||||
'listdescriptors'
|
||||
'listlabels'
|
||||
'listlockunspent'
|
||||
'listreceivedbyaddress'
|
||||
'listreceivedbylabel'
|
||||
'listsinceblock'
|
||||
'listtransactions'
|
||||
'listunspent'
|
||||
'listwalletdir'
|
||||
'listwallets'
|
||||
'loadwallet'
|
||||
'lockunspent'
|
||||
'migratewallet'
|
||||
'psbtbumpfee'
|
||||
'removeprunedfunds'
|
||||
'rescanblockchain'
|
||||
'restorewallet'
|
||||
'send'
|
||||
'sendall'
|
||||
'sendmany'
|
||||
'sendtoaddress'
|
||||
'setlabel'
|
||||
'settxfee'
|
||||
'setwalletflag'
|
||||
'signmessage'
|
||||
'signrawtransactionwithwallet'
|
||||
'simulaterawtransaction'
|
||||
'unloadwallet'
|
||||
'upgradewallet'
|
||||
'walletcreatefundedpsbt'
|
||||
'walletdisplayaddress'
|
||||
'walletlock'
|
||||
'walletpassphrase'
|
||||
'walletpassphrasechange'
|
||||
'walletprocesspsbt'
|
||||
'getzmqnotifications'
|
||||
)
|
||||
|
||||
_describe -t subcommands 'bitcoin-cli subcommands' subcommands && ret=0
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_bitcoin-cli "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
#compdef blkid
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion for blkid, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
|
||||
# - locate/print block device attributes
|
||||
# https://man7.org/linux/man-pages/man8/blkid.8.html
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
# * Aditi Sharma (https://github.com/Aditi76117)
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(-c --cache-file)'{-c+,--cache-file}'[Read from cachefile instead of reading from the default cache file]:cache file:_files' \
|
||||
'(-d --no-encoding)'{-d,--no-encoding}"[Don't encode non-printing characters]" \
|
||||
'(-D --no-part-details)'{-D,--no-part-details}"[Don't print information from partition table in low-level probing mode]" \
|
||||
'(-g --garbage-collect)'{-g,--garbage-collect}'[Perform a garbage collection on the blkid cache]' \
|
||||
'(-H --hint)'{-H,--hint}'[Set probing hint]:setting' \
|
||||
'(-i --info)'{-i,--info}'[Display information about I/O limits]' \
|
||||
'(-k --list-filesystems)'{-k,--list-filesystems}'[List all known filesystems and RAIDS and exits]' \
|
||||
'(-l --list-one)'{-l,--list-one}'[Look up only one device that matches with the --match-token option]' \
|
||||
'(-L --label)'{-L+,--label}'[Look up the device that uses this filesystem label]:label' \
|
||||
'(-n --match-types)'{-n+,--match-types}'[Restrict the probing functions to the specified comma-separated list of superblock types]:list' \
|
||||
'(-o --output)'{-o+,--output}'[Use the specified output format]:format:(full value list device udev export)' \
|
||||
'(-O --offset)'{-O+,--offset}'[Probe at the given offset]:offset' \
|
||||
'(-p --probe)'{-p,--probe}'[Switch to low-level superblock probing mode]' \
|
||||
'(-s --match-tag)'{-s+,--match-tag}'[Show only the tags that match tag]:tag' \
|
||||
'(-S --size)'{-S,--size}'[Override the size of device/file]' \
|
||||
'(-t --match-token)'{-t+,--match-token}'[Search for block devices with tokens named NAME that have the VALUE]:name' \
|
||||
'(-u --usages)'{-u,--usages}'[Restrict the probing functions to the specified comma-separated list of usage types]:list' \
|
||||
'(-U --uuid)'{-U,--uuid}'[Look up the device that uses this filesystem uuid]:uuid' \
|
||||
'(- *)'{-h,--help}'[Display help text and exit]' \
|
||||
'(- *)'{-V,--version}'[Print version and exit]' \
|
||||
'*:device:_files -W /dev'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
#compdef bower
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Bower (https://bower.io).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Joe Lencioni (https://github.com/lencioni)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line _opts ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'--force[make various commands more forceful]' \
|
||||
'--json[output consumable JSON]' \
|
||||
'--log-level[what level of logs to report]:log level:(error conflict warn action info debug)' \
|
||||
"--offline[don't hit the network]" \
|
||||
'--quiet[only output important information]' \
|
||||
"--silent[don't output anything, besides errors]" \
|
||||
'--verbose[make output more verbose]' \
|
||||
'--allow-root[allow running commands as root]' \
|
||||
'--no-color[disable colors]' \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
_values "bower command" \
|
||||
"cache[manage bower cache]" \
|
||||
"help[display help information about Bower]" \
|
||||
"home[opens a package homepage into your favorite browser]" \
|
||||
"info[info of a particular package]" \
|
||||
"init[interactively create a bower.json file]" \
|
||||
"install[install a package locally]" \
|
||||
"link[symlink a package folder]" \
|
||||
"list[list local packages - and possible updates]" \
|
||||
"login[authenticate with GitHub and store credentials]" \
|
||||
"lookup[look up a package URL by name]" \
|
||||
"prune[removes local extraneous packages]" \
|
||||
"register[register a package]" \
|
||||
"search[search for a package by name]" \
|
||||
"update[update a local package]" \
|
||||
"uninstall[remove a local package]" \
|
||||
"unregister[remove a package from the registry]" \
|
||||
"version[bump a package version]" && ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
help)
|
||||
_values 'commands' \
|
||||
'cache' \
|
||||
'home' \
|
||||
'info' \
|
||||
'init' \
|
||||
'install' \
|
||||
'link' \
|
||||
'list' \
|
||||
'login' \
|
||||
'lookup' \
|
||||
'prune' \
|
||||
'register' \
|
||||
'search' \
|
||||
'update' \
|
||||
'uninstall' \
|
||||
'unregister' \
|
||||
'version' && ret=0
|
||||
;;
|
||||
(home|info|init|link|lookup|prune|register|search|unregister)
|
||||
_arguments \
|
||||
'--help[show help message]' && ret=0
|
||||
;;
|
||||
install)
|
||||
_arguments \
|
||||
'--force-latest[force latest version on conflict]' \
|
||||
'--help[show help message]' \
|
||||
"--production[don't install project devDependencies]" \
|
||||
"--save[save installed packages into the project's bower.json dependencies]" \
|
||||
"--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
|
||||
;;
|
||||
list)
|
||||
_arguments \
|
||||
'--help[show help message]' \
|
||||
'--paths[generate a simple JSON source mapping]' \
|
||||
'--relative[make paths relative to the directory config property, which defaults to bower_components]' && ret=0
|
||||
;;
|
||||
login)
|
||||
_arguments \
|
||||
'--help[show help message]' \
|
||||
'(-t --token)'{-t,--token}'[Pass GitHub auth token (will not prompt for username/password)]' && ret=0
|
||||
;;
|
||||
uninstall)
|
||||
_arguments \
|
||||
'--help[show help message]' \
|
||||
"--save[save installed packages into the project's bower.json dependencies]" \
|
||||
"--save-dev[save installed packages into the project's bower.json devDependencies]" && ret=0
|
||||
;;
|
||||
update)
|
||||
_arguments \
|
||||
'--force-latest[force latest version on conflict]' \
|
||||
'--help[show help message]' \
|
||||
"--production[don't install project devDependencies]" && ret=0
|
||||
;;
|
||||
version)
|
||||
_arguments \
|
||||
'--message[custom git commit and tag message]' && ret=0
|
||||
;;
|
||||
exec)
|
||||
_normal && ret=0
|
||||
;;
|
||||
*)
|
||||
_opts=( $(bower help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') )
|
||||
_opts+=( $(bower help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
|
||||
if [[ $_opts != "" ]]; then
|
||||
_values 'option' $_opts && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,483 @@
|
|||
#compdef bundle
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Bundler 4.0.0 (https://bundler.io/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
# * Shohei Yoshida (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_bundle() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'(-r --retry)'{-r,--retry}'[specify the number of times you with to attempt network commands]:number:' \
|
||||
'(-V --verbose)'{-V,--verbose}'[print out additional logging information]' \
|
||||
'--no-color[print all output without color]' \
|
||||
'1: :_bundle_commands' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
case $words[1] in
|
||||
(help)
|
||||
_arguments \
|
||||
'1: :_bundle_commands' \
|
||||
&& ret=0
|
||||
;;
|
||||
(install)
|
||||
local -a policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
|
||||
'--full-index[download and cache the index file of all gems]' \
|
||||
'--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
|
||||
'(-j --jobs)'{-j,--jobs}'[the maximum number of parallel download and install jobs]:number' \
|
||||
'--local[do not attempt to connect to rubygems.org]' \
|
||||
'--lockfile=[location of the lockfile which Bundler should use]:path:_files' \
|
||||
'--prefer-local[force using locally installed gems]' \
|
||||
'--no-cache[do not update the cache in vendor/cache with newly installed gems]' \
|
||||
'--no-lock[do not create a lockfile]' \
|
||||
'--quiet[only output warnings and errors]' \
|
||||
'--retry=[retry number when network or git requests failed]:number' \
|
||||
'--standalone=-[create standalone bundles]:groups:_bundle_groups' \
|
||||
"--trust-policy=-[apply the Rubygems security policy]:arg:($policies)" \
|
||||
&& ret=0
|
||||
;;
|
||||
(update)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--all[update all gems specified in Gemfile]' \
|
||||
\*{--group,-g}=-'[only update the gems in the specified group]' \
|
||||
'--source=-[the name of a source used in the Gemfile]:url' \
|
||||
'--local[do not attempt to fetch gems remotely and use the gem cached instead]' \
|
||||
'--ruby[update the locked version of Ruby to the current version of Ruby]' \
|
||||
'--bundler[update the locked version of bundler to invoked bundler version]' \
|
||||
'(--force --redownload)'{--force,--redownload}'[force reinstalling every gem]' \
|
||||
'--full-index[fall back to using the single-file index of all gems]' \
|
||||
'(-j --jobs)'{-j,--jobs}'[specify the number of jobs to run in parallel]:number' \
|
||||
'--retry=-[retry failed network or git requests for number times]:number' \
|
||||
'--quiet[only output warnings and errors]' \
|
||||
'--patch[prefer updating only to next patch version]' \
|
||||
'--minor[prefer updating only to next minor version]' \
|
||||
'--major[prefer updating only to next major version (default)]' \
|
||||
'--pre[always choose the highest allowed version]' \
|
||||
'--strict[do not allow any gem to be updated past latest --patch | --minor | --major]' \
|
||||
'--conservative[use bundle install conservative update behavior]' \
|
||||
'*:: :_bundle_gems' \
|
||||
&& ret=0
|
||||
;;
|
||||
(cache)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--all-platforms[include gems for all platforms present in the lockfile, not only the current one]' \
|
||||
'--cache-path=-[specify a different cache path than the default(vendor/cache)]: :_files -/' \
|
||||
'--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile:_files' \
|
||||
"--no-install[don't install the gems, only update the cache]" \
|
||||
'--quiet[only output warnings and errors]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(exec)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--gemfile=[use the specified gemfile instead of Gemfile]' \
|
||||
'*:: :_normal' \
|
||||
&& ret=0
|
||||
;;
|
||||
(config)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'1: :_bundle_config_subcommands' \
|
||||
'--local[use local configuration]' \
|
||||
'--global[use global configuration]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(add)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'(-v --version)'{-v,--version}=-'[specify version requirements for the added gem]:version' \
|
||||
'(-g --group)'{-g,--group}=-'[specify the group for the added gem]:group:_bundle_groups' \
|
||||
'(-s --source)'{-s,--source}=-'[specify the source for the added gem]: :_files' \
|
||||
'(-r --require)'{-r,--require}=-'[adds require path to gem]: :_files' \
|
||||
'--path=[specify the file path for the added gem]: :_files -/' \
|
||||
'--git=[specify the git source for the added gem]:git' \
|
||||
'--github=[specify the github source for the added gem]:github' \
|
||||
'--branch=[specify the git branch for the added gem]:branch' \
|
||||
'--ref=[specify the git ref for the added gem]' \
|
||||
"--glob=[specify the location of a dependency's .gemspec, expanded within Ruby]:glob" \
|
||||
'--quiet[do not print progress information to the standard output]' \
|
||||
'--skip-install[adds the gem to the Gemfile but does not install it]' \
|
||||
'--optimistic[adds optimistic declaration of version]' \
|
||||
'--strict[adds strict declaration of version]' \
|
||||
'1::gem' \
|
||||
&& ret=0
|
||||
;;
|
||||
(binstubs)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--force[overwrite existing binstubs if they exist]' \
|
||||
'--standalone[makes binstubs that can work without depending on Rubygems or Bundler at runtime]' \
|
||||
'--shebang=-[specify a different shebang executable name than the default(default: ruby)]: :_files' \
|
||||
'--all[create binstubs for all gems in the bundle]' \
|
||||
'--all-platforms[install binstubs for all platforms]' \
|
||||
'1::gem:' \
|
||||
&& ret=0
|
||||
;;
|
||||
(check)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--dry-run[locks the Gemfile before running the command]' \
|
||||
'--gemfile=-[use the specified gemfile instead of the Gemfile]: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(show)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--paths[list the paths of all gems that are required by your Gemfile]' \
|
||||
'1:: :_bundle_gems' \
|
||||
&& ret=0
|
||||
;;
|
||||
(outdated)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--local[do not attempt to fetch gems remotely and use the gem cache instead]' \
|
||||
'--pre[check for newer pre-release gems]' \
|
||||
'--source=[check against a specific source]:source:_files' \
|
||||
'(--filter-strict --strict)'{--filter-strict,--strict}'[only list newer versions allowed by your Gemfile requirements]' \
|
||||
'(--parseable --porcelain)'{--parseable,--porcelain}'[use minimal formatting for more parsable output]' \
|
||||
'--group=[list gems from a specific group]:group:_bundle_groups' \
|
||||
'--groups[list gems organized by groups]' \
|
||||
'--major[prefer updating to next major version(default)]' \
|
||||
'--minor[prefer updating only to next minor version]' \
|
||||
'--patch[prefer updating only to next patch version]' \
|
||||
'--filter-major[only list major new versions]' \
|
||||
'--filter-minor[only list minor new versions]' \
|
||||
'--filter-patch[only list patch new versions]' \
|
||||
'--only-explicit[only list gems specified in your Gemfile, not their dependencies]' \
|
||||
'*:: :_bundle_gems' \
|
||||
&& ret=0
|
||||
;;
|
||||
(console)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--no-color[disable colorization in output]' \
|
||||
'(-r --retry)'{-r,--retry}='[specify the number of times you with to attempt network commands]:num' \
|
||||
'1:: :_bundle_groups' \
|
||||
&& ret=0
|
||||
;;
|
||||
(open)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--path=[specify GEM source relative path to open]:path:_files' \
|
||||
'1:: :_bundle_gems' \
|
||||
&& ret=0
|
||||
;;
|
||||
(list)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--name-only[print only the name of each gem]' \
|
||||
'--paths[print the path to each gem in the bundle]' \
|
||||
'--without-group=-[a space-separated list of groups of gems to skip during printing]: :_bundle_groups' \
|
||||
'--only-group=-[a space-separated list of groups of gems to print]: :_bundle_groups' \
|
||||
'--format[output format]:format:(json)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(lock)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--update=-[ignores the existing lockfile]' \
|
||||
'--bundler=-[update the locked version of bundler to the given version or the latest version]:version' \
|
||||
'--local[do not attempt to connect to rubygems.org]' \
|
||||
'--print[prints the lockfile to STDOUT instead of writing to the file system]' \
|
||||
'--lockfile=[the path where the lick file should be written to]: :_files' \
|
||||
'--full-index[fall back to using the single file index of all gems]' \
|
||||
'--gemfile=[use the specified gemfile instead of Gemfile]:file:_files' \
|
||||
'--add-checksums[add checksums to the lockfile]' \
|
||||
'--add-platform=[add a new platform to the lockfile]:platforms' \
|
||||
'--remove-platform=[remove a platform from the lockfile]:platforms' \
|
||||
'--normalize-platforms[normalize lockfile platforms]' \
|
||||
'--patch[if updating, prefer updating only to next patch version]' \
|
||||
'--minor[if updating, prefer updating only to next minor version]' \
|
||||
'--major[if updating, prefer updating to next major version(default)]' \
|
||||
'--pre[if updating, always choose the highest allowed version]' \
|
||||
'--strict[if updating, do not allow any gem to be updated past latest --patch | --minor | --major]' \
|
||||
'--conservative[if updating, use bundle install conservative update behavior]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(init)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--gemspec=-[use the specified .gemspec to create the Gemfile]: :_files' \
|
||||
'--gemfile=[use the specified name for the gemfile instead of Gemfile]:name' \
|
||||
&& ret=0
|
||||
;;
|
||||
(gem)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'(--exe -b --bin --no-exe)'{--exe,-b,--bin}'[specify that bundler should create a binary executable in the generated rubygem project]' \
|
||||
'(--exe -b --bin --no-exe)--no-exe[do not create a binary]' \
|
||||
'(--no-coc)--coc[add a CODE_OF_CONDUCT.md to the root of the generated project]' \
|
||||
'(--coc)--no-coc[do not create a CODE_OF_CONDUCT.md]' \
|
||||
'(--changelog --no-changelog)--changelog[add a CHANGELOG.md file to the root of the project]' \
|
||||
'(--changelog --no-changelog)--no-changelog[do not add a CHANGELOG.md file to the root of the project]' \
|
||||
'(--no-ext --ext)--ext=[add boilerplate for C, GO or Rust extension code to the generated project]: :(c go rust )' \
|
||||
'(--ext --no-ext)--no-ext[do not add extension code]' \
|
||||
'--git[initialize a git repo inside your library]' \
|
||||
'--github-username=[Github username on README]:username' \
|
||||
'(--no-mit --mit)--mit[add an MIT license to a LICENSE.txt file in the root of the generated project]' \
|
||||
'(--mit --no-mit)--no-mit[do not create a LICENSE.txt]' \
|
||||
'(-t --test --no-test)'{-t,--test}='[specify the test framework]: :(minitest rspec test-unit)' \
|
||||
'(-t --test --no-test)--no-test[do not use a test framework]' \
|
||||
'(--ci --no-ci)--ci=-[specify the continuous integration service]: :(circle github gitlab)' \
|
||||
'(--ci --no-ci)--no-ci[do not use a continuous integration service]' \
|
||||
'(--linter --no-linter)--linter=-[specify the linter and code formatter]: :(rubocop standard)' \
|
||||
'(--linter --no-linter)--no-linter[do not add a linter]' \
|
||||
'(-e --edit)'{-e,--edit}='[open the resulting GEM_NAME.gemspec in EDITOR]:editor' \
|
||||
'(--bundle --no-bundle)--bundle[run bundle install after creating the gem]' \
|
||||
'(--bundle --no-bundle)--no-bundle[do not run bundle install after creating the gem]' \
|
||||
'1::gem_name:' \
|
||||
&& ret=0
|
||||
;;
|
||||
(platform)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--ruby[it will display the ruby directive information]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(clean)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--dry-run[print the changes, but do not clean the unused gems]' \
|
||||
'--force[forces cleaning up unused gems even if Bundler is configured to use globally installed gems]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(doctor)
|
||||
_bundle_doctor && ret=0
|
||||
;;
|
||||
(remove)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'*:: :_bundle_gems' \
|
||||
&& ret=0
|
||||
;;
|
||||
(plugin)
|
||||
_bundle_plugin && ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_bundle_commands() {
|
||||
local -a commands=(
|
||||
"install:Install the gems specified by the Gemfile or Gemfile.lock"
|
||||
"update:Update dependencies to their latest versions"
|
||||
"cache:Package the .gem files required by your application"
|
||||
"exec:Execute a script in the context of the current bundle"
|
||||
"config:Specify and read configuration options for bundler"
|
||||
"help:Describe available tasks or one specific task"
|
||||
"add:Add the named gem to the Gemfile and run bundle install"
|
||||
"binstubs:Generate binstubs for executables in a gem"
|
||||
"check:Determine whether the requirements for your application are installed"
|
||||
"show:Show the source location of a particular gem in the bundle"
|
||||
"outdated:Show all of the outdated gems in the current bundle"
|
||||
"console:Start an IRB session in the context of the current bundle"
|
||||
"open:Open an installed gem in the editor"
|
||||
"list:Show all of the gems in the current bundle"
|
||||
"lock:Generate a lockfile for your dependencies"
|
||||
"init:Generate a simple Gemfile, placed in the current directory"
|
||||
"gem:Create a simple gem, suitable for development with bundler"
|
||||
"platform:Displays platform compatibility information"
|
||||
"clean:Clean up unused gems in your Bundler directory"
|
||||
"doctor:Display warnings about common problems"
|
||||
"remove:Removes gems from the Gemfile"
|
||||
"plugin:Manage Bundler plugins"
|
||||
"version:Prints Bundler version information"
|
||||
)
|
||||
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
_bundle_gems() {
|
||||
local -a gems=($(bundle show | awk '/^ / { print $2 }'))
|
||||
if [[ $? == 0 ]]; then
|
||||
_values 'gems' $gems
|
||||
fi
|
||||
}
|
||||
|
||||
_bundle_groups() {
|
||||
if [[ -e Gemfile ]]; then
|
||||
local -a groups=(${(@f)"$(awk '/^ *group *:/{sub(/^ *group *:/, ""); print $1}' Gemfile)"})
|
||||
_values 'groups' $groups
|
||||
fi
|
||||
}
|
||||
|
||||
_bundle_config_subcommands() {
|
||||
local -a subcommands=(
|
||||
"list:print a list of all bundler configuration"
|
||||
"get:print the value of that configuration setting"
|
||||
"set:set <name> <value> defaults to setting configuration"
|
||||
"unset:delete the configuration"
|
||||
)
|
||||
_describe -t subcommands 'subcommand' subcommands "$@"
|
||||
}
|
||||
|
||||
_bundle_plugin() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'1:subcommand:_bundle_plugin_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(install)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--source=[install the plugin gem from a specific source]:url:_urls' \
|
||||
'--version=[specify a version of the plugin gem]:version' \
|
||||
'--git=[install the plugin gem from a Git repository]:url:_urls' \
|
||||
'--branch=[branch name when using --git]:branch' \
|
||||
'--ref=[tag or commit hash when using --git]:ref' \
|
||||
'--path=[local file path to install the plugin gem]:path:_files -/' \
|
||||
'*::plugins' \
|
||||
&& ret=0
|
||||
;;
|
||||
(uninstall)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--all[uninstall all the installed plugins]' \
|
||||
'*::plugins' \
|
||||
&& ret=0
|
||||
;;
|
||||
(list)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'1:subcommand:(install uninstall list help)' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_bundle_plugin_subcommands() {
|
||||
local -a subcommands=(
|
||||
'install:install the given plugins'
|
||||
'uninstall:uninstall the plugins'
|
||||
'list:list the installed plugins and available commands'
|
||||
'help:describe subcommands or one specific subcommand'
|
||||
)
|
||||
|
||||
_describe -t subcommands 'subcommand' subcommands "$@"
|
||||
}
|
||||
|
||||
_bundle_doctor() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'--quiet[only output warnings and errors]' \
|
||||
'--gemfile=[the location of the Gemfile which Bundler should use]: :_files' \
|
||||
'--ssl[diagnose common SSL problems when connecting to https://rubygems.org]' \
|
||||
'1:subcommand:_bundle_doctor_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(diagnose)
|
||||
_arguments \
|
||||
'--quiet[only output warnings and errors]' \
|
||||
'--gemfile=[the location of the Gemfile which Bundler should use]: :_files' \
|
||||
'--ssl[diagnose common SSL problems when connecting to https://rubygems.org]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(ssl)
|
||||
_arguments \
|
||||
'--host=[perform the diagnostic on HOST(default: rubygems.org)]:host' \
|
||||
'--tls-version=[TLS version to connect to HOST]:version:(1.1 1.2)' \
|
||||
'--verify-mode=[specify the TLS verify mode]:mode:(CLIENT_ONCE FAIL_IF_NO_PEER_CERT NONE PEER)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments \
|
||||
'1:subcommand:_bundle_doctor_subcommands' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_bundle_doctor_subcommands() {
|
||||
local -a subcommands=(
|
||||
'diagnose:check your Gemfile and gem environment for common problems'
|
||||
'ssl:check issues related to SSL certificates or/and TLS versions'
|
||||
'help:describe subcommands or one specific subcommand'
|
||||
)
|
||||
|
||||
_describe -t subcommands 'subcommand' subcommands "$@"
|
||||
}
|
||||
|
||||
_bundle "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
#compdef cap
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Capistrano 3.19.2 (https://capistranorb.com/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
# * Shohei Yoshida (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line cmds ret=1
|
||||
|
||||
_arguments -C \
|
||||
'--backtrace=[Enable full backtrace]: :(stderr stdout)' \
|
||||
'--comments[Show commented tasks only]' \
|
||||
'--job-stats[Display job statistics]:level' \
|
||||
'--rules[Trace the rules resolution]' \
|
||||
'--suppress-backtrace[Suppress backtrace lines matching regexp PATTERN]:pattern' \
|
||||
'(-A --all)'{-A,--all}'[Show all tasks, even uncommented ones]' \
|
||||
'(-B --build-all)'{-B,--build-all}'[Build all prerequisites, including those which are up-to-date]' \
|
||||
'(-C --directory)'{-C,--directory}'[Change to DIRECTORY before doing anything]: :_files -/' \
|
||||
'(-D --describe)'{-D,--describe}'[Describe the tasks, then exit]:pattern' \
|
||||
'(-e --execute)'{-e,--execute}'[Execute some Ruby code and exit]:code' \
|
||||
'(-E --execute-continue)'{-E,--execute-continue}'[Execute Ruby code and continue with task processing]:code' \
|
||||
'(-f --rakefile)'{-f,--rakefile}'[Use FILENAME as the rakefile to search for]: :_files' \
|
||||
'(-G --no-system --nosystem)'{-G,--no-system,--nosystem}'[Use standard project Rakefile search paths, ignore system wide rakefiles]' \
|
||||
'(-g --system)'{-g,--system}'[Using system wide rakefiles]' \
|
||||
'(-I --libdir)'\*{-I,--libdir}'[Include LIBDIR in the search path for required modules]: :_files -/' \
|
||||
'(-j --jobs)'{-j-,--jobs-}'[Specifies the maximum number of tasks to execute in parallel]:num' \
|
||||
'(-m --multitask)'{-m,--multitask}'[Treat all tasks as multitasks]' \
|
||||
'(-N --no-search --nosearch)'{-N,--no-search,--nosearch}'[Do not search parent directories for the Rakefile]' \
|
||||
'(-P --prereqs)'{-P,--prereqs}'[Display the tasks and dependencies, then exit]' \
|
||||
'--execute-print[Execute some Ruby code, print the result, then exit]:code' \
|
||||
'*--require[Require MODULE before executing rakefile]:module' \
|
||||
'(-R --rakelibdir --rakelib)'{-R,--rakelibdir,--rakelib}'[Auto-import any .rake files in RAKELIBDIR]: :_files -/' \
|
||||
'(-t --trace)'{-t,--trace}'[Turn on invoke/execute tracing, enable full backtrace]: :(stderr stdout)' \
|
||||
'(-T --tasks)'{-T,--tasks}'[Display the tasks with descriptions]::pattern' \
|
||||
'(-W --where)'{-W,--where}'[Describe the tasks then exit]::pattern' \
|
||||
'(-X --no-deprecation-warnings)'{-X,--no-deprecation-warnings}'[Disable the deprecation warnings]' \
|
||||
'(- *)'{-V,--version}'[Display the program version]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Do a dry run without executing actions]' \
|
||||
'(-r --roles)'{-r,--roles}'[Run SSH commands only on hosts matching these roles]:roles' \
|
||||
'(-z --hosts)'{-z,--hosts}'[Run SSH commands only on matching hosts]:hosts' \
|
||||
'(-p --print-config-variables)'{-p,--print-config-variables}'[Display the defined config variables before starting the deployment tasks]' \
|
||||
'(- *)'{-h,-H,--help}'[Display help message]' \
|
||||
'*: :->cmds' && ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
cmds=( ${(f)"$(_call_program commands cap -T 2>/dev/null | sed -e '/ # /!d; s/:/\\:/g; s/cap \([A-Za-z0-9\\:_-]*\) .*# /\1:/')"} )
|
||||
_describe -t commands 'cap command' cmds && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
#compdef cask
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2014 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cask (https://cask.readthedocs.io)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * ptrv <mail@petervasil.net>
|
||||
# * Johan Andersson <johan.rejeep@gmail.com>
|
||||
# * Sebastien Duthil <duthils@free.fr>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
function _cask() {
|
||||
typeset -A opt_args
|
||||
local context state line ret=1
|
||||
local curcontext="$curcontext"
|
||||
|
||||
_arguments -C \
|
||||
'(--proxy --http-proxy )--http-proxy[Set emacs proxy for HTTP]:host:_hosts' \
|
||||
'(--proxy --https-proxy)--https-proxy[Set emacs proxy for HTTPS]:host:_hosts' \
|
||||
'( --http-proxy --https-proxy)--proxy[Set emacs proxy for HTTPS and HTTPS]:host:_hosts' \
|
||||
'--no-proxy[Set Emacs no-proxy to HOST (emacs pattern of hosts to not use proxy for)]:pattern:_hosts' \
|
||||
'(- *)--version[Print Cask version and exit]' \
|
||||
'(- *)'{-h,--help}'[Display usage or information for command]::command:->subcommand' \
|
||||
'--debug[Turn on debug output]' \
|
||||
'--path[Run command in this PATH instead of default-directory]:dir:_files -/' \
|
||||
'(--verbose --silent)--verbose[Be verbose and show debug output]' \
|
||||
'(--verbose --silent)--silent[Be silent and do not show anything]' \
|
||||
':subcommand:->subcommand' \
|
||||
'*:: :->subcmds' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(subcommand)
|
||||
local -a subcommands=(
|
||||
"build:build all Elisp files in the files directive"
|
||||
"clean-elc:remove all byte compiled Elisp files in the files directive"
|
||||
"emacs:run emacs"
|
||||
"eval:evaluate FORM as a lisp form"
|
||||
"exec:execute command with correct 'exec-path' and 'load-path'"
|
||||
"exec-path:print 'exec-path' for all packages and dependencies"
|
||||
"files:print list of files specified in the files directive"
|
||||
"help:display usage information or documentation for specified command"
|
||||
"info:show info about the current package"
|
||||
"init:initialize the current directory with a Cask-file"
|
||||
"install:install all packages specified in the Cask-file"
|
||||
"link:manage links"
|
||||
"list:list dependencies"
|
||||
"load-path:print 'load-path' for all packages and dependencies"
|
||||
"outdated:print list of outdated packages"
|
||||
"package:build package and put in specified directory (default: dist)"
|
||||
"package-directory:print current package installation directory"
|
||||
"path:print 'exec-path' for all packages and dependencies"
|
||||
"pkg-file:write a 'define-package' file"
|
||||
"update:update package version"
|
||||
"upgrade-cask:upgrade Cask itself and its dependencies"
|
||||
"upgrade:upgrade Cask itself and its dependencies"
|
||||
"version:print program version"
|
||||
)
|
||||
|
||||
_describe -t subcommands 'cask subcommands' subcommands && ret=0
|
||||
;;
|
||||
(subcmds)
|
||||
case "$words[1]" in
|
||||
(init)
|
||||
_arguments \
|
||||
'(--dev)--dev[Run in dev mode]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(exec)
|
||||
_generic
|
||||
;;
|
||||
(emacs)
|
||||
_as_if emacs && ret=0
|
||||
;;
|
||||
(help)
|
||||
_as_if cask --help && ret=0
|
||||
;;
|
||||
(link)
|
||||
_message "completion unimplemented"
|
||||
ret=0
|
||||
;;
|
||||
(package)
|
||||
_wanted package-dir expl 'package directory' _files -/ && ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_cask "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,339 @@
|
|||
#compdef ccache -P -value-,CCACHE_*,-default-
|
||||
|
||||
# zsh completion script for ccache 4.10.2
|
||||
|
||||
# Copyright 2018 CERN for the benefit of the LHCb Collaboration.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the name of the copyright holder nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# In applying this licence, CERN does not waive the privileges and immunities
|
||||
# granted to it by virtue of its status as an Intergovernmental Organization
|
||||
# or submit itself to any jurisdiction.
|
||||
|
||||
# allow users to define their better compilers
|
||||
# inspired by _cmake_compilers
|
||||
# users could override with
|
||||
#
|
||||
# _ccache_compilers() {
|
||||
# local -a _ccache_compilers
|
||||
# _ccache_compilers=(gcc g++ clang clang++)
|
||||
# _wanted compilers expl "compiler" compadd -- $_ccache_compilers
|
||||
# }
|
||||
(( $+functions[_ccache_compilers] )) ||
|
||||
_ccache_compilers() {
|
||||
_command_names -e
|
||||
}
|
||||
|
||||
_ccache_booleans() {
|
||||
_message 'There are no "false" values, unset variable to disable'
|
||||
local description=${1:-boolean}
|
||||
local -a booleans=('true' 'yes')
|
||||
_describe -t booeans "$description" booleans
|
||||
}
|
||||
|
||||
(( $+functions[_ccache_sloppiness] )) ||
|
||||
_ccache_sloppiness() {
|
||||
_values -s ',' \
|
||||
'clang_index_store[ignore the clang compiler option -index-store-path and its argument]' \
|
||||
'file_stat_matches[rely on mtimes and ctimes]' \
|
||||
'file_stat_matches_ctime[ignore ctime when file_stat_matches is enabled]' \
|
||||
'gcno_cwd[not hash the current working directory]' \
|
||||
'incbin[pretend the .incbin directive]' \
|
||||
'include_file_ctime[ignore headers ctime too new]' \
|
||||
'include_file_mtime[ignore headers mtime too new]' \
|
||||
'ivfsoverlay[ignore the clang option -ivfsoverlay and its argument]' \
|
||||
'locale[include locale environment variables in the hash]' \
|
||||
'module[enable cache even if -fmodules is used]' \
|
||||
'pch_defines[be sloppy about #defines in pch]' \
|
||||
'random_seed[ignore the -frandom-seed option and its argument]' \
|
||||
'system_headers[only check non-system headers in direct mode]' \
|
||||
'time_macros[ignore __DATE__ and __TIME__]'
|
||||
}
|
||||
|
||||
(( $+functions[_ccache_compilerchecks] )) ||
|
||||
_ccache_compilerchecks() {
|
||||
local -a compiler_check_values=(
|
||||
'content:the actual compiler binary'
|
||||
'mtime:mtime and size of the compiler'
|
||||
'none:ignore compiler for hashing'
|
||||
'string\::any hard coded string (pre-computed version)'
|
||||
'%compiler%\ -v:any compiler invocation output'
|
||||
)
|
||||
_describe -t compilerchecks "compiler information included in the hash" compiler_check_values
|
||||
}
|
||||
|
||||
(( $+functions[_ccache_compiler_type] )) ||
|
||||
_ccache_compiler_type() {
|
||||
local -a compiler_types=(
|
||||
'auto:guess compiler name'
|
||||
'clang:clang-based compiler'
|
||||
'clang-cl:clang-cl'
|
||||
'gcc:gcc-based compiler'
|
||||
'icl:Intel compiler on Windows'
|
||||
'msvc:Microsoft Visual C++'
|
||||
'nvcc:NVCC CUDA compiler'
|
||||
'other:any compiler other than the known types'
|
||||
)
|
||||
_describe -t compiler_types "compiler types" compiler_types
|
||||
}
|
||||
|
||||
if [[ "$service" = -value-* ]]; then
|
||||
case $service in
|
||||
*CCACHE_*DIR*)
|
||||
# CCACHE_BASEDIR: relative to which top level paths are hashed
|
||||
# CCACHE_DIR: where the cache and config are kept
|
||||
# CCACHE_TEMPDIR: where temporary files are kept
|
||||
# all: a single path
|
||||
_path_files -/
|
||||
;;
|
||||
*CCACHE_CC*)
|
||||
_ccache_compilers
|
||||
;;
|
||||
*CCACHE_COMPILERCHECK*)
|
||||
_ccache_compilerchecks
|
||||
;;
|
||||
*CCACHE_*COMPRESS*)
|
||||
_ccache_booleans "write compressed cache"
|
||||
;;
|
||||
*CCACHE_EXTENSION*)
|
||||
_alternative ':set extension for intermediate files: '
|
||||
;;
|
||||
*CCACHE_*DIRECT*)
|
||||
_ccache_booleans "use direct mode"
|
||||
;;
|
||||
*CCACHE_*DISABLE*)
|
||||
_ccache_booleans "disable cache usage"
|
||||
;;
|
||||
*CCACHE_EXTRAFILES*)
|
||||
local sep=:
|
||||
compset -P "*${sep}"
|
||||
compset -S "${sep}*" || suf="$sep"
|
||||
|
||||
_files "" -r "${sep}"' /\t\t\-' "$@"
|
||||
;;
|
||||
*CCACHE_*HARDLINK*)
|
||||
_ccache_booleans "create hard links rather than copies"
|
||||
;;
|
||||
*CCACHE_*HASHDIR*)
|
||||
_ccache_booleans "include the cwd in the hash"
|
||||
;;
|
||||
*CCACHE_IGNOREHEADERS*)
|
||||
_dir_list
|
||||
;;
|
||||
*CCACHE_*COMMENTS*)
|
||||
_ccache_booleans "consider comments in hashing"
|
||||
;;
|
||||
*CCACHE_LIMIT_MULTIPLE*)
|
||||
_alternative ":clean up down to level (e.g. 0.8): "
|
||||
;;
|
||||
*CCACHE_LOGFILE*)
|
||||
_path_files -g "*(/) *.log"
|
||||
;;
|
||||
*CCACHE_MAXFILES*)
|
||||
_alternative ":maximum number of files in the cache (0= no limit): "
|
||||
;;
|
||||
*CCACHE_MAXSIZE*)
|
||||
_alternative ':maximum cache size (0= no limit) with suffix k,M,G,T or Ki,Mi,Gi,Ti: '
|
||||
;;
|
||||
*CCACHE_PATH*)
|
||||
_alternative ':PATH for compiler lookup (instead of $PATH):_dir_list'
|
||||
;;
|
||||
*CCACHE_PREFIX*)
|
||||
_alternative ':prefixes for compiler invocation: '
|
||||
;;
|
||||
*CCACHE_PREFIX_CPP*)
|
||||
_alternative ':prefixes for preprocessor invocation: '
|
||||
;;
|
||||
*CCACHE_*READONLY*)
|
||||
_ccache_booleans "treat cache as read-only"
|
||||
;;
|
||||
*CCACHE_*READONLY_DIRECT*)
|
||||
_ccache_booleans "retrieve from read-only cache in direct mode"
|
||||
;;
|
||||
*CCACHE_*RECACHE*)
|
||||
_ccache_booleans "use cache in write-only mode"
|
||||
;;
|
||||
*CCACHE_*CPP2*)
|
||||
_ccache_booleans "pass original rather than preprocessed source code to compiler"
|
||||
;;
|
||||
*CCACHE_SLOPPINESS*)
|
||||
_ccache_sloppiness
|
||||
;;
|
||||
*CCACHE_*STATS*)
|
||||
_ccache_booleans "update statistics counters"
|
||||
;;
|
||||
*CCACHE_UMASK*)
|
||||
_alternative ":umask value (octal): "
|
||||
;;
|
||||
*CCACHE_*UNIFY*)
|
||||
_ccache_booleans "normalize sources prior to processing"
|
||||
;;
|
||||
esac
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
__ccache_config_keys() {
|
||||
local -a keys=(
|
||||
'absolute_paths_in_stderr:rewrite relative paths in error output to absolute paths'
|
||||
'base_dir:specify relative to which top level paths are hashed'
|
||||
'cache_dir:specify where the cache is kept'
|
||||
'compiler:specify compiler'
|
||||
'compiler_check:compiler information included in the hash'
|
||||
'compiler_type:force a compiler type'
|
||||
'compression:write compressed cache'
|
||||
'compression_level:cache compression level'
|
||||
'cpp_extension:set extensions for intermediate files'
|
||||
'debug:enable debug mode'
|
||||
'debug_dir:specify directory to write debug files'
|
||||
'debug_level:specify the amount of debug information'
|
||||
'depend_mode:enable depend mode'
|
||||
'direct_mode:use direct mode'
|
||||
'disable:disable cache usage'
|
||||
'extra_files_to_hash:additional files to consider in hashing'
|
||||
'file_clone:use file cloning to store and fetch cached compiler results'
|
||||
'hard_link:create hard links rather than copies'
|
||||
'hash_dir:include the cwd in the hash'
|
||||
'ignore_headers_in_manifest:set paths to headers to ignore in hashing'
|
||||
'ignore_options:list of options that ccache will ignore'
|
||||
'inode_cache:cache source file hashes based on device, inode and timestamps'
|
||||
'keep_comments_cpp:consider comments in hashing'
|
||||
'log_file:specify a log file'
|
||||
'max_files:maximum number of files in the cache'
|
||||
'max_size:maximum size of the cache'
|
||||
'msvc_dep_prefix:specify the prefix of included files output for MSVC compiler'
|
||||
'namespace:namespace will be added to the hashed data for each compilation'
|
||||
'path:PATH for compiler lookup (instead of $PATH)'
|
||||
'pch_external_checksum:use .sum file for hash'
|
||||
'prefix_command:prefixes for compiler invocation'
|
||||
'prefix_command_cpp:prefixes for preprocessor invocation'
|
||||
'read_only:treat cache as read-only'
|
||||
'read_only_direct:retrieve from read-only cache in direct mode'
|
||||
'recache:use cache in write-only mode'
|
||||
'remote_only:use remote storage'
|
||||
'remote_storage:specify one or several storage backends'
|
||||
'reshare:write results to remote storage even for local storage cache hits'
|
||||
'run_second_cpp:pass original rather than preprocessed source code to compiler'
|
||||
'sloppiness:hash files sloppy'
|
||||
'stats:update statistics counters'
|
||||
'stats_log:write statistics counter updates to the specified file'
|
||||
'temporary_dir:specify where temporary files are kept'
|
||||
'umask:set umask for ccache and child processes (e.g. for sharing cache)'
|
||||
)
|
||||
_describe -t configkeys "configuration keys" keys -S '='
|
||||
}
|
||||
|
||||
if compset -P '--set-config=*='; then
|
||||
case $IPREFIX in
|
||||
( *=absolute_paths_in_stderr= | *=compression= | *=debug= | *=depend_mode= | *=direct_mode= | *=disable= | *=file_clone= | *=hard_link= | *=hash_dir= | *=inode_cache= | *=keep_comments_cpp= | *=read_only= | *=read_only_direct= | *=recache= | *=run_second_cpp= | *=stats= | *=unify= )
|
||||
local -a booleans=('true' 'false')
|
||||
_describe -t booleans 'boolean' booleans
|
||||
;;
|
||||
(*=base_dir= | *=cache_dir= | *=debug_dir= | *=temporary_dir=)
|
||||
_path_files -/
|
||||
;;
|
||||
(*=compiler=)
|
||||
_ccache_compilers
|
||||
;;
|
||||
(*=compiler_check=)
|
||||
_ccache_compilerchecks
|
||||
;;
|
||||
(*=compiler_type=)
|
||||
_ccache_compiler_type
|
||||
;;
|
||||
(*=extra_files_to_hash=)
|
||||
local sep=:
|
||||
compset -P "*${sep}"
|
||||
compset -S "${sep}*" || suf="$sep"
|
||||
|
||||
_files "" -r "${sep}"' /\t\t\-' "$@"
|
||||
;;
|
||||
( *=ignore_headers_in_manifest= | *=path= )
|
||||
_dir_list
|
||||
;;
|
||||
(*=log_file= | *=stats_log= )
|
||||
_path_files -g "*(/) *.log"
|
||||
;;
|
||||
(*=sloppiness=)
|
||||
_ccache_sloppiness
|
||||
;;
|
||||
*=umask=)
|
||||
_alternative ":umask value (octal): "
|
||||
;;
|
||||
esac
|
||||
elif [[ $words[2] == -* ]]; then
|
||||
# if the first argument starts with -, we are in configure-ccache mode
|
||||
_arguments \
|
||||
'*'{-o,--set-config=}"[set configuration key]:keys:__ccache_config_keys" \
|
||||
'(: -)'{-h,--help}'[show help message]' \
|
||||
'(: -)'{-V,--version}'[print version and copyright information]' \
|
||||
'(-c --cleanup)'{-c,--cleanup}'[delete old files and recalculate size counters]' \
|
||||
'(-C --clear)'{-C,--clear}'[clear the cache completely (except configuration)]' \
|
||||
'--config-path[operate on configuration file PATH instead of the default]: :_files' \
|
||||
'(-d --dir)'{-d,--dir}'[operate on cache directory PATH instead of the default]: :_files -/' \
|
||||
'--evict-namespace[remove file created in namespace NAMESPACE]:namespace' \
|
||||
'--evict-older-than[remove files older than AGE]:age' \
|
||||
'(-F --max-files=)'{-F,--max-files=}'[set maximum number of files in cache]:number of files in cache: ' \
|
||||
'(-M --max-size=)'{-M,--max-size=}'[set maximum size of cache]:cache size: ' \
|
||||
'(-X --recompress)'{-X,--recompress}'[recompress the cache to level LEVEL]:level' \
|
||||
'--recompress-threads[use up to THREADS threads when recompressing the cache]:threads' \
|
||||
'(-x --show-compression)'{-x,--show-compression}'[show compression statistics]' \
|
||||
'(-p --show-config)'{-p,--show-config}'[show current configuration options]' \
|
||||
'--show-log-stats[print statistics counters from the stats log in human-readable format]' \
|
||||
'(-s --show-stats)'{-s,--show-stats}'[show statistics summary]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[increase verbosity]' \
|
||||
'(-z --zero-stats)'{-z,--zero-stats}'[zero statistics counters]' \
|
||||
'--trim-dir[remove old files from directory _PATH_]: :_files -/' \
|
||||
'--trim-max-size[specify the maximum size for --trim-dir]:size' \
|
||||
'--trim-method[specify the method for --trim-dir]: :(atime mtime)' \
|
||||
'--trim-recompress[recompress to level LEVEL]:level' \
|
||||
'--trim-recompress-threads[use up to THREADS threads when recompressing]:threads' \
|
||||
'--checksum-file[print the checksum of the file at PATH]: :_files' \
|
||||
'--extract-result[extract file data stored in result file at PATH to the current working directory]' \
|
||||
'--format[specify format for --print-log-stats and --print-stats]:format:(tab json)' \
|
||||
'(-k --get-config)'{-k,--get-config}'[print the value of configuration key]:key' \
|
||||
'--hash-file[print the hash of the file at PATH]: :_files' \
|
||||
'--inspect[print result/manifest file at PATH in human-readable format]' \
|
||||
'--print-log-stats[print statistics counter IDs and corresponding values from the stats log]' \
|
||||
'--print-stats[print statistics counter IDs and corresponding values in machine-parsable format]' \
|
||||
'--print-version[print version only]'
|
||||
elif [[ $CURRENT -eq 2 ]]; then
|
||||
_ccache_compilers
|
||||
else
|
||||
# the command line already looks like 'ccache <compiler> ...'
|
||||
# forward to the completion function of the compiler
|
||||
(( CURRENT-- ))
|
||||
shift words
|
||||
_normal
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,262 @@
|
|||
#compdef certbot
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for certbot 5.1.0 (https://github.com/certbot/certbot)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_certbot() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments -C -A "-*" \
|
||||
'(- *)'{-h,--help}'[Print help message]:topic:_certbot_help_topics' \
|
||||
'(- *)--version[Print version and exit]' \
|
||||
'1: :_certbot_subcommands' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(args)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Show help message and exit]'
|
||||
'(-c --config)'{-c,--config}'[Path to config file]:config_file:_files'
|
||||
)
|
||||
case $words[1] in
|
||||
(run|certonly|renew|enhance|certificates|delete|reconfigure)
|
||||
opts+=(
|
||||
'--cert-name[Certificate name to apply]:name'
|
||||
)
|
||||
;|
|
||||
(run|certonly|renew|reconfigure)
|
||||
opts+=(
|
||||
'--deploy-hook[Command to be run once for each successfully issued certificate]:hook'
|
||||
)
|
||||
;|
|
||||
(run|certonly|renew)
|
||||
opts+=(
|
||||
'(-q --quiet)'{-q,--quiet}'[Silence all output except errors]'
|
||||
'--required-profile[Request the given profile name from the ACME server]:profile'
|
||||
'--preferred-profile[Request the given profile name from the ACME server]:profile'
|
||||
'--preferred-chain[Set the preferred certificate chain]:chain'
|
||||
)
|
||||
;|
|
||||
(run|certonly|enhance|certificates)
|
||||
opts+=(
|
||||
'(-d --domains --domain)'{-d,--domains,--domain}'[Domain names to include]'
|
||||
)
|
||||
;|
|
||||
(run|certonly|enhance|register)
|
||||
opts+=(
|
||||
'--force-interactive[Force Certbot to be interactive even not in a terminal]'
|
||||
)
|
||||
;|
|
||||
(run|certonly|enhance)
|
||||
opts+=(
|
||||
'(-n --non-interactive --noninteractive)'{-n,--non-interactive,--noninteractive}'[Run without ever asking for user input]'
|
||||
)
|
||||
;|
|
||||
(run|certonly|register)
|
||||
opts+=(
|
||||
'--eab-kid[Key identifier for External Account Binding]:eab_kid'
|
||||
'--eab-hmac-key[HMAC key for External Account Binding]:eab_hmac_key'
|
||||
'--eab-hmac-alg[HMAC algorithm for External Account Binding(default: HS256)]:algorithm:(HS256 HS384 HS512)'
|
||||
)
|
||||
;|
|
||||
(run|certonly)
|
||||
opts+=(
|
||||
'(--keep-until-expiring --keep --reinstall)'{--keep-until-expiring,--keep,--reinstall}'[Always keep the existing one until it is due for renewal]'
|
||||
|
||||
'--debug-challenges[After setting up challenges, wait for user input before submitting to CA]'
|
||||
|
||||
'--issuance-timeout[How many seconds Certbot will wait for the server to issue a certificate]:seconds'
|
||||
'--apache[Obtain and install certificates using Apache]'
|
||||
'--nginx[Obtain and install certificates using Nginx]'
|
||||
)
|
||||
;|
|
||||
(certonly|renew|reconfigure)
|
||||
opts+=(
|
||||
'--run-deploy-hooks[run any applicable deploy hooks]'
|
||||
)
|
||||
;|
|
||||
(certonly|renew)
|
||||
opts+=(
|
||||
"--dry-run[Perform a test run against the Let's Encrypt staging server]"
|
||||
'--allow-subset-of-names[When performing domain validation, do not consider it a failure]'
|
||||
'--preferred-challenges[A sorted, comma delimited list of the preferred challenge]:challenges'
|
||||
)
|
||||
;|
|
||||
(run|revoke)
|
||||
opts+=(
|
||||
'(--test-cert --staging)'{--test-cert,--staging}"[Use the Let's Encrypt staging server to obtain or revoke test]"
|
||||
)
|
||||
;|
|
||||
(certonly|revoke)
|
||||
opts+=(
|
||||
'--cert-path[Path to where certificate is saved]:cert:_files'
|
||||
)
|
||||
;|
|
||||
(certonly|reconfigure)
|
||||
opts+=(
|
||||
'--webroot[Obtain certificates by placing files in a webroot directory]'
|
||||
)
|
||||
;|
|
||||
(certonly)
|
||||
opts+=(
|
||||
'--csr[Path to a Certificate Signing Request (CSR) in DER or PEM format]:csr:_files'
|
||||
'--standalone[Obtain certificates using a "standalone" webserver]'
|
||||
'--manual[Provide laborious manual instructions for obtaining a certificate]'
|
||||
'--dns-cloudflare[Obtain certificates using a Cloudflare DNS TXT record]'
|
||||
'--dns-digitalocean[Obtain certificates using a DigitalOcean DNS TXT record]'
|
||||
'--dns-dnsimple[Obtain certificates using a DNSimple DNS TXT record]'
|
||||
'--dns-dnsmadeeasy[Obtain certificates using a DNS Made Easy DNS TXT record]'
|
||||
'--dns-gehirn[Obtain certificates using a Gehirn DNS TXT record]'
|
||||
'--dns-google[Obtain certificates using a Google Cloud DNS TXT record]'
|
||||
'--dns-linode[Obtain certificates using a Linode DNS TXT record]'
|
||||
'--dns-luadns[Obtain certificates using a LuaDNS DNS TXT record]'
|
||||
'--dns-nsone[Obtain certificates using a NS1 DNS TXT record]'
|
||||
'--dns-ovh[Obtain certificates using a OVH DNS TXT record]'
|
||||
'--dns-rfc2136[Obtain certificates using a BIND DNS TXT record]'
|
||||
'--dns-route53[Obtain certificates using a Route53 DNS TXT record]'
|
||||
'--dns-sakuracloud[Obtain certificates using a Sakura Cloud DNS TXT record]'
|
||||
)
|
||||
;|
|
||||
(renew|reconfigure)
|
||||
opts+=(
|
||||
'--pre-hook[Command to be run before obtaining any certificates]:pre_hook'
|
||||
'--post-hook[Command to be run after attempting to obtain/renew certificates]:post_hook'
|
||||
)
|
||||
;|
|
||||
(renew)
|
||||
opts+=(
|
||||
'(--force-renewal --renew-by-default)'{--force-renewal,--renew-by-default}'[renew now regardless of whether it is near expiry]'
|
||||
'--disable-hook-validation[Disable command validation for hook commands]'
|
||||
"--no-directory-hooks[Disable running executables found in Certbot's hook directories]"
|
||||
'--disable-renew-updates[Disable automatic updates to your server configuration]'
|
||||
'--no-autorenew[Disable auto renewal of certificates]'
|
||||
)
|
||||
;|
|
||||
(enhance)
|
||||
opts+=(
|
||||
'--redirect[Automatically redirect all HTTP traffic to HTTPS]'
|
||||
'--hsts[Add Strict-Transport-Security header to every HTTP response]'
|
||||
'--uir[Add "Content-Security-Policy: upgrade-insecure-requests" header to every HTTP response]'
|
||||
'--auto-hsts[Gradually increasing max-age value for HTTP Strict Transport Security security header]'
|
||||
)
|
||||
;|
|
||||
(revoke)
|
||||
opts+=(
|
||||
'--reason[Specify reason for revoking certificates]:reason:(unspecified keycompromise affiliationchanged superseded cessationofoperation)'
|
||||
'(--delete-after-revoke --no-delete-after-revoke)--delete-after-revoke[Delete certificates after revoking them]'
|
||||
'(--delete-after-revoke --no-delete-after-revoke)--no-delete-after-revoke[Do not delete certificates after revoking them]'
|
||||
'--key-path[Path to private key for certificates instructions or revocation]:key_path:_files'
|
||||
)
|
||||
;|
|
||||
(reconfigure)
|
||||
opts+=(
|
||||
'(-a --authenticator)'{-a,--authenticator}'[Authenticator plugin name]:plugin'
|
||||
'(-i --installer)'{-i,--installer}'[Installer plugin name]:plugin'
|
||||
)
|
||||
;|
|
||||
(register|unregister|update_account)
|
||||
opts+=(
|
||||
'(-m --email)'{-m,--email}'[Email used for registration and recovery contact]:email')
|
||||
;|
|
||||
(register|update_account)
|
||||
opts+=(
|
||||
'(--eff-email --no-eff-email)--eff-email[Share your e-mail address with EFF]'
|
||||
'(--eff-email --no-eff-email)--no-eff-email[Do not share your email address with EFF]'
|
||||
)
|
||||
;|
|
||||
(unregister)
|
||||
opts+=(
|
||||
'--account[Account ID to use]:account_id'
|
||||
)
|
||||
;|
|
||||
(show_account)
|
||||
opts+=(
|
||||
'--server[ACME Directory Resource URI]:server'
|
||||
)
|
||||
;|
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_certbot_subcommands] )) ||
|
||||
_certbot_subcommands() {
|
||||
local -a commands=(
|
||||
"run:Obtain & install a certificate in your current webserver"
|
||||
"certonly:Obtain or renew a certificate, but do not install it"
|
||||
"renew:Renew all previously obtained certificates that are near"
|
||||
"enhance:Add security enhancements to your existing configuration"
|
||||
"certificates:Display information about certificates you have from Certbot"
|
||||
"revoke:Revoke a certificate (supply --cert-name or --cert-path)"
|
||||
"delete:Delete a certificate (supply --cert-name)"
|
||||
"reconfigure:Update a certificate's configuration (supply --cert-name)"
|
||||
"register:Create an ACME account"
|
||||
"unregister:Deactivate an ACME account"
|
||||
"update_account:Update an ACME account"
|
||||
"show_account:Display account details"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_certbot_help_topics] )) ||
|
||||
_certbot_help_topics() {
|
||||
local -a topics=(
|
||||
# topics
|
||||
all automation commands paths security testing
|
||||
# subcommands
|
||||
run certonly renew enhance certificates revoke delete reconfigure register unregister
|
||||
update_account show_account
|
||||
# plugins
|
||||
nginx apache standalone webroot
|
||||
)
|
||||
_values topics $topics
|
||||
}
|
||||
|
||||
_certbot "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,770 @@
|
|||
#compdef cf
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright 2015 Ferran Rodenas & Danny Rosen
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Cloud Foundry CLI (https://github.com/cloudfoundry/cli#downloads)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Ferran Rodenas (https://github.com/frodenas)
|
||||
# * Danny Rosen (https://github.com/dannyzen)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_cf() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :__cf_subcommands' \
|
||||
'*:: :->command' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(command)
|
||||
local cmd="$words[1]"
|
||||
if (( $+functions[__cf_${cmd}] )); then
|
||||
__cf_$cmd
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
__cf_subcommands() {
|
||||
local -a commands=(
|
||||
"login:Log user in"
|
||||
"logout:Log user out"
|
||||
"passwd:Change user password"
|
||||
"target:Set or view the targeted org or space"
|
||||
"api:Set or view target api url"
|
||||
"auth:Authenticate user non-interactively"
|
||||
"apps:List all apps in the target space"
|
||||
"app:Display health and status for app"
|
||||
"push:Push a new app or sync changes to an existing app"
|
||||
"scale:Change or view the instance count, disk space limit, and memory limit for an app"
|
||||
"delete:Delete an app"
|
||||
"rename:Rename an app"
|
||||
"start:Start an app"
|
||||
"stop:Stop an app"
|
||||
"restart:Restart an app"
|
||||
"restage:Restage an app"
|
||||
"restart-app-instance:Terminate the running application Instance at the given index and instantiate a new instance of the application with the same index"
|
||||
"events:Show recent app events"
|
||||
"files:Print out a list of files in a directory or the contents of a specific file"
|
||||
"logs:Tail or show recent logs for an app"
|
||||
"env:Show all env variables for an app"
|
||||
"set-env:Set an env variable for an app"
|
||||
"unset-env:Remove an env variable"
|
||||
"stacks:List all stacks"
|
||||
"stack:Show information for a stack"
|
||||
"copy-source:Make a copy of app source code from one application to another. Unless overridden, the copy-source command will restart the application"
|
||||
"create-app-manifest:Create an app manifest for an app that has been pushed successfully"
|
||||
"marketplace:List available offerings in the marketplace"
|
||||
"services:List all service instances in the target space"
|
||||
"service:Show service instance info"
|
||||
"create-service:Create a service instance"
|
||||
"update-service:Update a service instance"
|
||||
"delete-service:Delete a service instance"
|
||||
"rename-service:Rename a service instance"
|
||||
"create-service-key:Create key for a service instance"
|
||||
"service-keys:List keys for a service instance"
|
||||
"service-key:Show service key info"
|
||||
"delete-service-key:Delete a service key"
|
||||
"bind-service:Bind a service instance to an app"
|
||||
"unbind-service:Unbind a service instance from an app"
|
||||
"create-user-provided-service:Make a user-provided service instance available to cf apps"
|
||||
"update-user-provided-service:Update user-provided service instance name value pairs"
|
||||
"orgs:List all orgs"
|
||||
"org:Show org info"
|
||||
"create-org:Create an org"
|
||||
"delete-org:Delete an org"
|
||||
"rename-org:Rename an org"
|
||||
"spaces:List all spaces in an org"
|
||||
"space:Show space info"
|
||||
"create-space:Create a space"
|
||||
"delete-space:Delete a space"
|
||||
"rename-space:Rename a space"
|
||||
"domains:List domains in the target org"
|
||||
"create-domain:Create a domain in an org for later use"
|
||||
"delete-domain:Delete a domain"
|
||||
"create-shared-domain:Create a domain that can be used by all orgs (admin-only)"
|
||||
"delete-shared-domain:Delete a shared domain"
|
||||
"routes:List all routes in the current space or the current organization"
|
||||
"create-route:Create a url route in a space for later use"
|
||||
"check-route:Perform a simple check to determine whether a route currently exists or not"
|
||||
"map-route:Add a url route to an app"
|
||||
"unmap-route:Remove a url route from an app"
|
||||
"delete-route:Delete a route"
|
||||
"delete-orphaned-routes:Delete all orphaned routes (e.g.: those that are not mapped to an app)"
|
||||
"buildpacks:List all buildpacks"
|
||||
"create-buildpack:Create a buildpack"
|
||||
"update-buildpack:Update a buildpack"
|
||||
"rename-buildpack:Rename a buildpack"
|
||||
"delete-buildpack:Delete a buildpack"
|
||||
"running-environment-variable-group:Retrieve the contents of the running environment variable group"
|
||||
"staging-environment-variable-group:Retrieve the contents of the staging environment variable group"
|
||||
"set-staging-environment-variable-group:Pass parameters as JSON to create a staging environment variable group"
|
||||
"set-running-environment-variable-group:Pass parameters as JSON to create a running environment variable group"
|
||||
"feature-flags:Retrieve list of feature flags with status of each flag-able feature"
|
||||
"feature-flag:Retrieve an individual feature flag with status"
|
||||
"enable-feature-flag:Enable the use of a feature so that users have access to and can use the feature"
|
||||
"disable-feature-flag:Disable the use of a feature so that users have access to and can use the feature"
|
||||
"curl:Executes a raw request, content-type set to application/json by default"
|
||||
"config:write default values to the config"
|
||||
"oauth-token:Retrieve and display the OAuth token for the current session"
|
||||
"add-plugin-repo:Add a new plugin repository"
|
||||
"remove-plugin-repo:Remove a plugin repository"
|
||||
"list-plugin-repos:list all the added plugin repository"
|
||||
"repo-plugins:List all available plugins in all added repositories"
|
||||
"plugins:list all available plugin commands"
|
||||
"install-plugin:Install the plugin defined in command argument"
|
||||
"uninstall-plugin:Uninstall the plugin defined in command argument"
|
||||
"targets:List all saved targets (requires cf-targets plugin)"
|
||||
"save-target:Save the current target under a given name (requires cf-targets plugin)"
|
||||
"set-target:Restore a previously saved target (requires cf-targets plugin)"
|
||||
"delete-target:Delete a saved target (requires cf-targets plugin)"
|
||||
)
|
||||
|
||||
_describe -t commands "cf command" commands
|
||||
}
|
||||
|
||||
# ----------------------
|
||||
# ----- Helper functions
|
||||
# ----------------------
|
||||
|
||||
# Output a selectable list of organizations
|
||||
__cf_orgs() {
|
||||
local -a orgs=($(CF_COLOR=false CF_TRACE=false cf orgs | awk 'NR>3{print $1}'))
|
||||
if (( $#orgs )); then
|
||||
_describe "org" orgs
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of spaces
|
||||
__cf_spaces() {
|
||||
local -a spaces=($(CF_COLOR=false CF_TRACE=false cf spaces | awk 'NR>3{print $1}'))
|
||||
if (( $#spaces )); then
|
||||
_describe 'SPACE' spaces
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of applications
|
||||
__cf_apps() {
|
||||
local -a apps=($(CF_COLOR=false CF_TRACE=false cf apps | awk 'NR>4{print $1}'))
|
||||
if (( $#apps )); then
|
||||
_describe 'APP' apps
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of stacks
|
||||
__cf_stacks() {
|
||||
local -a stacks=($(CF_COLOR=false CF_TRACE=false cf stacks | awk 'NR>4{print $1}'))
|
||||
if (( $#stacks )); then
|
||||
_describe 'STACK' stacks
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of services
|
||||
__cf_marketplace_services() {
|
||||
local -a market_places=($(CF_COLOR=false CF_TRACE=false cf marketplace | awk 'NR>4{print $1}'))
|
||||
if (( $#market_places )); then
|
||||
_describe 'SERVICE' market_places
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of services
|
||||
__cf_services() {
|
||||
local -a services=($(CF_COLOR=false CF_TRACE=false cf services | awk 'NR>4{print $1}'))
|
||||
if (( $#services )); then
|
||||
_describe 'SERVICE' services
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of domains
|
||||
__cf_domains() {
|
||||
local -a domains=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v shared | awk 'NR>2{print $1}'))
|
||||
if (( $#domains )); then
|
||||
_describe 'DOMAIN' domains
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of shared domains
|
||||
__cf_shared_domains() {
|
||||
local shared_domains=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v owned | awk 'NR>2{print $1}'))
|
||||
if (( $#shared_domains )); then
|
||||
_describe 'SHARED-DOMAIN' shared_domains
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of hostnames
|
||||
__cf_hostnames() {
|
||||
local -a hostnames=($(CF_COLOR=false CF_TRACE=false cf routes | awk 'NR>3{print $2}'))
|
||||
if (( $#hostnames )); then
|
||||
_describe 'ROUTE' hostnames
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of buildpacks
|
||||
__cf_buildpacks() {
|
||||
local -a build_packs=($(CF_COLOR=false CF_TRACE=false cf buildpacks | awk 'NR>3{print $1}'))
|
||||
if (( $#build_packs )); then
|
||||
_describe 'BUILDPACK' build_packs
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of feature flags
|
||||
__cf_feature_flags() {
|
||||
local -a flags=($(CF_COLOR=false CF_TRACE=false cf feature-flags | awk 'NR>4{print $1}'))
|
||||
if (( $#flags )); then
|
||||
_describe 'FEATURE-FLAG' flags
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of plugin repos
|
||||
__cf_repo_plugins() {
|
||||
local -a repo_plugins=($(CF_COLOR=false CF_TRACE=false cf list-plugin-repos | awk 'NR>3{print $1}'))
|
||||
if (( $#repo_plugins )); then
|
||||
_describe 'REPO-PLUGIN' repo_plugins
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of plugins
|
||||
__cf_plugins() {
|
||||
local -a plugins=($(cf plugins | awk 'NR>4{print $1}'))
|
||||
if (( $#plugins )); then
|
||||
_describe 'PLUGIN' plugins
|
||||
fi
|
||||
}
|
||||
|
||||
# Output a selectable list of targets (requires cf-targets plugin)
|
||||
__cf_targets() {
|
||||
local -a targets=($(cf targets | awk '{print $1}'))
|
||||
if (( $#targets )); then
|
||||
_describe 'TARGET' targets
|
||||
fi
|
||||
}
|
||||
|
||||
# --------------------------
|
||||
# ----- end Helper functions
|
||||
# --------------------------
|
||||
|
||||
# --------------
|
||||
# ----- Commands
|
||||
# --------------
|
||||
|
||||
__cf_login() {
|
||||
_arguments \
|
||||
'-a=[API endpoint (e.g. https://api.example.com)]:api endpoint:' \
|
||||
'-u=[Username]:username:' \
|
||||
'-p=[Password]:password:' \
|
||||
'-o=[Organization]:organization name:__cf_orgs' \
|
||||
'-s=[Space]:space name:__cf_spaces' \
|
||||
'--sso[Use a one-time password to login]' \
|
||||
'--skip-ssl-validation[Skip SSL validation]'
|
||||
}
|
||||
|
||||
__cf_logout() {
|
||||
# no arguments
|
||||
}
|
||||
|
||||
__cf_passwd() {
|
||||
_arguments \
|
||||
'1:password:'
|
||||
}
|
||||
|
||||
__cf_target() {
|
||||
_arguments \
|
||||
'-o=[Organization]:organization name:__cf_orgs' \
|
||||
'-s=[Space]:space name:__cf_spaces'
|
||||
}
|
||||
|
||||
__cf_api() {
|
||||
_arguments \
|
||||
'1:API url:' \
|
||||
'--unset[Remove all api endpoint targeting]' \
|
||||
'--skip-ssl-validation[Skip SSL validation]'
|
||||
}
|
||||
|
||||
__cf_app() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'--guid[Retrieve and display the given app guid. All other health and status output for the app is suppressed]'
|
||||
}
|
||||
|
||||
__cf_push() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'-b=[Custom buildpack by name (e.g. my-buildpack) or GIT URL or GIT BRANCH URL]:buildpack name:__cf_buildpacks' \
|
||||
'-c=[Startup command, set to null to reset to default start command]:startup command:' \
|
||||
'-d=[Domain (e.g. example.com)]:domain (e.g. example.com):__cf_domains' \
|
||||
'-f=[Path to manifest]:file:_files:' \
|
||||
'-i=[Number of instances]:number of instances:' \
|
||||
'-k=[Disk limit (e.g. 256M, 1024M, 1G)]:disk limit (e.g. 256M, 1024M, 1G):' \
|
||||
'-m=[Memory limit (e.g. 256M, 1024M, 1G)]:memory limit (e.g. 256M, 1024M, 1G):' \
|
||||
'-n=[Hostname (e.g. my-subdomain)]:hostname (e.g. my-subdomain):' \
|
||||
'-p=[Path to app directory or to a zip file of the contents of the app directory]:file:_files' \
|
||||
'-s=[Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)]:stack name:__cf_stacks:' \
|
||||
'-t=[Maximum time (in seconds) for CLI to wait for application start, other server side timeouts may apply]:maximum time (in seconds):' \
|
||||
'--no-hostname[Map the root domain to this app]' \
|
||||
'--no-manifest[Ignore manifest file]' \
|
||||
'--no-route[Do not map a route to this app and remove routes from previous pushes of this app]' \
|
||||
'--no-start[Do not start an app after pushing]' \
|
||||
'--random-route[Create a random route for this app]'
|
||||
}
|
||||
|
||||
__cf_scale() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'-i=[Number of instances]:number of instances:' \
|
||||
'-k=[Disk limit (e.g. 256M, 1024M, 1G)]:disk limit (e.g. 256M, 1024M, 1G):' \
|
||||
'-m=[Memory limit (e.g. 256M, 1024M, 1G)]:memory limit (e.g. 256M, 1024M, 1G):' \
|
||||
'-f[Force restart of app without prompt]'
|
||||
}
|
||||
|
||||
__cf_delete() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'--f[Force deletion without confirmation]' \
|
||||
'--r[Also delete any mapped routes]'
|
||||
}
|
||||
|
||||
__cf_rename() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:application name:'
|
||||
}
|
||||
|
||||
__cf_start() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps'
|
||||
}
|
||||
|
||||
__cf_stop() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps'
|
||||
}
|
||||
|
||||
__cf_restart() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps'
|
||||
}
|
||||
|
||||
__cf_restage() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps'
|
||||
}
|
||||
|
||||
__cf_restart-app-instance() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:application index:'
|
||||
}
|
||||
|
||||
__cf_events() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps'
|
||||
}
|
||||
|
||||
__cf_files() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2::path:' \
|
||||
'-i=[instance]'
|
||||
}
|
||||
|
||||
__cf_logs() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'--recent[Dump recent logs instead of tailing]'
|
||||
}
|
||||
|
||||
__cf_env() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps'
|
||||
}
|
||||
|
||||
__cf_set-env() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:env var name:' \
|
||||
'3:env var value:'
|
||||
}
|
||||
|
||||
__cf_unset-env() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:env var name:'
|
||||
}
|
||||
|
||||
__cf_stack() {
|
||||
_arguments \
|
||||
'1:stack name:__cf_stacks' \
|
||||
'--guid[Retrieve and display the given stack guid. All other output for the stack is suppressed]'
|
||||
}
|
||||
|
||||
__cf_copy-source() {
|
||||
_arguments \
|
||||
'1:source application name:__cf_apps' \
|
||||
'2:target application name:' \
|
||||
'-o=[Org that contains the target application]:organization name:__cf_orgs' \
|
||||
'-s=[Space that contains the target application]:space name:__cf_spaces' \
|
||||
'--no-restart[Override restart of the application in target environment after copy-source completes]'
|
||||
}
|
||||
|
||||
__cf_create-app-manifest() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'-p=[Specify a path for file creation. If path not specified, manifest file is created in current working directory]:path:_files'
|
||||
}
|
||||
|
||||
__cf_marketplace() {
|
||||
_arguments \
|
||||
'-s=[Show plan details for a particular service offering]'
|
||||
}
|
||||
|
||||
__cf_service() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'--guid[Retrieve and display the given service guid. All other output for the service is suppressed]'
|
||||
}
|
||||
|
||||
__cf_create-service() {
|
||||
_arguments \
|
||||
'1:service:__cf_marketplace_services' \
|
||||
'2:plan:' \
|
||||
'3:service name:' \
|
||||
'-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' \
|
||||
'-t=[User provided tags]'
|
||||
}
|
||||
|
||||
__cf_update-service() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'-p=[Change service plan for a service instance]' \
|
||||
'-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' \
|
||||
'-t=[User provided tags]'
|
||||
}
|
||||
|
||||
__cf_rename-service() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'2:service name:'
|
||||
}
|
||||
|
||||
__cf_delete-service() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_create-service-key() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'2:service key:' \
|
||||
'-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]'
|
||||
}
|
||||
|
||||
__cf_service-keys() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services'
|
||||
}
|
||||
|
||||
__cf_service-key() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'2:service key:'
|
||||
}
|
||||
|
||||
__cf_delete-service-key() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'2:service key:' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_bind-service() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:service name:__cf_services' \
|
||||
'-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]'
|
||||
}
|
||||
|
||||
__cf_unbind-service() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:service name:__cf_services'
|
||||
}
|
||||
|
||||
__cf_create-user-provided-service() {
|
||||
_arguments \
|
||||
'1:service name:' \
|
||||
'-p=[Credentials]' \
|
||||
'-l=[Syslog Drain Url]'
|
||||
}
|
||||
|
||||
__cf_update-user-provided-service() {
|
||||
_arguments \
|
||||
'1:service name:__cf_services' \
|
||||
'-p=[Credentials]' \
|
||||
'-l=[Syslog Drain Url]'
|
||||
}
|
||||
|
||||
__cf_org() {
|
||||
_arguments \
|
||||
'1:organization name:__cf_orgs' \
|
||||
'--guid[Retrieve and display the given org guid. All other output for the org is suppressed]'
|
||||
}
|
||||
|
||||
__cf_create-org() {
|
||||
_arguments \
|
||||
'1:organization name:' \
|
||||
'-q=[Quota to assign to the newly created org (excluding this option results in assignment of default quota)]'
|
||||
}
|
||||
|
||||
__cf_delete-org() {
|
||||
_arguments \
|
||||
'1:organization name:__cf_orgs' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_space() {
|
||||
_arguments \
|
||||
'1:space name:__cf_spaces' \
|
||||
'--guid[Retrieve and display the given space guid. All other output for the space is suppressed]' \
|
||||
'--security-group-rules[Retrieve the rules for all the security groups associated with the space]'
|
||||
}
|
||||
|
||||
__cf_create-space() {
|
||||
_arguments \
|
||||
'1:space name:' \
|
||||
'-o=[Org that contains the target application]:organization name:__cf_orgs' \
|
||||
'-q=[Quota to assign to the newly created space (excluding this option results in assignment of default quota)]'
|
||||
}
|
||||
|
||||
__cf_delete-space() {
|
||||
_arguments \
|
||||
'1:space name:__cf_spaces' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_create-domain() {
|
||||
_arguments \
|
||||
'1:organization name:__cf_orgs' \
|
||||
'2:domain:'
|
||||
}
|
||||
|
||||
__cf_delete-domain() {
|
||||
_arguments \
|
||||
'1:domain:__cf_domains' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_create-shared-domain() {
|
||||
_arguments \
|
||||
'1:domain:'
|
||||
}
|
||||
|
||||
__cf_delete-shared-domain() {
|
||||
_arguments \
|
||||
'1:domain:__cf_shared_domains' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_routes() {
|
||||
_arguments \
|
||||
'--orglevel[List all the routes for all spaces of current organization]'
|
||||
}
|
||||
|
||||
__cf_create-route() {
|
||||
_arguments \
|
||||
'1:space name:__cf_spaces' \
|
||||
'2:domain:__cf_domains' \
|
||||
'-n=[Hostname]'
|
||||
}
|
||||
|
||||
__cf_check-route() {
|
||||
_arguments \
|
||||
'1:hostname:__cf_hostnames' \
|
||||
'2:domain:__cf_domains'
|
||||
}
|
||||
|
||||
__cf_map-route() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:domain:__cf_domains' \
|
||||
'-n=[Hostname]:hostname:__cf_hostnames:'
|
||||
}
|
||||
|
||||
__cf_unmap-route() {
|
||||
_arguments \
|
||||
'1:application name:__cf_apps' \
|
||||
'2:domain:__cf_domains' \
|
||||
'-n=[Hostname]:hostname:__cf_hostnames:'
|
||||
}
|
||||
|
||||
__cf_delete-route() {
|
||||
_arguments \
|
||||
'1:domain:__cf_domains' \
|
||||
'-n=[Hostname]:hostname:__cf_hostnames:' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_delete-orphaned-routes() {
|
||||
_arguments \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_create-buildpack() {
|
||||
_arguments \
|
||||
'1:buildpack name:' \
|
||||
'2:path:_files' \
|
||||
'3:position:' \
|
||||
'--enable[Enable the buildpack to be used for staging]' \
|
||||
'--disable[Disable the buildpack from being used for staging]'
|
||||
}
|
||||
|
||||
__cf_update-buildpack() {
|
||||
_arguments \
|
||||
'1:buildpack name:__cf_buildpacks' \
|
||||
'-p=[Path to directory or zip file]:file:_files' \
|
||||
'-i=[The order in which the buildpacks are checked during buildpack auto-detection]' \
|
||||
'--enable[Enable the buildpack to be used for staging]' \
|
||||
'--disable[Disable the buildpack from being used for staging]' \
|
||||
'--lock[Lock the buildpack to prevent updates]' \
|
||||
'--unlock[Unlock the buildpack to enable updates]'
|
||||
}
|
||||
|
||||
__cf_rename-buildpack() {
|
||||
_arguments \
|
||||
'1:buildpack name:__cf_buildpacks' \
|
||||
'2:new buildpack name:'
|
||||
}
|
||||
|
||||
__cf_delete-buildpack() {
|
||||
_arguments \
|
||||
'1:buildpack name:__cf_buildpacks' \
|
||||
'-f[Force deletion without confirmation]'
|
||||
}
|
||||
|
||||
__cf_feature-flag() {
|
||||
_arguments \
|
||||
'1:feature name:__cf_feature_flags'
|
||||
}
|
||||
|
||||
__cf_enable-feature-flag() {
|
||||
_arguments \
|
||||
'1:feature name:__cf_feature_flags'
|
||||
}
|
||||
|
||||
__cf_disable-feature-flag() {
|
||||
_arguments \
|
||||
'1:feature name:__cf_feature_flags'
|
||||
}
|
||||
|
||||
__cf_curl() {
|
||||
_arguments \
|
||||
'1:path:' \
|
||||
'-i[Include response headers in the output]' \
|
||||
'-v[Enable CF_TRACE output for all requests and responses]' \
|
||||
'-X=[HTTP method]:http method:(GET POST PUT DELETE)' \
|
||||
'-h=[Custom headers to include in the request, flag can be specified multiple times]' \
|
||||
'-d=[HTTP data to include in the request body]' \
|
||||
'--output[Write curl body to FILE instead of stdout]'
|
||||
}
|
||||
|
||||
__cf_config() {
|
||||
_arguments \
|
||||
'--async-timeout=[Timeout for async HTTP requests]' \
|
||||
'--trace=[Trace HTTP requests]:trace:(true false)' \
|
||||
'--color=[Enable or disable color]:color:(true false)' \
|
||||
'--locale=[Set default locale. If LOCALE is CLEAR, previous locale is deleted]'
|
||||
}
|
||||
|
||||
__cf_add-plugin-repo() {
|
||||
_arguments \
|
||||
'1:repo name:' \
|
||||
'2:url:'
|
||||
}
|
||||
|
||||
__cf_remove-plugin-repo() {
|
||||
_arguments \
|
||||
'1:repo name:__cf_repo_plugins' \
|
||||
'2:url:'
|
||||
}
|
||||
|
||||
__cf_repo-plugins() {
|
||||
_arguments \
|
||||
'-r=[Repo Name]:repo name:__cf_repo_plugins'
|
||||
}
|
||||
|
||||
__cf_plugins() {
|
||||
_arguments \
|
||||
'-checksum[Compute and show the sha1 value of the plugin binary file]'
|
||||
}
|
||||
|
||||
__cf_install-plugin() {
|
||||
_arguments \
|
||||
'1:plugin URL or path:_files' \
|
||||
'-r=[repo name where the plugin binary is located]:repo name:__cf_repo_plugins'
|
||||
}
|
||||
|
||||
__cf_uninstall-plugin() {
|
||||
_arguments \
|
||||
'1:plugin name:__cf_plugins'
|
||||
}
|
||||
|
||||
__cf_save-target() {
|
||||
_arguments \
|
||||
'1:target-name:' \
|
||||
'-f[Force save even if current target is already saved under another name]'
|
||||
}
|
||||
|
||||
__cf_set-target() {
|
||||
_arguments \
|
||||
'1:target-name:__cf_targets' \
|
||||
'-f[Force target change even if current target is unsaved]'
|
||||
}
|
||||
|
||||
__cf_delete-target() {
|
||||
_arguments \
|
||||
'1:target-name:__cf_targets'
|
||||
}
|
||||
|
||||
# ------------------
|
||||
# ----- end Commands
|
||||
# ------------------
|
||||
|
||||
_cf "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
#compdef chatblade
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for chatblade 0.7.0 (https://github.com/npiv/chatblade)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Johannes Bittner (https://github.com/johannes87)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_chatblade() {
|
||||
local -a args
|
||||
local context state state_descr line
|
||||
typeset -A opt_args
|
||||
|
||||
args+=(
|
||||
'(- *)'{-h,--help}'[show help message and exit]'
|
||||
'(- *)--version[display the chatblade version]'
|
||||
'--openai-api-key[the OpenAI API key can also be set as env variable OPENAI_API_KEY]:key'
|
||||
'--openai-base-url[a custom URL to use the openAI against a local or custom model]:key'
|
||||
'--temperature[temperature (openai setting)]:temperature'
|
||||
'(-c --chat-gpt)'{-c,--chat-gpt}'[chat GPT model 3.5/4 shorthand or full qualified model name, can also be set via env variable OPENAI_API_MODEL]:chat GPT model:(3.5 4 4o mini o1 o1mini)'
|
||||
'(-i --interactive)'{-i,--interactive}'[start an interactive chat session. This will implicitly continue the conversation]'
|
||||
'(-s --stream)'{-s,--stream}'[Stream the incoming text to the terminal]'
|
||||
'(-t --tokens)'{-t,--tokens}'[display what *would* be sent, how many tokens, and estimated costs]'
|
||||
'(-p --prompt-file)'{-p,--prompt-file}'[prompt name - will load the prompt with that name at ~/.config/chatblade/name or a path to a file]:prompt file:_files'
|
||||
'(-e --extract)'{-e,--extract}'[extract content from response if possible (either json or code block)]'
|
||||
'(-r --raw)'{-r,--raw}'[print session as pure text, dont pretty print or format]'
|
||||
'(-n --no-format)'{-n,--no-format}'[do not add pretty print formatting to output]'
|
||||
'(-o --only)'{-o,--only}'[Only display the response, omit query]'
|
||||
'--theme[Set the theme for syntax highlighting see https://pygments.org/styles/, can also be set with CHATBLADE_THEME]:theme:_values "theme" default emacs friendly manni monokai'
|
||||
'(-l --last)'{-l,--last}'[alias for -S last, the default session if none is specified]'
|
||||
'(-S --session)'{-S,--session}'[initiate or continue named session]:session:->sessions'
|
||||
'--session-list[list sessions]'
|
||||
'--session-path[show path to session file]'
|
||||
'--session-dump[dump session to stdout]'
|
||||
'--session-delete[delete session]'
|
||||
'--session-rename[rename session]:new session:->sessions'
|
||||
)
|
||||
|
||||
_arguments -s $args
|
||||
|
||||
case $state in
|
||||
(sessions)
|
||||
local -a sessions
|
||||
sessions=("${(@f)$(chatblade --session-list)}")
|
||||
_describe 'session' sessions
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_chatblade
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
#compdef chcpu
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for chcpu v2.41 (https://github.com/util-linux/util-linux)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[display help]' \
|
||||
'(- *)'{-V,--version}'[display version]' \
|
||||
'(-c --configure)'{-c,--configure}'[configure the specified CPUs]:cpu list (0,5,7,9-11)' \
|
||||
'(-d --disable)'{-d,--disable}'[disable the specified CPUs]:cpu list (0,5,7,9-11)' \
|
||||
'(-e --enable)'{-e,--enable}'[enable the specified CPUs]:cpu list (0,5,7,9-11)' \
|
||||
'(-g --deconfigure)'{-g,--deconfigure}'[deconfigure the specified CPUs]:cpu_list (0,5,7,9-11)' \
|
||||
'(-p --dispatch)'{-p,--dispatch}'[set the CPU dispatching mode]:mode:(horizontal vertical)' \
|
||||
'(-r --rescan)'{-r,--rescan}'[trigger a rescan of CPUs]'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
#compdef chmem
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for chmem, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
|
||||
# - configure memory
|
||||
#
|
||||
# Author:
|
||||
# *Aditi Sharma (https://github.com/Aditi76117)
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local arg
|
||||
if (( ${words[(I)(-b|--blocks)]} )); then
|
||||
arg=blockrange
|
||||
else
|
||||
arg='size or range'
|
||||
fi
|
||||
if (( ${words[(I)(-e|-d|-c|-m|--disable|--enable|--deconfigure|--configure)]} )); then
|
||||
arg="1:${arg}"
|
||||
else
|
||||
unset arg
|
||||
fi
|
||||
_arguments -s \
|
||||
'(-b --blocks)'{-b,--blocks}'[Use a BLOCKRANGE parameter instead of RANGE or SIZE]' \
|
||||
'(-e --enable -d --disable -c --configure -g --deconfigure -m --memmap-on-memory)'{-d,--disable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory offline]' \
|
||||
'(-e --enable -d --disable -c --configure -g --deconfigure -m --memmap-on-memory)'{-e,--enable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory online]' \
|
||||
'(-e --enable -d --disable -c --configure -g --deconfigure -m --memmap-on-memory)'{-g,--deconfigure}'[Deconfigure the specified RANGE, SIZE, or BLOCKRANGE of memory]' \
|
||||
'(-e --enable -d --disable -c --configure -g --deconfigure )'{-c,--configure}'[Configure the specified RANGE, SIZE, or BLOCKRANGE of memory]' \
|
||||
'(-e --enable -d --disable -g --deconfigure -m --memmap-on-memory)'{-m,--memmap-on-memory}'[Select memmap-on-memory for the specified memory]:memmap-on-memory' \
|
||||
'(-z --zone)'{-z,--zone}'[Select the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline]:zone' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Verbose mode]' \
|
||||
'(- *)'{-h,--help}'[Display help text and exit]' \
|
||||
'(- *)'{-V,--version}'[Print version and exit]' \
|
||||
${arg}
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
#compdef bpython bpython2
|
||||
#compdef choc
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2012 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
|
|
@ -25,23 +28,33 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for bpython (http://bpython-interpreter.org/).
|
||||
# Completion script for choc (https://chocolatapp.com/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
||||
# * Nicholas Penree (https://github.com/drudge)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments -A "-*" \
|
||||
'(-h --help)'{-h,--help}'[Show help message]' \
|
||||
'(-i --interactive)'{-i,--interactive}'[Drop to bpython shell after running file instead of exiting]' \
|
||||
'(-q --quiet)'{-q,--quiet}"[Don't flush the output to stdout]" \
|
||||
'(-v --version)'{-v,--version}'[Print version and exit]' \
|
||||
'--config[Use CONFIG instead of default config file]:Config file:_files' \
|
||||
'*: :_files'
|
||||
local curcontext="$curcontext" state line ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
'(-a --async)'{-a,--async}'[do not wait for the user to close the file in Chocolat]' \
|
||||
'(-w --wait)'{-w,--wait}'[wait for file to be closed by Chocolat]' \
|
||||
'(-n --no-reactivation)'{-n,--no-reactivation}'[after editing with -w, do not reactivate the calling app]' \
|
||||
'(-h --help)'{-h,--help}'[show help information]' \
|
||||
'(-v --version)'{-v,--version}'[print version information]' \
|
||||
'*:script or directory:_files' && ret=0
|
||||
|
||||
return ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#compdef chpasswd
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for chpasswd v4.17 (https://github.com/shadow-maint/shadow)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[display help]' \
|
||||
'(-c --crypt-method)'{-c,--crypt-method}'[use the specified method to encrypt the passwords]:method:(DES MD5 SHA256 SHA512 YESCRYPT NONE)' \
|
||||
'(-e --encrypted)'{-e,--encrypted}'[supplied passwords are in encrypted form]' \
|
||||
'(-m --md5)'{-m,--md5}'[use MD5 encryption instead of DES]' \
|
||||
'(-R --root)'{-R,--root}'[apply changes in the specified CHROOT_DIR directory]:dir:_files -/' \
|
||||
'(-P --prefix)'{-P,--prefix}'[apply changes to configuration files under the specified directory PREFIX_DIR]:dir:_files -/' \
|
||||
'(-s --sha-rounds)'{-s,--sha-rounds}'[use the specified number of rounds to encrypt the passwords]:rounds'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,219 @@
|
|||
#compdef chromium
|
||||
|
||||
# Copyright 2018 CERN for the benefit of the LHCb Collaboration
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following disclaimer
|
||||
# in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of CERN nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# In applying this licence, CERN does not waive the privileges and immunities
|
||||
# granted to it by virtue of its status as an Intergovernmental Organization
|
||||
# or submit itself to any jurisdiction.
|
||||
|
||||
_arguments \
|
||||
"--user-data-dir=[Specify the directory that user data is kept in]:directory:_path_files -/" \
|
||||
"--app=[Runs URL in app mode]:url:_urls" \
|
||||
"--incognito[Open in incognito mode]" \
|
||||
"--new-window[open in new window]" \
|
||||
"(--no-proxy-server --proxy-auto-detect --proxy-pac-url)--proxy-server=[specify proxy server]:[<proxy-scheme>\://]<proxy-host>[\:<proxy-port>]:_chromium_proxyurls" \
|
||||
"--no-proxy-server[Disables the proxy server]" \
|
||||
"--proxy-auto-detect[Autodetect proxy configuration]" \
|
||||
"--proxy-pac-url=[Specify proxy autoconfiguration URL]:proxy autoconfiguration url:_urls" \
|
||||
"--password-store=[Set the password store to use]:password store: _wanted arguments expl 'wallet store' compadd -- basic gnome kwallet" \
|
||||
"--version[print version]" \
|
||||
'*:: :{ _alternative "urls\:url\:_urls" "file\:file\:_files" }'
|
||||
|
||||
# excerpt from the chromium help message:
|
||||
#
|
||||
# Specify the HTTP/SOCKS4/SOCKS5 proxy server to use for requests. This overrides any environment variables or settings picked via the options dialog. An individual proxy server is specified
|
||||
# using the format:
|
||||
#
|
||||
#
|
||||
#
|
||||
# Where <proxy-scheme> is the protocol of the proxy server, and is one of:
|
||||
#
|
||||
# "http", "socks", "socks4", "socks5".
|
||||
#
|
||||
# If the <proxy-scheme> is omitted, it defaults to "http". Also note that "socks" is equivalent to "socks5".
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# --proxy-server="foopy:99"
|
||||
# Use the HTTP proxy "foopy:99" to load all URLs.
|
||||
#
|
||||
# --proxy-server="socks://foobar:1080"
|
||||
# Use the SOCKS v5 proxy "foobar:1080" to load all URLs.
|
||||
#
|
||||
# --proxy-server="socks4://foobar:1080"
|
||||
# Use the SOCKS v4 proxy "foobar:1080" to load all URLs.
|
||||
#
|
||||
# --proxy-server="socks5://foobar:66"
|
||||
# Use the SOCKS v5 proxy "foobar:66" to load all URLs.
|
||||
#
|
||||
# It is also possible to specify a separate proxy server for different URL types, by prefixing the proxy server specifier with a URL specifier:
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# --proxy-server="https=proxy1:80;http=socks4://baz:1080"
|
||||
# Load https://* URLs using the HTTP proxy "proxy1:80". And load http://*
|
||||
# URLs using the SOCKS v4 proxy "baz:1080".
|
||||
#
|
||||
|
||||
_chromium_proxyurls () {
|
||||
#TODO: semicolon separated urls not yet implemented
|
||||
# mostly copied from _urls
|
||||
local ipre scheme host user uhosts ret=1 expl match glob suf
|
||||
local localhttp
|
||||
zstyle -a ":completion:${curcontext}:urls" local localhttp
|
||||
local localhttp_servername="$localhttp[1]"
|
||||
local localhttp_documentroot="$localhttp[2]"
|
||||
local localhttp_userdir="$localhttp[3]"
|
||||
zstyle -a ":completion:${curcontext}:urls" urls urls
|
||||
if [[ $#urls -gt 1 || ( $#urls -eq 1 && ! -d $urls[1] ) ]]
|
||||
then
|
||||
[[ $#urls -eq 1 && -f $urls[1] ]] && urls=($(< $urls[1]))
|
||||
_wanted urls expl 'URL' compadd "$@" -a urls && return 0
|
||||
urls=()
|
||||
fi
|
||||
urls="$urls[1]"
|
||||
glob=(-g '*(^/)')
|
||||
zparseopts -D -K -E 'g:=glob'
|
||||
ipre="$IPREFIX"
|
||||
if ! compset -P '(#b)([-+.a-z0-9]#):'
|
||||
then
|
||||
_tags -C argument prefixes
|
||||
while _tags
|
||||
do
|
||||
while _next_label prefixes expl 'URL prefix' -S '' "$@"
|
||||
do
|
||||
compset -S '[^:/]*' && compstate[to_end]=''
|
||||
compadd "$expl[@]" http:// socks:// socks4:// socks5:// && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
scheme="$match[1]"
|
||||
case "$scheme" in
|
||||
(http(|s)|socks(|4|5)) if ! compset -P //
|
||||
then
|
||||
_wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" //
|
||||
return
|
||||
fi ;;
|
||||
(file) [[ -prefix //(127.0.0.1|localhost)/ ]] && compset -P '//(127.0.0.1|localhost)'
|
||||
[[ -prefix /// ]] && compset -P //
|
||||
if ! compset -P //
|
||||
then
|
||||
_tags -C file files
|
||||
while _tags
|
||||
do
|
||||
while _next_label files expl 'local file'
|
||||
do
|
||||
if [[ -prefix / ]]
|
||||
then
|
||||
_path_files "$expl[@]" -S '' "${glob[@]}" && ret=0
|
||||
_path_files "$expl[@]" -S/ -r '/' -/ && ret=0
|
||||
elif [[ -z "$PREFIX" ]]
|
||||
then
|
||||
compadd -S '/' -r '/' "$expl[@]" "$@" - "${PWD%/}" && ret=0
|
||||
fi
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
return 1
|
||||
fi ;;
|
||||
esac
|
||||
if ! compset -P '(#b)([^:/]#)([:/])'
|
||||
then
|
||||
uhosts=($urls/$scheme/$PREFIX*$SUFFIX(/:t))
|
||||
_tags hosts
|
||||
while _tags
|
||||
do
|
||||
while _next_label hosts expl host
|
||||
do
|
||||
compset -S '[:/]*' || suf="/"
|
||||
(( $#uhosts )) || _hosts -S "$suf" -r '/:' "$expl[@]" && ret=0
|
||||
[[ "$scheme" = http ]] && uhosts=($uhosts $localhttp_servername)
|
||||
compadd -S "$suf" -r '/:' "$expl[@]" -a uhosts && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
host="$match[1]"
|
||||
[[ $match[2] = ':' ]] && ! compset -P '<->/' && _message -e ports 'port number' && return 0
|
||||
_tags remote-files files || return 1
|
||||
if [[ "$localhttp_servername" = "$host" ]]
|
||||
then
|
||||
if compset -P \~
|
||||
then
|
||||
if ! compset -P '(#b)([^/]#)/'
|
||||
then
|
||||
_users -S/ "$@"
|
||||
return
|
||||
fi
|
||||
user="$match[1]"
|
||||
while _tags
|
||||
do
|
||||
while _next_label files expl 'local file'
|
||||
do
|
||||
_path_files "$expl[@]" "$@" -W ~$user/$localhttp_userdir "${glob[@]}" && ret=0
|
||||
_path_files -S/ -r '/' "$expl[@]" -W ~$user/$localhttp_userdir-/ && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
else
|
||||
while _tags
|
||||
do
|
||||
while _next_label files expl 'local file'
|
||||
do
|
||||
_path_files "$expl[@]" "$@" -W $localhttp_documentroot "${glob[@]}" && ret=0
|
||||
_path_files -S/ -r '/' "$expl[@]" -W $localhttp_documentroot -/ && ret=0
|
||||
done
|
||||
(( ret )) || return 0
|
||||
done
|
||||
fi
|
||||
else
|
||||
while _tags
|
||||
do
|
||||
(( $#urls )) && while _next_label files expl 'local file'
|
||||
do
|
||||
_path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0
|
||||
_path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0
|
||||
done
|
||||
[[ $scheme = (scp|sftp) ]] && _requested remote-files && _remote_files -h $host -- ssh && ret=0
|
||||
(( ret )) || return 0
|
||||
done
|
||||
fi
|
||||
return $ret
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
#compdef clang-check
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for clang-check v20.1.2 (https://clang.llvm.org/docs/ClangCheck.html)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)--help[Display available options]' \
|
||||
'(- *)--help-hidden[Display available more options]' \
|
||||
'(- *)--help-list[Display list of available options]' \
|
||||
'(- *)--help-list-hidden[Display list of more available options]' \
|
||||
'(- *)--version[Display the version of this program]' \
|
||||
'--analyze[Run static analysis engine]' \
|
||||
'--analyzer-output-path=[Write output to file]: :_files' \
|
||||
'--ast-dump[Build ASTs and then debug dump them]' \
|
||||
'--ast-dump-filter=[Use with -ast-dump or -ast-print to dump/print only AST declaration nodes having a certain substring]:string' \
|
||||
'--ast-list[Build ASTs and print the list of declaration node qualified names]' \
|
||||
'--ast-print[Build ASTs and then pretty-print them]' \
|
||||
'*--extra-arg=[Additional argument to append to the compiler command line]:arg' \
|
||||
'*--extra-arg-before=[Additional argument to prepend to the compiler command line]:arg' \
|
||||
'--fix-what-you-can[Apply fix-it advice even in the presence of unfixable errors]' \
|
||||
'--fixit[Apply fix-it advice to the input source]' \
|
||||
'-p[Build directory where compile_commands.json is]: :_files -/' \
|
||||
'--print-all-options[Print all option values after command line parsing]' \
|
||||
'--print-options[Print non-default options after command line parsing]' \
|
||||
'--syntax-tree-dump[dump the syntax tree]' \
|
||||
'--tokens-dump[dump the preprocessed tokens]' \
|
||||
'*: :_files'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
#compdef clang-format
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for clang-format v20.1.2 (https://clang.llvm.org/docs/ClangFormat.html)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local -a styles=(LLVM GNU Google Chromium Microsoft)
|
||||
|
||||
_arguments \
|
||||
'(- *)--help[Display available options]' \
|
||||
'(- *)--help-hidden[Display available more options]' \
|
||||
'(- *)--help-list[Display list of available options]' \
|
||||
'(- *)--help-list-hidden[Display list of more available options]' \
|
||||
'--Wclang-format-violations[Warnings about individual formatting changes needed]' \
|
||||
'--Werror=[If set, changes formatting warnings to errors]' \
|
||||
'*--Wno-error=[If set, do not error out on the specified warning type]:warn' \
|
||||
'--assume-filename=[Set filename used to determine the language and to find .clang-format file]: :_files' \
|
||||
'--cursor=[The position of the cursor when invoking clang-format from an editor integration]:pos' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[If set, do not actually make the formatting changes]' \
|
||||
'--dump-config[Dump configuration options to stdout and exit]' \
|
||||
'--fail-on-incomplete-format[If set, fail with exit code 1 on incomplete format]' \
|
||||
'--fallback-style=[The name of the predefined style used as a fallback]: :($styles)' \
|
||||
'--ferror-limit=[Set the maximum number of clang-format errors to emit before stopping]:limit' \
|
||||
'*--files=[Provide a list of files to run clang-format]: :_files' \
|
||||
'--fno-color-diagnostics[If set, not to print diagnostics in color]' \
|
||||
'-i[Inplace edit files, if specified]' \
|
||||
'--length=[Format a range of this length(in bytes)]:bytes' \
|
||||
'--lines=[format a range of lines]:format' \
|
||||
'--list-ignored[List ignored files]' \
|
||||
'--offset=[Format a range starting at this byte offset]' \
|
||||
'--output-replacements-xml[Output replacements as XML]' \
|
||||
'--print-all-options[Print all option values after command line parsing]' \
|
||||
'--print-options[Print non default options after command line parsing]' \
|
||||
'--qualifier-alignment=[If set, overrides the qualifier alignment style determined by the QualifierAlignment style flag]' \
|
||||
'--sort-includes[If set, overrides the include sorting behavior determined by the SortIncludes style flag]' \
|
||||
'--style=[Set coding style]: :($styles)' \
|
||||
'--verbose[If set, show the list of processed files]' \
|
||||
'(- *)--version[Display the version of this program]' \
|
||||
'*: :_files'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
#compdef clang-tidy
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for clang-tidy v15.0.2 (https://clang.llvm.org/extra/clang-tidy/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local -a styles=(LLVM GNU Google Chromium Microsoft)
|
||||
|
||||
_arguments \
|
||||
'(- *)--help[Display available options]' \
|
||||
'(- *)--help-hidden[Display available more options]' \
|
||||
'(- *)--help-list[Display list of available options]' \
|
||||
'(- *)--help-list-hidden[Display list of more available options]' \
|
||||
'--allow-no-checks[Allow empty enabled checks]' \
|
||||
'--checks=[Comma-separated list of globs with optional "-" prefix]:checks' \
|
||||
'--config=[Specifies a configuration in YAML/JSON format]:conf' \
|
||||
'--config-file=[Specify the path of .clang-tidy or custom config-file]: :_files' \
|
||||
'--dump-config[Dumps configuration in the YAML format to stdout]' \
|
||||
'--enable-check-profile[Enable per-check timing profiles, and print a report to stderr]' \
|
||||
'--enable-module-headers-parsing[Enable preprocessor-level module header parsing for C++20 and above]' \
|
||||
'--exclude-header-filter=[Regular expression of headers to exclude diagnostics from]:filter' \
|
||||
'--explain-config[For each enabled check explains, where it is enabled]' \
|
||||
'--export-fixes=[YAML file to store suggested fixes in]: :_files' \
|
||||
'*--extra-arg[Additional argument to append to the compiler command line]:arg' \
|
||||
'*--extra-arg-before[Additional argument to prepend to the compiler command line]:arg' \
|
||||
'--fix[Apply suggested fixes]' \
|
||||
'--fix-errors[Apply suggested fixes even if compilation errors were found]' \
|
||||
'--fix-notes[If a warning has no fix, but a single fix can be found through an associated diagnostic node, apply the fix]' \
|
||||
'--format-style=[Style for formatting code around applied fixes]: :(none file llvm google webkit mozilla)' \
|
||||
'--header-filter=[Regular expression matching the names of the headers to output diagnostics from]:regexp' \
|
||||
'--line-filter=[List of files with line ranges to filter the warnings]' \
|
||||
'(- *)--list-checks[List all enabled checks and exit]' \
|
||||
'--load=[Load the specified plugin]: :_files' \
|
||||
'-p[Build directory where compile_commands.json is]: :_files -/' \
|
||||
'--print-all-options[Print all option values after command line parsing]' \
|
||||
'--print-options[Print non default options after command line parsing]' \
|
||||
'--quiet[Run clang-tidy in quiet mode]' \
|
||||
'--store-check-profile=[These per-TU profiles are instead stored as JSON]:prefix' \
|
||||
'--system-headers[Display the errors from system headers]' \
|
||||
'--use-color[Use colors in diagnostics]' \
|
||||
'(- *)--version[Display the version of this program]' \
|
||||
'--verify-config[Check the config files to ensure each check and option is recognized]' \
|
||||
'--vfsoverlay=[Overlay the virtual filesystem described by file over the real file system]: :_files' \
|
||||
'--warnings-as-errors=[Upgrades warning to errors]:check' \
|
||||
'*: :_files'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,641 @@
|
|||
#compdef cmake -value-,CMAKE_GENERATOR,-default-
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2017 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# -------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for CMake 4.3.0 (https://cmake.org).
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Scott M. Kroll <skroll@gmail.com> (initial version)
|
||||
# * Paul Seyfert <pseyfert.mathphys@gmail.com> (handling of --build and updates)
|
||||
# * Norbert Lange <nolange79@gmail.com> (presets, command mode, updates)
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
# Notes
|
||||
# -----
|
||||
#
|
||||
# * By default only C and C++ languages are supported for compiler flag
|
||||
# variables. To define your own list of languages:
|
||||
#
|
||||
# cmake_langs=('C' 'C'
|
||||
# 'CXX' 'C++')
|
||||
# zstyle ':completion:*:cmake:*' languages $cmake_langs
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
local -a cmake_build_options=(
|
||||
'-S[Explicitly specify a source directory]:source directory:_path_files -/'
|
||||
'-B[Explicitly specify a build directory]:build directory:_path_files -/'
|
||||
'-C[Pre-load a script to populate the cache]:initial cache:_files'
|
||||
'*-D-[Create a cmake cache entry]:property:_cmake_define_property'
|
||||
'*-U[Remove matching entries from CMake cache]:globbing expression'
|
||||
'-G[Specify a makefile generator]:generator:_cmake_generators'
|
||||
'-T[Specify toolset name if supported by generator]:toolset name'
|
||||
'-A[Specify platform name if supported by generator]:platform name'
|
||||
'--toolchain[Specify toolchain file]: :_files'
|
||||
'--install-prefix[Specify install directory]: :_path_files -/'
|
||||
'--project-file[Specify an alternate project file name]:name'
|
||||
|
||||
# Warnings
|
||||
'(-Wdev)-Wno-dev[Suppress/Enable developer warnings]'
|
||||
'(-Wno-dev)-Wdev[Suppress/Enable developer warnings]'
|
||||
'(-Wdeprecated)-Wno-deprecated[Suppress/Enable deprecation warnings]'
|
||||
'(-Wno-deprecated)-Wdeprecated[Suppress/Enable deprecation warnings]'
|
||||
'(-Werror=dev)-Wno-error=dev[Make developer warnings (not) errors]'
|
||||
'(-Wno-error=dev)-Werror=dev[Make developer warnings (not) errors]'
|
||||
'(-Wno-error=deprecated)-Werror=deprecated[Make deprecated macro and function warnings (not) errors]'
|
||||
'(-Werror=deprecated)-Wno-error=deprecated[Make deprecated macro and function warnings (not) errors]'
|
||||
|
||||
'--preset=[Specify a configure preset]:preset:_cmake_presets'
|
||||
'--list-presets[List available presets]'
|
||||
'--workflow[Run a workflow preset]'
|
||||
|
||||
'-E[CMake command mode]:command:_cmake_commands'
|
||||
|
||||
'-L-[List cache variables]::_values "options" "[non-advanced cache variables]" "A[advanced cache variables]" "H[non-advanced cached variables with help]" "AH[advanced cache variables with help]"'
|
||||
'--fresh[Configure a fresh build tree, removing any existing cache file]'
|
||||
|
||||
'--build[Build a CMake-generated project binary tree]::project directory:_path_files -/'
|
||||
'--install[Install a CMake-generated project binary tree]:project directory:_path_files -/'
|
||||
'--open[Open generated project in the associated application]:project directory:_path_files -/'
|
||||
|
||||
'-N[View mode only]'
|
||||
'-P[Process script mode]:script:_files'
|
||||
|
||||
'--find-package[Legacy pkg-config like mode. Do not use]'
|
||||
|
||||
'--graphviz=[Generate graphviz of dependencies, see CMakeGraphVizOptions.cmake for more]:graphviz output:_files'
|
||||
'--system-information[Dump information about this system]::system information output:_files'
|
||||
'--print-config-dir[Print CMake config directory for user-wide FileAPI queries]'
|
||||
|
||||
'--log-level=[Set the verbosity of messages from CMake files]:log level:(ERROR WARNING NOTICE STATUS VERBOSE DEBUG TRACE)'
|
||||
'--log-context[Prepend log messages with context, if given]'
|
||||
|
||||
'--debug-trycompile[Do not delete the try_compile build tree. Only useful on one try_compile at a time]'
|
||||
'--debug-output[Put cmake in a debug mode]'
|
||||
'--debug-find[Put cmake find in a debug mode]'
|
||||
'--debug-find-pkg=[Limit cmake debug-find to the comma-separated list of packages]:packages'
|
||||
'--debug-find-var=[Limit cmake debug-find to the comma-separated list of result variables]:variables'
|
||||
|
||||
'(--trace-expand)--trace[Put cmake in trace mode]'
|
||||
'(--trace)--trace-expand[Put cmake in trace mode with variable expansion]'
|
||||
'--trace-format=[Set the output format of the trace]:trace format:(human json-v1)'
|
||||
'*--trace-source[Trace only this CMake file/module. Multiple options allowed]:filename:_files'
|
||||
'--trace-redirect[Redirect trace output to a file instead of stderr]:trace output:_files'
|
||||
|
||||
'--warn-uninitialized[Warn about uninitialized values]'
|
||||
'--no-warn-unused-cli[Do not warn about command line options]'
|
||||
'--warn-unused-vars[Warn about unused variables]'
|
||||
'--check-system-vars[Find problems with variable usage in system files]'
|
||||
'--compile-no-warning-as-error[Ignore COMPILE_WARNING_AS_ERROR property and CMAKE_COMPILE_WARNING_AS_ERROR variable]'
|
||||
'--link-no-warning-as-error[Ignore LINK_WARNING_AS_ERROR and CMAKE_LINK_WARNING_AS_ERROR]'
|
||||
|
||||
'--profiling-format[Output data for profiling CMake scripts]:profiling format:(google-trace)'
|
||||
'--profiling-output[Select an output path for the profiling data]:filename:_files'
|
||||
|
||||
':cmake project:_path_files -/'
|
||||
)
|
||||
|
||||
# ------------------------
|
||||
# _cmake_generator_options
|
||||
#
|
||||
# arguments are $1: build working directory (top level Makefile or build.ninja file)
|
||||
# $2: position of "--" in the command line
|
||||
# ------------------------
|
||||
(( $+functions[_cmake_generator_options] )) ||
|
||||
_cmake_generator_options() {
|
||||
# pass only the part of the command line starting at "--" to the completion
|
||||
shift (( $2 - 1 )) words
|
||||
(( CURRENT = $CURRENT + 1 - $2 ))
|
||||
if [ -f $1/Makefile ]
|
||||
then
|
||||
$_comps[make]
|
||||
elif [ -f $1/build.ninja ]
|
||||
then
|
||||
$_comps[ninja]
|
||||
fi
|
||||
}
|
||||
|
||||
# --------------
|
||||
# _cmake_presets
|
||||
# --------------
|
||||
(( $+functions[_cmake_presets] )) ||
|
||||
_cmake_presets() {
|
||||
local invoke=(${(Q)words})
|
||||
invoke[$CURRENT]=()
|
||||
# TODO: remove all arguments -* except -S
|
||||
|
||||
local list_presets=(${(f)"$(${invoke} --list-presets 2>/dev/null |
|
||||
sed -n -e 's,^[[:space:]]*"\([^"]*\)"[[:space:]]*-[[:space:]]*\(.*\),\1:\2,p' \
|
||||
-e 's,^[[:space:]]*"\([^"]*\)"[[:space:]]*$,\1,p')"})
|
||||
|
||||
_describe 'presets' list_presets
|
||||
}
|
||||
|
||||
# --------------
|
||||
# _cmake_targets
|
||||
# --------------
|
||||
(( $+functions[_cmake_targets] )) ||
|
||||
_cmake_targets() {
|
||||
local dir="$1"
|
||||
local -a targets=()
|
||||
if [[ -f "${dir}/Makefile" && $+commands[make] ]]; then
|
||||
# `make help` doesn't work for Makefiles in general, but for CMake generated Makefiles it does.
|
||||
targets=(${(f)"$(make -f $dir/Makefile help 2>/dev/null | awk '/^\.\.\./ { print $2 }')"})
|
||||
elif [[ -f "${dir}/build.ninja" && $+commands[ninja] ]]; then
|
||||
# `ninja help` doesn't seem to be the list of targets we're interested in
|
||||
targets=(${(f)"$(ninja -C $dir -t targets all 2>/dev/null | awk -F: '{print $1}' )"})
|
||||
fi
|
||||
|
||||
_describe 'build targets' targets
|
||||
}
|
||||
|
||||
_cmake_suggest_builddirs() {
|
||||
_alternative ':current directory:(.)' 'directory::_directories' && return 0
|
||||
}
|
||||
|
||||
_cmake_suggest_installdirs() {
|
||||
_alternative ':current directory:(.)' 'directory::_directories' && return 0
|
||||
}
|
||||
|
||||
_cmake_on_build() {
|
||||
local build_extras=(
|
||||
'--[Native build tool options]'
|
||||
'--target[specify build target]'
|
||||
'--clean-first[build target clean first]'
|
||||
'--config[For multi-configuration tools]'
|
||||
'--parallel[maximum number of build processes]'
|
||||
'--use-stderr'
|
||||
)
|
||||
local -a undescribed_build_extras
|
||||
local i=1
|
||||
for be in $build_extras ; do
|
||||
undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//")
|
||||
(( i++ ))
|
||||
done
|
||||
|
||||
local in_build=false
|
||||
local dash_dash_position=-1
|
||||
local build_at=$CURRENT
|
||||
for ((i = (($CURRENT - 1)); i > 1 ; i--)); do
|
||||
if [[ $words[$i] == --build ]]; then
|
||||
in_build=true
|
||||
build_at=$i
|
||||
(( difference = $CURRENT - $i ))
|
||||
elif [[ $words[$i] == -- ]]; then
|
||||
dash_dash_position=$i
|
||||
fi
|
||||
done
|
||||
|
||||
# check if build mode has been left
|
||||
local out_of_build=false
|
||||
for ((i = (($CURRENT - 1)); i > (($build_at + 1)); i--)); do
|
||||
# don't check the word after --build (should be a directory)
|
||||
if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $words[(($i - 1))] == --target ]]; then continue ; fi
|
||||
if [[ $words[(($i - 1))] == --config ]]; then continue ; fi
|
||||
if [[ $words[(($i - 1))] == --parallel ]] ; then continue ; fi
|
||||
out_of_build=true
|
||||
done
|
||||
|
||||
if (( $dash_dash_position > 0 )) ; then
|
||||
_cmake_generator_options $words[(($build_at + 1))] $dash_dash_position && return 0
|
||||
fi
|
||||
|
||||
if [[ "$in_build" == false || "$difference" -eq 1 ]] ; then
|
||||
# either there is no --build or completing the directory after --build
|
||||
_arguments -s \
|
||||
- build_opts \
|
||||
"$cmake_build_options[@]" \
|
||||
- build_cmds \
|
||||
"$cmake_suggest_build[@]" && return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --target ]] ; then
|
||||
# after --build <dir> --target, suggest targets
|
||||
_cmake_targets $words[(($build_at + 1))] && return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --config ]] ; then
|
||||
# after --build <dir> --config, no idea
|
||||
return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --parallel ]] ; then
|
||||
# after --build <dir> --parallel
|
||||
return 0
|
||||
elif [ "$out_of_build" = true ] ; then
|
||||
# after --build <dir> --<not a --build option>, suggest other cmake_build_options (like -Wno-dev)
|
||||
_arguments "$cmake_build_options[@]" && return 0
|
||||
else
|
||||
# after --build <dir>, suggest other cmake_build_options (like -Wno-dev) or --build options (like --clean-first)
|
||||
_arguments "$build_extras[@]" "$cmake_build_options[@]" && return 0
|
||||
fi
|
||||
}
|
||||
|
||||
_cmake_on_install() {
|
||||
local build_extras=(
|
||||
'--[Native build tool options]'
|
||||
'--prefix[Override the installation prefix, CMAKE_INSTALL_PREFIX]'
|
||||
'--config[For multi-configuration generators(e.g. Visual Studio)]'
|
||||
'--component[Component-based install]'
|
||||
'--strip[Strip before installing.]'
|
||||
)
|
||||
|
||||
local -a undescribed_build_extras
|
||||
local i=1
|
||||
for be in $build_extras ; do
|
||||
undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//")
|
||||
(( i++ ))
|
||||
done
|
||||
|
||||
local in_build=false
|
||||
local dash_dash_position=-1
|
||||
local build_at=$CURRENT
|
||||
for ((i = (($CURRENT - 1)); i > 1 ; i--)); do
|
||||
if [[ $words[$i] == --install ]]; then
|
||||
in_build=true
|
||||
build_at=$i
|
||||
(( difference = $CURRENT - $i ))
|
||||
elif [[ $words[$i] == -- ]]; then
|
||||
dash_dash_position=$i
|
||||
fi
|
||||
done
|
||||
|
||||
local out_of_build=false
|
||||
for ((i = (($CURRENT - 1)); i > (($build_at + 1)); i--)); do
|
||||
# don't check the word after --install (should be a directory)
|
||||
if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi
|
||||
if [[ $words[(($i - 1))] == --prefix ]]; then continue ; fi
|
||||
if [[ $words[(($i - 1))] == --config ]]; then continue ; fi
|
||||
if [[ $words[(($i - 1))] == --component ]]; then continue ; fi
|
||||
out_of_build=true
|
||||
done
|
||||
|
||||
if (( $dash_dash_position > 0 )) ; then
|
||||
_cmake_generator_options $words[(($build_at + 1))] $dash_dash_position && return 0
|
||||
fi
|
||||
|
||||
if [[ "$in_build" == false || "$difference" -eq 1 ]] ; then
|
||||
# either there is no --install or completing the directory after --install
|
||||
_arguments -s \
|
||||
- build_opts \
|
||||
"$cmake_build_options[@]" \
|
||||
- build_cmds \
|
||||
"$cmake_suggest_install[@]" && return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --prefix ]] ; then
|
||||
# after --install <dir> --prefix, no idea
|
||||
return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --config ]] ; then
|
||||
# after --install <dir> --config, no idea
|
||||
return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --component ]] ; then
|
||||
# after --build <dir> --component, no idea
|
||||
return 0
|
||||
elif [ "$out_of_build" = true ] ; then
|
||||
# after --build <dir> --<not a --build option>, suggest other cmake_build_options (like -Wno-dev)
|
||||
_arguments "$cmake_build_options[@]" && return 0
|
||||
else
|
||||
# after --build <dir>, suggest other cmake_build_options (like -Wno-dev) or --build options (like --clean-first)
|
||||
_arguments "$build_extras[@]" "$cmake_build_options[@]" && return 0
|
||||
fi
|
||||
}
|
||||
|
||||
local -a cmake_help_actions=(
|
||||
'(- 1)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]'
|
||||
'(- 1)'{--version,-version}'[Print version number and exit]'
|
||||
'(- 1)--help-full[Print all help manuals and exit]'
|
||||
'(- 1)--help-manual[Print one help manual and exit]:module-name: _cmake_list_names --help-manual-list "manual name"'
|
||||
'(- 1)--help-manual-list[List help manuals available and exit]'
|
||||
'(- 1)--help-command[Print help for one command and exit]:command-name: _cmake_list_names --help-command-list "command name"'
|
||||
'(- 1)--help-command-list[List commands with help available and exit]'
|
||||
'(- 1)--help-commands[Print cmake-commands manual and exit]'
|
||||
'(- 1)--help-module[Print help for one module and exit]:module-name: _cmake_list_names --help-module-list "module name"'
|
||||
'(- 1)--help-module-list[List modules with help available and exit]'
|
||||
'(- 1)--help-modules[Print cmake-modules manual and exit]'
|
||||
'(- 1)--help-policy[Print help for one policy and exit]:policy-name: _cmake_list_names --help-policy-list "policy name"'
|
||||
'(- 1)--help-policy-list[List policies with help available and exit]'
|
||||
'(- 1)--help-policies[Print cmake-policies manual and exit]'
|
||||
'(- 1)--help-property[Print help for one property and exit]:property-name: _cmake_list_names --help-property-list "property name" brakremove'
|
||||
'(- 1)--help-property-list[List properties with help available and exit]'
|
||||
'(- 1)--help-properties[Print cmake-properties manual and exit]'
|
||||
'(- 1)--help-variable[Print help for one variable and exit]:variable-name: _cmake_list_names --help-variable-list "variable name" brakremove'
|
||||
'(- 1)--help-variable-list[List variables with help available and exit]'
|
||||
'(- 1)--help-variables[Print cmake-variables manual and exit]'
|
||||
)
|
||||
|
||||
# -----------------
|
||||
# _cmake_list_names
|
||||
# -----------------
|
||||
(( $+functions[_cmake_list_names] )) ||
|
||||
_cmake_list_names() {
|
||||
local command="$@[1]"
|
||||
local desc="$@[2]"
|
||||
local opts=($@[3])
|
||||
local list_names=(${(f)"$($service $command 2> /dev/null)"})
|
||||
# Older CMake (< 3.0) writes out the version
|
||||
list_names=(${^list_names##cmake version*})
|
||||
|
||||
if [[ ${opts[(i)brakremove]} -le ${#opts} ]]; then
|
||||
list_names=(${^list_names//\[/\\\[})
|
||||
list_names=(${^list_names//\]/\\\]})
|
||||
fi
|
||||
|
||||
_values ${desc} ${list_names[@]:-1} && return 0
|
||||
}
|
||||
|
||||
# ----------------------
|
||||
# _cmake_define_property
|
||||
# ----------------------
|
||||
(( $+functions[_cmake_define_property] )) ||
|
||||
_cmake_define_property() {
|
||||
if compset -P '*='; then
|
||||
_wanted property-values expl 'property value' _cmake_define_property_values ${${IPREFIX%=}#-D} && return 0
|
||||
else
|
||||
_wanted property-names expl 'property name' _cmake_define_property_names -qS= && return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# ----------------------------
|
||||
# _cmake_define_property_names
|
||||
# ----------------------------
|
||||
(( $+functions[_cmake_define_property_names] )) ||
|
||||
_cmake_define_property_names() {
|
||||
local alternatives=(
|
||||
'common-property-names:common property name:_cmake_define_common_property_names -qS='
|
||||
)
|
||||
local -A cmake_langs
|
||||
zstyle -a ":completion:${curcontext}:" languages cmake_langs
|
||||
[[ $#cmake_langs -eq 0 ]] && cmake_langs=('C' 'C' 'CXX' 'C++')
|
||||
|
||||
for cmake_lang in ${(k)cmake_langs}; do
|
||||
cmake_lang_desc="${cmake_langs[$cmake_lang]}"
|
||||
alternatives+=("${cmake_lang//:/-}-property-names:${cmake_lang_desc} language property name:_cmake_define_lang_property_names -qS= ${cmake_lang} ${cmake_lang_desc}")
|
||||
done
|
||||
|
||||
_alternative "${alternatives[@]}"
|
||||
}
|
||||
|
||||
# ---------------------------------
|
||||
# _cmake_define_lang_property_names
|
||||
# ---------------------------------
|
||||
(( $+functions[_cmake_define_lang_property_names] )) ||
|
||||
_cmake_define_lang_property_names() {
|
||||
local cmake_lang="$@[-2]"
|
||||
local cmake_lang_desc="$@[-1]"
|
||||
local -a properties=(
|
||||
"CMAKE_${cmake_lang}_COMPILER:${cmake_lang_desc} compiler"
|
||||
"CMAKE_${cmake_lang}_COMPILER_LAUNCHER:${cmake_lang_desc} compiler launcher (e.g. ccache)"
|
||||
"CMAKE_${cmake_lang}_FLAGS:${cmake_lang_desc} compiler flags for all builds"
|
||||
"CMAKE_${cmake_lang}_FLAGS_DEBUG:${cmake_lang_desc} compiler flags for all Debug build"
|
||||
"CMAKE_${cmake_lang}_FLAGS_RELEASE:${cmake_lang_desc} compiler flags for all Release build"
|
||||
"CMAKE_${cmake_lang}_FLAGS_MINSIZREL:${cmake_lang_desc} compiler flags for all MinSizRel build"
|
||||
"CMAKE_${cmake_lang}_FLAGS_RELWITHDEBINFO:${cmake_lang_desc} compiler flags for all RelWithDebInfo build"
|
||||
"CMAKE_${cmake_lang}_STANDARD:${cmake_lang_desc} language standard"
|
||||
"CMAKE_${cmake_lang}_STANDARD_REQUIRED:${cmake_lang_desc} language standard is required"
|
||||
"CMAKE_${cmake_lang}_EXTENSIONS:${cmake_lang_desc} enable compiler specific extensions"
|
||||
)
|
||||
|
||||
_describe -t "${cmake_lang//:/-}-property-names" "${cmake_lang_desc} property name" properties $@[0,-3] && return 0
|
||||
}
|
||||
|
||||
# -----------------------------------
|
||||
# _cmake_define_common_property_names
|
||||
# -----------------------------------
|
||||
(( $+functions[_cmake_define_common_property_names] )) ||
|
||||
_cmake_define_common_property_names() {
|
||||
local -a properties=(
|
||||
'CMAKE_MODULE_PATH:Search path for CMake modules (FindPROJECT.cmake)'
|
||||
'CMAKE_PREFIX_PATH:Search path for installations (PROJECTConfig.cmake)'
|
||||
'CMAKE_BUILD_TYPE:Specifies the build type for make based generators'
|
||||
'BUILD_SHARED_LIBS:Global flag to cause add_library() to create shared libraries if on'
|
||||
'CMAKE_TOOLCHAIN_FILE:Absolute or relative path to a CMake script which sets up toolchain related variables'
|
||||
'CMAKE_COLOR_MAKEFILE:Enables/disables color output when using the Makefile generator'
|
||||
'CMAKE_INSTALL_PREFIX:Install directory used by install'
|
||||
'CMAKE_EXPORT_COMPILE_COMMANDS:Enable/disable output of compilation database during generation'
|
||||
'CMAKE_RULE_MESSAGES:Specify whether to report a message for each make rule'
|
||||
'CMAKE_VERBOSE_MAKEFILE:Enable verbose output from Makefile builds'
|
||||
'CMAKE_UNITY_BUILD:Batch include source files'
|
||||
)
|
||||
|
||||
_describe -t 'common-property-names' 'common property name' properties "$@"
|
||||
}
|
||||
|
||||
# ----------------------------
|
||||
# _cmake_define_property_values
|
||||
# ----------------------------
|
||||
(( $+functions[_cmake_define_property_values] )) ||
|
||||
_cmake_define_property_values() {
|
||||
local ret=1
|
||||
local build_types=('Debug' 'Release' 'RelWithDebInfo' 'MinSizeRel')
|
||||
local c_standards=(90 99 11 17 23)
|
||||
local cxx_standards=(98 11 14 17 20 23)
|
||||
|
||||
setopt localoptions extendedglob
|
||||
case $@[-1] in
|
||||
(CMAKE_BUILD_TYPE)
|
||||
_wanted build-types expl 'build type' _values 'build type' ${build_types[@]} && ret=0
|
||||
;;
|
||||
(BUILD_SHARED_LIBS)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(CMAKE_CXX_STANDARD)
|
||||
_wanted cxx-standards expl 'cxx standard' _values 'cxx standard' ${cxx_standards[@]} && ret=0
|
||||
;;
|
||||
(CMAKE_C_STANDARD)
|
||||
_wanted c-standards expl 'c standard' _values 'c standard' ${c_standards[@]} && ret=0
|
||||
;;
|
||||
(CMAKE_TOOLCHAIN_FILE)
|
||||
_wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0
|
||||
;;
|
||||
(CMAKE_COLOR_MAKEFILE)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(CMAKE_RULE_MESSAGES)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(CMAKE_VERBOSE_MAKEFILE)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(CMAKE_UNITY_BUILD)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(CMAKE_INSTALL_PREFIX)
|
||||
_files -/ && ret=0
|
||||
;;
|
||||
(CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(CMAKE_*_COMPILER)
|
||||
_wanted compilers expl 'compiler' _cmake_compilers && ret=0
|
||||
;;
|
||||
(CMAKE_*_COMPILER_LAUNCHER)
|
||||
_wanted compilers expl 'compiler launcher' _cmake_launchers && ret=0
|
||||
;;
|
||||
(CMAKE_*_FLAGS(|_?*))
|
||||
_message -e compiler-flags 'compiler flags' && _dispatch $service -value-,CPPFLAGS,-default- && ret=0
|
||||
;;
|
||||
(CMAKE_*_STANDARD_REQUIRED)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(CMAKE_*_EXTENSIONS)
|
||||
_wanted booleans expl 'boolean' _cmake_booleans && ret=0
|
||||
;;
|
||||
(*)
|
||||
_files && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
# -----------------
|
||||
# _cmake_generators
|
||||
# -----------------
|
||||
(( $+functions[_cmake_generators] )) ||
|
||||
_cmake_generators() {
|
||||
local -a generators=(
|
||||
${(f)"$(cmake --help | awk '/^Generators/{flag=1} flag && /^[* ] [^ ]/ {sub(/^[* ] /, ""); sub(/=.*$/, ""); sub(/\[arch\]/, ""); sub(/ *$/, ""); print}')"}
|
||||
)
|
||||
|
||||
_describe -t generators 'generator' generators
|
||||
}
|
||||
|
||||
# ----------------------
|
||||
# _cmake_toolchain_files
|
||||
# ----------------------
|
||||
(( $+functions[_cmake_toolchain_files] )) ||
|
||||
_cmake_toolchain_files() {
|
||||
_files -g '*\.cmake*'
|
||||
}
|
||||
|
||||
(( $+functions[_cmake_booleans] )) ||
|
||||
_cmake_booleans() {
|
||||
_values booleans 'YES' 'NO'
|
||||
}
|
||||
|
||||
# ---------------
|
||||
# _cmake_compilers
|
||||
#
|
||||
# by default just executable commands, but can be overridden by users.
|
||||
# ---------------
|
||||
(( $+functions[_cmake_compilers] )) ||
|
||||
_cmake_compilers() {
|
||||
_command_names -e
|
||||
}
|
||||
|
||||
# ---------------
|
||||
# _cmake_launchers
|
||||
#
|
||||
# by default just executable commands, but can be overridden by users.
|
||||
# useful commands might be ccache, distcc, ...
|
||||
# ---------------
|
||||
(( $+functions[_cmake_launchers] )) ||
|
||||
_cmake_launchers() {
|
||||
_command_names -e
|
||||
}
|
||||
|
||||
(( $+functions[_cmake_commands] )) ||
|
||||
_cmake_commands() {
|
||||
local -a commands=(
|
||||
'capabilities:Report capabilities built into cmake in JSON format'
|
||||
'cat:concat the files and print them to the standard output'
|
||||
'chdir:run command in a given directory'
|
||||
'compare_files:check if file1 is same as file2'
|
||||
'copy:copy files to destination (either file or directory)'
|
||||
'copy_directory:copy content of <dir>... directories to destination directory'
|
||||
'copy_if_different:copy files if it has changed'
|
||||
'echo:displays arguments as text'
|
||||
'echo_append:displays arguments as text but no new line'
|
||||
'env:run command in a modified environment'
|
||||
'environment:display the current environment'
|
||||
'make_directory:create parent and <dir> directories'
|
||||
'md5sum:create MD5 checksum of files'
|
||||
'sha1sum:create SHA1 checksum of files'
|
||||
'sha224sum:create SHA224 checksum of files'
|
||||
'sha256sum:create SHA256 checksum of files'
|
||||
'sha384sum:create SHA384 checksum of files'
|
||||
'sha512sum:create SHA512 checksum of files'
|
||||
'remove:remove the file(s), use -f to force it'
|
||||
'remove_directory:remove directories and their contents'
|
||||
'rename:rename a file or directory (on one volume)'
|
||||
'rm:remove files or directories'
|
||||
'server:start cmake in server mode'
|
||||
'sleep:sleep for given number of seconds'
|
||||
'tar:create or extract a tar or zip archive'
|
||||
'time:run command and display elapsed time'
|
||||
'touch:touch a <file>'
|
||||
'touch_nocreate:touch a <file> but do not create it'
|
||||
'create_symlink:create a symbolic link new -> old'
|
||||
'create_hardlink:create a hard link new -> old'
|
||||
'true:do nothing with an exit code of 0'
|
||||
'false:do nothing with an exit code of 1'
|
||||
)
|
||||
|
||||
_describe -t commands 'command' commands
|
||||
}
|
||||
|
||||
local -a cmake_suggest_build=(
|
||||
'--build[build]:build dir:_cmake_suggest_builddirs'
|
||||
)
|
||||
|
||||
local -a cmake_suggest_install=(
|
||||
'--install[install]:install dir:_cmake_suggest_installdirs'
|
||||
)
|
||||
|
||||
if [[ "$service" = -value-*CMAKE_GENERATOR* ]]; then
|
||||
_cmake_generators
|
||||
elif [ $CURRENT -eq 2 ] ; then
|
||||
_arguments -s \
|
||||
- help \
|
||||
"$cmake_help_actions[@]" \
|
||||
- command \
|
||||
'-E[CMake command mode]:command:_cmake_commands' \
|
||||
- build_opts \
|
||||
"$cmake_build_options[@]" \
|
||||
- build_cmds \
|
||||
"$cmake_suggest_build[@]" \
|
||||
- install_cmds \
|
||||
"$cmake_suggest_install[@]" && return 0
|
||||
elif [[ $words[2] == --build ]] ; then
|
||||
_cmake_on_build
|
||||
elif [[ $words[2] == --install ]] ; then
|
||||
_cmake_on_install
|
||||
elif [[ $words[2] == --help-* ]] ; then
|
||||
_arguments "$cmake_help_actions[@]"
|
||||
else
|
||||
_arguments "$cmake_build_options[@]"
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
#compdef coffee
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Coffee.js v2.7.0 (https://coffeescript.org/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Mario Fernandez (https://github.com/sirech)
|
||||
# * Dong Weiming (https://github.com/dongweiming)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -s -S \
|
||||
'--ast[generate an abstract syntax tree of nodes]' \
|
||||
'(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \
|
||||
'(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
|
||||
'(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
|
||||
'(- *)'{-h,--help}'[display help message]' \
|
||||
'(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
|
||||
'(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]: :_files -g "*.coffee"' \
|
||||
'(-l --literate)'{-l,--literate}'[treat stdio as literate style coffeescript]' \
|
||||
'(-m --map)'{-m,--map}'[generate source map and save as .js.map files]' \
|
||||
'(-M --inline-map)'{-M,--inline-map}'[generate source map and include it directly in output]' \
|
||||
'(-n --nodes)'{-n,--nodes}'[print out the parse tree that the parser produces]' \
|
||||
'--nodejs[pass options directly to the "node" binary]' \
|
||||
'(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]: :_files' \
|
||||
'(-p --print --tokens)'{-p,--print}'[print out the compiled JavaScript]' \
|
||||
'(-r --require)'\*{-r,--require}'[require the given module before eval or REPL]:module' \
|
||||
'(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \
|
||||
'(-t --transpile)'{-t,--transpile}'[pipe generated JavaScript through Babel]' \
|
||||
'(-p --print --tokens)--tokens[print out the tokens that the lexer/rewriter produce]' \
|
||||
'(- *)'{-v,--version}'[display the version number]' \
|
||||
'(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \
|
||||
'*:script or directory:_files' && ret=0
|
||||
|
||||
return ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,768 @@
|
|||
#compdef conan
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2010-2017 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for conan 2.0.0 (https://conan.io).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
# * Shohei Yoshida <https://github.com/syohex>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_conan_common_options=(
|
||||
'(- *)'{-h,--help}'[show help message and exit]'
|
||||
'-v[verbose output]'
|
||||
'-vquiet[verbose level quiet]'
|
||||
'-verror[verbose level error]'
|
||||
'-vwarning[verbose level warning]'
|
||||
'-vnotice[verbose level notice]'
|
||||
'-vstatus[verbose level status]'
|
||||
'-vverbose[verbose level verbose]'
|
||||
'-vv[more verbose output]'
|
||||
'-vdebug[verbose level debug]'
|
||||
'-vvv[more and more verbose output]'
|
||||
'-vtrace[verbose level trace]'
|
||||
'--logger[show the output with log format, with time, type and message]'
|
||||
)
|
||||
|
||||
_conan_package_options=(
|
||||
'--name[Provide a package name if not specified in conanfile]:name'
|
||||
'--version[Provide a package version if not specified in conanfile]:version'
|
||||
'--user[Provide a user]:user'
|
||||
'--channel[Provide a channel]:channel'
|
||||
'--requires[directly provide requires instead of a conan file]:requires'
|
||||
'--tool-requires[directly provide tool-requires instead of a conanfile]:tool_requires'
|
||||
)
|
||||
|
||||
_conan_define_options=(
|
||||
\*{-o,--options,'-o\:h','--options\:host'}'[define options of host machine]:option'
|
||||
\*{'-o\:b','--options\:build'}'[define options of build machine]:option'
|
||||
)
|
||||
|
||||
_conan_profile_options=(
|
||||
'(-pr --profile -pr\:h --profile\:host)'{-pr,--profile,-pr:h,--profile:host}'[apply the specified profile to the host machine]: :_conan_profiles'
|
||||
'(-pr\:b --profile\:build)'{-pr:b,--profile:build}'[apply the specified profile to the build machine]: :_conan_profiles'
|
||||
)
|
||||
|
||||
_conan_setting_options=(
|
||||
\*{-s,--settings,'-s\:h','--settings\:host'}'[overwrite the defaults of host machine to build]:setting'
|
||||
\*{'-s\:b','--settings\:build'}'[overwrite the defaults of build machine to build]:setting'
|
||||
)
|
||||
|
||||
_conan_configuration_options=(
|
||||
\*{-c,--conf,'-c\:h','--conf\:host'}'[overwrite the defaults of host machine to configure]:config'
|
||||
\*{'-c\:b','--conf\:build'}'[overwrite the defaults of build machine to configure]:config'
|
||||
)
|
||||
|
||||
_conan_lockfile_options=(
|
||||
'(-l --lockfile)'{-l,--lockfile}'[path to a lockfile]: :_files'
|
||||
'--lockfile-partial[do not raise an error if some dependency is not found in lockfile]'
|
||||
'--lockfile-out[filename of the updated lockfile]: :_files'
|
||||
'--lockfile-packages[lock package-id and package-revision information]'
|
||||
'--lockfile-clean[remove unused entries from the lockfile]'
|
||||
)
|
||||
|
||||
_conan_remote_options=(
|
||||
'(-r --remote -nr --no-remote)'{-r,--remote}'[look in the specified remote server]:remote'
|
||||
'(-r --remote -nr --no-remote)'{-nr,--no-remote}'[do not use remote, resolve exclusively in the cache]'
|
||||
)
|
||||
|
||||
_conan() {
|
||||
local context state state_descr line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'(- : *)'{-v,--version}'[display version information]' \
|
||||
'(-h --help)1: :_conan_commands' \
|
||||
'(-h --help)*:: :->command_args'
|
||||
|
||||
case $state in
|
||||
command_args)
|
||||
(( $+functions[_conan_${words[1]}] )) && _conan_${words[1]}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_conan_commands] )) ||
|
||||
_conan_commands() {
|
||||
local -a commands=(
|
||||
# consumer commands
|
||||
'cache:perform file operations in the local cache'
|
||||
'config:manages conan configuration information'
|
||||
'graph:obtain information about the dependency graph without fetching binaries'
|
||||
'inspect:inspect a conanfile.py to return its public fields'
|
||||
'install:installs the requirements specified in a "conanfile.py" or "conanfile.txt"'
|
||||
'list:list recipes, revisions or packages in the cache or the remotes'
|
||||
'lock:create or manage lockfiles'
|
||||
'profile:manage profiles'
|
||||
'remote:manage the remote list and the users authenticated on them'
|
||||
'remove:remove recipes or packages from local cache or a remote'
|
||||
'search:search for package recipes in all the remotes or a remote'
|
||||
|
||||
# create commands
|
||||
'build:install dependencies and call the build() method'
|
||||
'create:create a package'
|
||||
'download:download(without installing) a single conan package from a remote server'
|
||||
'editable:allow working with a package that resides in user folder'
|
||||
'export:export a recipe to the Conan package cache'
|
||||
'export-pkg:create a package directly from pre-compiled binaries'
|
||||
'new:create a new example recipe and source files from a template'
|
||||
'source:call the source() method'
|
||||
'test:test a package from a test_package folder'
|
||||
'upload:upload packages to a remote'
|
||||
)
|
||||
|
||||
_describe -t 'subcommands' 'subcommands' commands
|
||||
}
|
||||
|
||||
(( $+functions[_conan_cache] )) ||
|
||||
_conan_cache() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[show help message and exit]' \
|
||||
'1: :(clean path)' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
local -a opts=($_conan_common_options[@])
|
||||
case $words[1] in
|
||||
(clean)
|
||||
opts+=(
|
||||
'(-s --source)'{-s,--source}'[clean source folders]'
|
||||
'(-b --build)'{-b,--build}'[clean build folders]'
|
||||
'(-d --download)'{-d,--download}'[clean download folders]'
|
||||
\*{-p,--package-query}'[remove only the packages matching a specific query]:query'
|
||||
'1:pattern'
|
||||
)
|
||||
;;
|
||||
(path)
|
||||
opts+=(
|
||||
'--folder[path to show]::type:(export_source source build)' \
|
||||
'1:recipe_or_package_reference:_files'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]"
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_conan_config] )) ||
|
||||
_conan_config() {
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'1: :_conan_config_commands' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
local -a opts=($_conan_common_options[@])
|
||||
case $words[1] in
|
||||
(install)
|
||||
opts+=(
|
||||
'--verify-ssl[Verify SSL connection when downloading file]: :(True False)'
|
||||
'(-t --type)'{-t,--type}'[Type of remote config]: :(git dir file url)'
|
||||
\*{-a,--args}'[String with extra arguments for "git clone"]:arg'
|
||||
\*{-sf,--source-folder}'[Install files only from a source subfolder from specified origin]: :_files -/'
|
||||
'(-tf --target-folder)'{-tf,--target-folder}'[Install to that path in the conan cache]: :_files -/'
|
||||
)
|
||||
;;
|
||||
(list)
|
||||
opts+=(
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_conan_config_commands] )) ||
|
||||
_conan_config_commands() {
|
||||
local -a commands=(
|
||||
'home:show the Conan home folder'
|
||||
'install:install the configuration into the Conan home folder'
|
||||
'list:show all the Conan available configurations:'
|
||||
)
|
||||
_describe -t 'commands' "command" commands
|
||||
}
|
||||
|
||||
(( $+functions[_conan_graph] )) ||
|
||||
_conan_graph() {
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'1: :_conan_graph_commands' \
|
||||
'*:: :->args'
|
||||
|
||||
local -a common_opts=(
|
||||
$_conan_package_options[@]
|
||||
\*{-b,--build}'[optional, specify which packages to build from source]:build'
|
||||
$_conan_remote_options[@]
|
||||
'(-u --update)'{-u,--update}'[will check the remote and in case a newer version]'
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
)
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
local -a opts=($_conan_common_options[@])
|
||||
case $words[1] in
|
||||
(build-order)
|
||||
opts+=(
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||
$common_opts[@]
|
||||
)
|
||||
;;
|
||||
(build-order-merge)
|
||||
opts+=(
|
||||
'--file[files to be merged]:file:_files'
|
||||
)
|
||||
;;
|
||||
(info)
|
||||
opts+=(
|
||||
$common_opts[@]
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(html json dot)'
|
||||
'--check-updates[check if there are recipe updates]'
|
||||
'*--filter[show only the specified fields]:filter'
|
||||
'*--package-filter[print information only for packages that match the patterns]:package_filter'
|
||||
'--deploy[deploy using the provided deployer to the output folder]:deployer'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_conan_graph_commands] )) ||
|
||||
_conan_graph_commands() {
|
||||
local -a commands=(
|
||||
'build-order:compute the build order of a dependency graph'
|
||||
'build-order-merge:merge more than 1 build-order file'
|
||||
'info:compute the dependency graph and shows information about it'
|
||||
)
|
||||
_describe -t 'commands' "command" commands
|
||||
}
|
||||
|
||||
(( $+functions[_conan_inspect] )) ||
|
||||
_conan_inspect() {
|
||||
_arguments \
|
||||
"$_conan_common_options[@]" \
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)' \
|
||||
'*:recipe_folder:_files -/'
|
||||
}
|
||||
|
||||
(( $+functions[_conan_install] )) ||
|
||||
_conan_install() {
|
||||
local -a generators=(
|
||||
cmake cmake_multi cmake_paths cmake_find_package cmake_find_package_multi
|
||||
msbuild visual_studio visual_studio_multi visual_studio_legacy xcode compiler_args gcc
|
||||
boost-build b2 qbs qmake scons pkg_config virtualenv virtualenv_python virtualbuildenv
|
||||
virtualrunenv youcompleteme txt json premake make markdown deploy
|
||||
)
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||
\*{-b,--build}'[optional, specify which packages to build from source]:build'
|
||||
$_conan_remote_options[@]
|
||||
'(-u --update)'{-u,--update}'[will check the remote and in case a newer version]'
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
'(-g --generator)'{-g,--generator}"[generators to use]:generator:($generators)"
|
||||
'(-of --output)'{-of,--output-folder}'[the root output folder for generated and build files]:dir:_files -/'
|
||||
'--deploy[deploy using the provided deployer to the output folder]:deployer'
|
||||
'1:recipe_dir_or_conanfile:_files'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_list] )) ||
|
||||
_conan_list() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json html)'
|
||||
\*{-p,--package-query}'[remove only the packages matching a specific query]:query'
|
||||
'(-r --remote)'{-r,--remote}'[remote names]:remote'
|
||||
'(-c --cache)'{-c,--cache}'[search in the local cache]'
|
||||
'1:recipe_or_package_reference:_files'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_lock] )) ||
|
||||
_conan_lock() {
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'1: :_conan_lock_commands' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
local -a opts=($_conan_common_options)
|
||||
case $words[1] in
|
||||
(add)
|
||||
opts+=(
|
||||
'*--requires[add references to lockfile]:requires'
|
||||
'*--build-requires[add build-requires to lockfile]:build_requires'
|
||||
'*--python-requires[add python-requires to lockfile]'
|
||||
'--lockfile-out[file name of the created lockfile]:filename:_files'
|
||||
'--lockfile[file name of the input lockfile]:filename:_files'
|
||||
)
|
||||
;;
|
||||
(create)
|
||||
opts+=(
|
||||
\*{-b,--build}'[optional, specify which packages to build from source]:build'
|
||||
$_conan_remote_options[@]
|
||||
'(-u --update)'{-u,--update}'[will check the remote and in case a newer version]'
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
'1: :_files'
|
||||
)
|
||||
;;
|
||||
(merge)
|
||||
opts+=(
|
||||
'--lockfile-out[file name of the created lockfile]:filename:_files'
|
||||
'--lockfile[file name of the input lockfile]:filename:_files'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_conan_lock_commands] )) ||
|
||||
_conan_lock_commands() {
|
||||
local -a commands=(
|
||||
'add:add requires, build-requires or python requires to an existing or new lockfile'
|
||||
'create:create a lockfile from a conanfile or a reference'
|
||||
'merge:merge 2 or more lockfiles'
|
||||
)
|
||||
_describe -t 'commands' "command" commands
|
||||
}
|
||||
|
||||
(( $+functions[_conan_profile] )) ||
|
||||
_conan_profile() {
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'1: :_conan_profile_commands' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
local opts=($_conan_common_options[@])
|
||||
case $words[1] in
|
||||
(detect)
|
||||
opts+=(
|
||||
'--name[profile name, "default" if not specified]::name'
|
||||
'(-f --force)'{-f,--force}'[overwrite if exists]'
|
||||
)
|
||||
;;
|
||||
(list)
|
||||
opts+=(
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||
)
|
||||
;;
|
||||
(path|show)
|
||||
opts+=(
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_conan_profile_commands] )) ||
|
||||
_conan_profile_commands() {
|
||||
local -a commands=(
|
||||
'detect:generate a profile using auto-detected values'
|
||||
'list:list all profiles in the cache'
|
||||
'path:show profile path location'
|
||||
'show:show aggregated profiles from the passed arguments'
|
||||
)
|
||||
_describe -t 'commands' "command" commands
|
||||
}
|
||||
|
||||
(( $+functions[_conan_remote] )) ||
|
||||
_conan_remote() {
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'1: :_conan_remote_commands' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
local -a opts=($_conan_common_options[@])
|
||||
case $words[1] in
|
||||
(add)
|
||||
opts+=(
|
||||
'--insecure[allow insecure server connections when using SSL]'
|
||||
'--index[insert the remote at a specific position in the remote list]:index'
|
||||
'(-f --force)'{-f,--force}'[force the definition of the remote even if duplicated]'
|
||||
'1:name'
|
||||
'2:url'
|
||||
)
|
||||
;;
|
||||
(auth)
|
||||
opts+=(
|
||||
'--with-user[only try to auth in those remotes that already have a user name]'
|
||||
'1:remote:_conan_remotes'
|
||||
)
|
||||
;;
|
||||
(list|list-users)
|
||||
opts+=('(-f --format)'{-f,--format}'[select the output format]:format:(json)')
|
||||
;;
|
||||
(login)
|
||||
opts+=(
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||
'(-p --password)'{-p,--password}'[user password]:password'
|
||||
'1:remote:_conan_remotes'
|
||||
'2:username:'
|
||||
)
|
||||
;;
|
||||
(logout)
|
||||
opts+=(
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||
'1:remote:_conan_remotes'
|
||||
)
|
||||
;;
|
||||
(remove)
|
||||
opts+=('1:remote:_conan_remotes')
|
||||
;;
|
||||
(rename)
|
||||
opts+=(
|
||||
'1:remote:_conan_remotes'
|
||||
'2:new_name'
|
||||
)
|
||||
;;
|
||||
(set-user)
|
||||
opts+=(
|
||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||
'1:remote:_conan_remotes'
|
||||
'2:user_name'
|
||||
)
|
||||
;;
|
||||
(update)
|
||||
opts+=(
|
||||
'--url[new url for the remote]'
|
||||
'--secure[do not allow insecure server connections when using SSL]'
|
||||
'--insecure[allow insecure server connections when using SSL]'
|
||||
'--index[insert the remote at a specific position in the remote list]:index'
|
||||
'1:remote:_conan_remotes'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "${opts[@]}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_conan_remote_commands] )) ||
|
||||
_conan_remote_commands() {
|
||||
local -a commands=(
|
||||
'add:add a remote'
|
||||
'auth:authenticate in the defined remotes'
|
||||
'disable:disable all the remotes matching a pattern'
|
||||
'enable:enable all the remotes matching a pattern'
|
||||
'list:list current remotes'
|
||||
'list-users:list the users logged into all the remotes'
|
||||
'login:login into the specified remotes matching a pattern'
|
||||
'logout:clear the existing credentials for the specified remotes matching a pattern'
|
||||
'remove:remove a remote'
|
||||
'rename:rename a remote'
|
||||
'set-user:associate a username with a remote matching pattern without performing the authentication'
|
||||
'update:update a remote'
|
||||
)
|
||||
_describe -t 'commands' "command" commands
|
||||
}
|
||||
|
||||
(( $+functions[_conan_remove] )) ||
|
||||
_conan_remove() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
'(-c --confirm)'{-c,--confirm}'[remove without requesting a confirmation]'
|
||||
\*{-p,--package-query}'[remove only the packages matching a specific query]:query'
|
||||
\*{-r,--remote}'[will remove from the specified remote]:remote'
|
||||
'*:recipe_or_package_reference:_files'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_search] )) ||
|
||||
_conan_search() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
\*{-r,--remote}'[will remove from the specified remote]:remote'
|
||||
'*:recipe_reference:_files'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_build] )) ||
|
||||
_conan_build() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
$_conan_package_options[@]
|
||||
\*{-b,--build}'[optional, specify which packages to build from source]:build'
|
||||
$_conan_remote_options[@]
|
||||
'(-u --update)'{-u,--update}'[will check the remote and in case a newer version]'
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
'*: :_files'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_create] )) ||
|
||||
_conan_create() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
$_conan_package_options[@]
|
||||
\*{-b,--build}'[optional, specify which packages to build from source]:build'
|
||||
$_conan_remote_options[@]
|
||||
'(-u --update)'{-u,--update}'[will check the remote and in case a newer version]'
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
'--build-require[whether the provided reference is a build-require]'
|
||||
'(-tf --test-folder)'{-tf,--test-folder}'[alternative test folder name]:folder:_files -/'
|
||||
'*: :_files -/'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_download] )) ||
|
||||
_conan_download() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
'--only-recipe[download only the recipe, not the binary packages]'
|
||||
\*{-p,--package-query}'[only download packages matching a specific query]:query'
|
||||
'(-r --remote)'{-r,--remote}'[download from the specific remote]:remote:_conan_remotes'
|
||||
'*:recipe_or_package_reference:_files'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_editable] )) ||
|
||||
_conan_editable() {
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'1: :_conan_editable_commands' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
local opts=($_conan_common_options[@])
|
||||
case $words[1] in
|
||||
(add)
|
||||
opts+=(
|
||||
$_conan_package_options[@]
|
||||
'(-of --output-folder)'{-of,--output-folder}'[the root output folder]:folder:_files -/'
|
||||
)
|
||||
;;
|
||||
(list)
|
||||
opts+=('(-f --format)'{-f,--format}'[select the output format]:format:(json)')
|
||||
;;
|
||||
(remove)
|
||||
opts+=('(-r --refs)'{-r,--refs}'[directly provide reference patterns]:refs')
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_conan_editable_commands] )) ||
|
||||
_conan_editable_commands() {
|
||||
local -a commands=(
|
||||
'add:define the given path location as the package reference'
|
||||
'list:list all the packages in editable mode'
|
||||
'remove:remove the editable mode for this reference'
|
||||
)
|
||||
_describe -t 'commands' "command" commands
|
||||
}
|
||||
|
||||
(( $+functions[_conan_export] )) ||
|
||||
_conan_export() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
$_conan_package_options[@]
|
||||
$_conan_remote_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
'--build-require[whether the provided reference is a build-require]'
|
||||
'*: :_files -/'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_export-pkg] )) ||
|
||||
_conan_export-pkg() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
$_conan_package_options[@]
|
||||
$_conan_remote_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
'*: :_files -/'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_new] )) ||
|
||||
_conan_new() {
|
||||
local -a templates=(
|
||||
basic cmake_lib cmake_exe meson_lib meson_exe msbuild_lib msbuild_exe
|
||||
bezel_lib bezel_exe autotools_lib autotools_exe
|
||||
)
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
\*{-d,--define}'[define a template argument as key=value]:key_value'
|
||||
'(-f --force)'{-f,--force}'[overwrite file if it already exists]'
|
||||
"1:template:($templates)"
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_source] )) ||
|
||||
_conan_source() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
$_conan_package_options[@]
|
||||
'1: :_files'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_test] )) ||
|
||||
_conan_test() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
$_conan_package_options[@]
|
||||
\*{-b,--build}'[optional, specify which packages to build from source]:build'
|
||||
$_conan_remote_options[@]
|
||||
'(-u --update)'{-u,--update}'[will check the remote and in case a newer version]'
|
||||
$_conan_define_options[@]
|
||||
$_conan_profile_options[@]
|
||||
$_conan_setting_options[@]
|
||||
$_conan_configuration_options[@]
|
||||
$_conan_lockfile_options[@]
|
||||
'1:path:_files -/'
|
||||
'2:reference'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_upload] )) ||
|
||||
_conan_upload() {
|
||||
local -a opts=(
|
||||
$_conan_common_options[@]
|
||||
\*{-p,--package-query}'[only upload packages matching a specific query]:query'
|
||||
'(-r --remote)'{-r,--remote}'[upload to this specific remote]:remote:_conan_remotes'
|
||||
'--only-recipe[upload only the recipe, not the binary packages]'
|
||||
'--force[force the upload of the artifacts]'
|
||||
'--check[perform an integrity check before upload]'
|
||||
'(-c --confirm)'{-c,--confirm}'[upload all matching recipes without confirmation]'
|
||||
'1::reference'
|
||||
)
|
||||
|
||||
_arguments "$opts[@]"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_remotes] )) ||
|
||||
_conan_remotes() {
|
||||
local -a remotes=(${(f)"$(_call_program remotes $service remote list)"})
|
||||
_describe -t remotes 'remote' remotes "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_conan_profiles] )) ||
|
||||
_conan_profiles() {
|
||||
local -a profiles=(${(f)"$(_call_program profiles $service profile list 2>/dev/null)"})
|
||||
_describe -t profiles 'profile' profiles "$@"
|
||||
}
|
||||
|
||||
_conan "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,876 @@
|
|||
#compdef concourse
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for concourse 5.2.0 (https://concourse-ci.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <https://github.com/nicoulaj>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
(( $+functions[_concourse_server] )) ||
|
||||
_concourse_server() {
|
||||
local context state state_descr line ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
local -a concourse_postgres_configurations=(
|
||||
'--postgres-host=[the host to connect to]: :_hosts'
|
||||
'--postgres-port=[the port to connect to]: :_concourse_ports'
|
||||
'--postgres-socket=[path to a UNIX domain socket to connect to]: :_files'
|
||||
'--postgres-user=[the user to sign in as]: :_users'
|
||||
"--postgres-password=[the user's password]:password"
|
||||
'--postgres-sslmode=[whether or not to use SSL(default: disable)]:SSL mode:(disable require verify-ca verify-full)'
|
||||
'--postgres-sslnegotiation=[how SSL encryption is negotiated with the server(default: postgres)]: :(postgres direct)'
|
||||
'--postgres-ca-cert=[CA cert file location, to verify when connecting with SSL]: :_files'
|
||||
'--postgres-client-cert=[client cert file location]: :_files'
|
||||
'--postgres-client-key=[client key file location]: :_files'
|
||||
'--postgres-connect-timeout=[dialing timeout]: :_concourse_durations'
|
||||
'--postgres-database=[the name of the database to use(default: atc)]:database name'
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'(- : *)'{-v,--version}'[print the version of Concourse and exit]' \
|
||||
'(-): :->command' \
|
||||
'(-)*:: :->arguments' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_concourse_commands && ret=0
|
||||
;;
|
||||
(arguments)
|
||||
curcontext=${curcontext%:*:*}:concourse-$words[1]:
|
||||
|
||||
if [[ $words[1] == "quickstart" || $words[1] == "web" ]]; then
|
||||
_concourse_quickstart_or_web "${words[1]}" && ret=0
|
||||
else
|
||||
if (( $+functions[_concourse_${words[1]}] )); then
|
||||
_concourse_${words[1]} && ret=0
|
||||
else
|
||||
_message "unknown command ${words[1]}" && ret=1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_commands] )) ||
|
||||
_concourse_commands() {
|
||||
local commands=(
|
||||
"generate-key:generate RSA key for use with Concourse components"
|
||||
"land-worker:safely drain a worker's assignments for temporary downtime"
|
||||
"migrate:run database migrations"
|
||||
"quickstart:run both 'web' and 'worker' together, auto-wired"
|
||||
"retire-worker:safely remove a worker from the cluster permanently"
|
||||
"web:run the web UI and build scheduler"
|
||||
"worker:run and register a worker"
|
||||
)
|
||||
_describe -t commands commands commands
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_quickstart_or_web] )) ||
|
||||
_concourse_quickstart_or_web() {
|
||||
local command="$1"
|
||||
local ret=1
|
||||
|
||||
# define common variables
|
||||
|
||||
local -a concourse_web_configurations=(
|
||||
'--peer-address=[network address of this web node, reachable by other web nodes]: :_concourse_host_colon_ports'
|
||||
'--log-level=[minimum level of logs to see]:level:_concourse_log_levels'
|
||||
'--bind-ip=[IP address on which to listen for web traffic]: :_concourse_ip_addresses'
|
||||
'--bind-port=[port on which to listen for HTTP traffic(default: 8000)]: :_concourse_ports'
|
||||
'--tls-bind-port=[port on which to listen for HTTPS traffic]: :_concourse_ports'
|
||||
'--tls-cert=[file containing an SSL certificate]: :_files'
|
||||
'--tls-key=[file containing an RSA private key, used to encrypt HTTPS traffic]: :_files'
|
||||
'--tls-ca-cert=[file containing the client CA certificate, enables mTLS]: :_files'
|
||||
'--external-url=[URL used to reach any ATC from the outside world]: :_urls'
|
||||
'--concurrent-request-limit=[limit the number of concurrent requests to an API endpoint]:limit'
|
||||
'--api-max-conns=[maximum number of open connections for the api connection pool(default: 10)]:limit'
|
||||
'--backend-max-conns=[maximum number of open connections for the backend connection pool(default: 50)]:limit'
|
||||
'--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key'
|
||||
'--old-encryption-key=[encryption key previously used for encrypting sensitive information]:encryption key'
|
||||
'--debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses'
|
||||
'--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports'
|
||||
'--intercept-idle-timeout=[length of time for a intercepted session to be idle before terminating]: :_concourse_durations'
|
||||
'--component-runner-interval=[interval on which runners are kicked off for builds, locks, scans and checks]:interval:_concourse_durations'
|
||||
'--lidar-scanner-interval=[interval on which the resource scanner will run to see if new checks need to be scheduled]:interval:_concourse_durations'
|
||||
'--global-resource-check-timeout=[time limit on checking for new versions of resources]: :_concourse_durations'
|
||||
'--resource-checking-interval=[interval on which to check for new versions of resources]: :_concourse_durations'
|
||||
'--resource-type-checking-interval=[interval on which to check for new versions of resource types]: :_concourse_durations'
|
||||
'--resource-with-webhook-checking-interval=[interval on which to check for new versions of resources that has webhook defined]:interval:_concourse_durations'
|
||||
'--max-checks-per-second=[maximum number of checks that can be started per second]:number'
|
||||
'--pause-pipelines-after=[number of days after which a pipeline will be automatically paused when there are no jobs]:days'
|
||||
'--baggageclaim-response-header-timeout=[how long to wait for Baggageclaim to send the response header]: :_concourse_durations'
|
||||
'--streaming-artifacts-compression=[compression algorithm for internal streaming(default: gzip)]:alg:(gzip zstd raw)'
|
||||
'--streaming-size-limitation=[internal volume streaming size limitation in MB]:size'
|
||||
'--garden-request-timeout=[how long to wait for requests to Garden to complete(default: 5m)]: :_concourse_durations'
|
||||
'--cli-artifacts-dir=[directory containing downloadable CLI binaries]: :_files -/'
|
||||
'--web-public-dir=[Web public/ directory to server live for local development]:dir:_files -/'
|
||||
'--log-db-queries[log database queries]'
|
||||
'--log-cluster-name[log cluster name]'
|
||||
'--build-tracker-interval=[interval on which to run build tracking]: :_concourse_durations'
|
||||
'--default-build-logs-to-retain=[default build logs to retain, 0 means all]:number'
|
||||
'--max-build-logs-to-retain=[maximum build logs to retain, 0 means not specified]:number'
|
||||
'--default-days-to-retain-build-logs=[default days to retain build logs. 0 means unlimited]:number'
|
||||
'--max-days-to-retain-build-logs=[maximum days to retain build logs, 0 means not specified]:number'
|
||||
'--job-scheduling-max-in-flight=[maximum number of jobs to be scheduling at the same time(default: 32)]:number'
|
||||
'--default-task-cpu-limit=[default max number of cpu shares per task, 0 means unlimited]:number'
|
||||
'--default-task-memory-limit=[default maximum memory per task, 0 means unlimited]:number'
|
||||
'--enable-build-auditing[enable auditing for all api requests connected to builds]'
|
||||
'--enable-container-auditing[enable auditing for all api requests connected to containers]'
|
||||
'--enable-job-auditing[enable auditing for all api requests connected to jobs]'
|
||||
'--enable-pipeline-auditing[enable auditing for all api requests connected to pipelines]'
|
||||
'--enable-resource-auditing[enable auditing for all api requests connected to resources]'
|
||||
'--enable-system-auditing[enable auditing for all api requests connected to system transactions]'
|
||||
'--enable-team-auditing[enable auditing for all api requests connected to teams]'
|
||||
'--enable-worker-auditing[enable auditing for all api requests connected to workers]'
|
||||
'--enable-volume-auditing[enable auditing for all api requests connected to volumes]'
|
||||
'--config-rbac=[customize RBAC role-action mapping]:mapping'
|
||||
'--system-claim-key=[token claim key to use when matching system-claim-values(default: aud)]:key'
|
||||
'--system-claim-value=[configure which token requests should be considered "system" requests(default: concourse-worker)]:value'
|
||||
'--base-resource-type-defaults=[base resource type defaults]:type'
|
||||
'--p2p-volume-streaming-timeout=[timeout of p2p volume streaming(default: 15m)]: :_concourse_durations'
|
||||
'--display-user-id-per-connector=[define how to display user ID for each authentication connector]:how'
|
||||
'--default-get-timeout=[default timeout of get steps]: :_concourse_durations'
|
||||
'--default-put-timeout=[default timeout of put steps]: :_concourse_durations'
|
||||
'--default-task-timeout=[default timeout of task steps]: :_concourse_durations'
|
||||
'--num-goroutine-threshold=[when number of goroutines reaches to this threshold, then slow down current ATC]:num'
|
||||
'--db-notification-bus-queue-size=[DB notification bus queue size(default: 10000)]:size' \
|
||||
)
|
||||
|
||||
local -a concourse_credential_manager_configurations=(
|
||||
# Credential Management
|
||||
'--secret-retry-attempts=[the number of attempts secret will be retried to be fetched, in case a retriable error happens]:number'
|
||||
'--secret-retry-interval=[the interval between secret retry retrieval attempts]: :_concourse_durations'
|
||||
'--secret-cache-enabled[enable in-memory cache for secrets]'
|
||||
'--secret-cache-duration=[secret values will be cached for not longer than this duration]: :_concourse_durations'
|
||||
'--secret-cache-duration-notfound=[secret not found responses will be cached for this duration]: :_concourse_durations'
|
||||
'--secret-cache-purge-interval=[if the cache is enabled, expired items will be removed on this internal]: :_concourse_durations'
|
||||
# Vault Credential Management
|
||||
'--vault-url=[vault server address used to access secrets]: :_urls'
|
||||
'--vault-path-prefix=[path under which to namespace credential lookup]:prefix'
|
||||
'--vault-lookup-templates=[path templates for credential lookup]: :_files'
|
||||
'--vault-shared-path=[path under which to lookup shared credentials]:path'
|
||||
'--vault-namespace=[Vault namespace to use for authentication and secret lookup]:namespace'
|
||||
'--vault-login-timeout=[timeout value for Vault login(default: 60s)]: :_concourse_durations'
|
||||
'--vault-query-timeout=[timeout value for Vault queue(default: 60s)]: :_concourse_durations'
|
||||
'--vault-disable-srv-lookup[disable that client will lookup the host through DNS SRV lookup]'
|
||||
'--vault-ca-cert=[path to a PEM-encoded CA cert file to use to verify the vault server SSL cert]: :_files'
|
||||
'--vault-ca-path=[path to a directory of PEM-encoded CA cert files to verify the vault server SSL cert]: :_files -/'
|
||||
'--vault-client-cert=[path to the client certificate for Vault authorization]: :_files'
|
||||
'--vault-client-key=[path to the client private key for Vault authorization]: :_files'
|
||||
'--vault-server-name=[if set, is used to set the SNI host when connecting via TLS]:server name'
|
||||
'--vault-insecure-skip-verify[enable insecure SSL verification]'
|
||||
'--vault-client-token=[client token for accessing secrets within the Vault server]:client token'
|
||||
'--vault-client-token-path=[absolute path to a file containing the Vault client token]: :_files'
|
||||
'--vault-auth-backend=[auth backend to use for logging in to Vault]:auth backend'
|
||||
'--vault-auth-backend-max-ttl=[time after which to force a re-login]: :_concourse_durations'
|
||||
'--vault-retry-max=[the maximum time between retries when logging in or re-authing a secret]: :_concourse_durations'
|
||||
'--vault-retry-initial=[the initial time between retries when logging in or re-authing a secret]: :_concourse_durations'
|
||||
'*--vault-auth-param=[parameter to pass when logging in via the backend]: :_concourse_name_colon_values'
|
||||
# Conjur Credential Management
|
||||
'--conjur-appliance-url=[URL of the conjur instance]: :_urls'
|
||||
'--conjur-account=[Conjur Account]:account'
|
||||
'--conjur-cert-file=[cert file used if conjur instance is using a self signed cert]: :_files'
|
||||
'--conjur-authn-login=[host username for conjur authn login]:host'
|
||||
'--conjur-authn-api-key=[Api key related to the host for conjur authn]:api_key'
|
||||
'--conjur-authn-token-file=[token file used if conjur instance is running in k8s or iam]: :_files'
|
||||
'--conjur-pipeline-secret-template=[Conjur secret identifier template used for pipeline specific parameter]:template'
|
||||
'--conjur-team-secret-template=[Conjur secret identifier template used for team specific parameter]:template'
|
||||
'--conjur-secret-template=[Conjur secret identifier template used for full path conjur secrets]:template'
|
||||
# CredHub Credential Management
|
||||
'--credhub-url=[CredHub server address used to access secrets]: :_urls'
|
||||
'--credhub-path-prefix=[path under which to namespace credential lookup]:path'
|
||||
'--credhub-ca-cert=[path to PEM-encoded CA cert files to use to verify the CredHub server SSL cert]: :_files'
|
||||
'--credhub-client-cert=[path to the client certificate for mutual TLS authorization]: :_files'
|
||||
'--credhub-client-key=[path to the client private key for mutual TLS authorization]: :_files'
|
||||
'--credhub-insecure-skip-verify[enable insecure SSL verification]'
|
||||
'--credhub-client-id=[client ID for CredHub authorization]:client ID'
|
||||
'--credhub-client-secret=[client secret for CredHub authorization]:client secret'
|
||||
# Dummy Credential Management
|
||||
'--dummy-creds-var=[a YAML value to expose via credential management]:key_val'
|
||||
# Kubernetes Credential Management
|
||||
'--kubernetes-in-cluster[enable the Kubernetes in-cluster client]'
|
||||
'--kubernetes-config-path=[path to Kubernetes config]: :_files'
|
||||
'--kubernetes-namespace-prefix=[prefix to use for Kubernetes namespace]:prefix'
|
||||
# AWS SecretsManager Credential Management
|
||||
'--aws-secretsmanager-access-key=[AWS Access key ID]:access key'
|
||||
'--aws-secretsmanager-secret-key=[AWS Secret Access Key]:secret key'
|
||||
'--aws-secretsmanager-session-token=[AWS Session Token]:session token'
|
||||
'--aws-secretsmanager-region=[AWS region to send requests to]:region'
|
||||
'--aws-secretsmanager-pipeline-secret-template=[AWS Secrets Manager secret identifier template used for pipeline specific parameter]:template'
|
||||
'--aws-secretsmanager-team-secret-template=[AWS Secrets Manager secret identifier template used for team specific parameter]:template'
|
||||
'--aws-secretsmanager-shared-secret-template=[AWS Secrets Manager secret identifier templated used for shared parameter]:template'
|
||||
# AWS SSM Credential Management
|
||||
'--aws-ssm-access-key=[AWS Access key ID]:access key'
|
||||
'--aws-ssm-secret-key=[AWS Secret Access Key]:secret key'
|
||||
'--aws-ssm-session-token=[AWS Session Token]:session token'
|
||||
'--aws-ssm-region=[AWS region to send requests to]:region'
|
||||
'--aws-ssm-pipeline-secret-template=[AWS SSM parameter name template used for pipeline specific parameter]:template'
|
||||
'--aws-ssm-team-secret-template=[AWS SSM parameter name template used for team specific parameter]:template'
|
||||
'--aws-ssm-shared-path=[AWS SSM parameter path used for shared parameters]: :_files'
|
||||
)
|
||||
|
||||
local -a concourse_placement_strategies=(
|
||||
volume-locality random fewest-build-containers limit-active-tasks limit-active-containers
|
||||
limit-active-volumes
|
||||
)
|
||||
local -a concourse_second_placement_strategies=(
|
||||
random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes
|
||||
)
|
||||
|
||||
local -a concourse_container_placement_strategy_configurations=(
|
||||
'--container-placement-strategy=[method by which a worker is selected during container placement]: :(($concourse_placement_strategies))'
|
||||
'--no-input-container-placement-strategy=[a second container placement strategy]: :(($concourse_second_placement_strategies))'
|
||||
'--check-container-placement-strategy=[a third container placement strategy]: :(($concourse_second_placement_strategies))'
|
||||
'--max-active-tasks-per-worker=[maximum allowed number of active build tasks per worker]:tasks'
|
||||
'--max-active-containers-per-worker=[maximum allowed number of active containers per worker]:containers'
|
||||
'--max-active-volumes-per-worker=[maximum allowed number of active volumes per worker]:volumes'
|
||||
)
|
||||
|
||||
local -a concourse_metric_configurations=(
|
||||
# Metrics & Diagnostics
|
||||
'--metrics-host-name=[host string to attach to emitted metrics]: :_hosts'
|
||||
'*--metrics-attribute=[a key-value attribute to attach to emitted metrics]: :_concourse_name_colon_values'
|
||||
'--metrics-buffer-size=[size of the buffer used in emitting event metrics(default: 1000)]:size'
|
||||
'--capture-error-metrics[enable capturing of error log metrics]'
|
||||
# Metric Emitter (Datadog)
|
||||
'--datadog-agent-host=[datadog agent host to expose dogstatsd metrics]: :_hosts'
|
||||
'--datadog-agent-port=[datadog agent port to expose dogstatsd metrics]: :_concourse_ports'
|
||||
'--datadog-agent-uds-filepath=[Datadog agent unix domain socket filepath]: :_files'
|
||||
'--datadog-prefix=[prefix for all metrics to easily find them in Datadog]:prefix'
|
||||
# Metric Emitter (InfluxDB)
|
||||
'--influxdb-url=[influxDB server address to emit points to]: :_urls'
|
||||
'--influxdb-database=[influxDB database to write points to]:database name'
|
||||
'--influxdb-username=[influxDB server username]: :_users'
|
||||
'--influxdb-password=[influxDB server password]:password'
|
||||
'--influxdb-insecure-skip-verify[skip SSL verification when emitting to InfluxDB]'
|
||||
'--influxdb-batch-size=[number of points to batch together when emitting to InfluxDB(default: 5000)]:size'
|
||||
'--influxdb-batch-duration=[duration to wait before emitting a batch of points to InfluxDB(default: 300s)]: :_concourse_durations'
|
||||
# Metric Emitter (Lager)
|
||||
'--emit-to-logs[emit metrics to logs]'
|
||||
# Metric Emitter (NewRelic)
|
||||
'--newrelic-account-id=[new Relic Account ID]:account ID'
|
||||
'--newrelic-api-key=[new Relic Insights API Key]:API key'
|
||||
'--newrelic-insights-api-url=[Base Url for insights Insert API]: :_urls'
|
||||
'--newrelic-service-prefix=[an optional prefix for emitted New Relic events]:prefix'
|
||||
'--newrelic-batch-size=[number of events to batch together before emitting(default: 2000)]:size'
|
||||
'--newrelic-batch-duration=[length of time to wait between emitting(default: 60s)]: :_concourse_durations'
|
||||
'--newrelic-batch-disable-compression=[disable compression of the batch before sending it]'
|
||||
# Metric Emitter (Prometheus)
|
||||
'--prometheus-bind-ip=[IP to listen on to expose Prometheus metrics]: :_concourse_ip_addresses'
|
||||
'--prometheus-bind-port=[port to listen on to expose Prometheus metrics]: :_concourse_ports'
|
||||
)
|
||||
|
||||
local -a concourse_tracing_configurations=(
|
||||
'--tracing-service-name=[service name to attach to traces as metadata(default: concourse-web)]:name'
|
||||
'--tracing-attribute=[attributes to attach to traces as metadata]:attributes'
|
||||
'--tracing-honeycomb-api-key=[honeycomb.io api key]:key'
|
||||
'--tracing-honeycomb-dataset=[honeycomb.io dataset name]:name'
|
||||
'--tracing-jaeger-endpoint=[jaeger http-based thrift collected]:endpoint'
|
||||
'--tracing-jaeger-tags=[tags to add to the components]:tags'
|
||||
'--tracing-jaeger-service=[jaeger process service name(default; web)]:name'
|
||||
"--tracing-stackdriver-projectid=[GCP's project ID]:project_id"
|
||||
'--tracing-otlp-address=[odlp address to send traces to]:address'
|
||||
'--tracing-otlp-header=[headers to attach to each tracing messages]:header'
|
||||
'--tracing-otlp-use-tls[whether to use TLS or not]'
|
||||
)
|
||||
|
||||
local -a concourse_policy_check_agent_configurations=(
|
||||
# Policy Checking
|
||||
'--policy-check-filter-http-method=[API http method to go through policy check]:method'
|
||||
'--policy-check-filter-action=[actions in the list will go through policy check]:actions'
|
||||
'--policy-check-filter-action-skip=[actions the list will not go through policy check]:actions'
|
||||
# Policy Check Agent (Open Policy Agent):
|
||||
'--opa-url=[OPA policy check endpoint]:url:_urls'
|
||||
'--opa-timeout=[OPA request timeout(default: 5s)]: :_concourse_durations'
|
||||
'--opa-result-allowed-key=[key name of if pass policy check in OPA returned result]:key'
|
||||
'--opa-result-should-block-key=[key name of if should block current action in OPA returned result]:key'
|
||||
'--opa-result-messages-key=[key name of messages in OPA returned result]:key'
|
||||
)
|
||||
|
||||
local -a concourse_web_server_configurations=(
|
||||
'--x-frame-options=[the value to set for X-Frame-Options]:options'
|
||||
'--content-security-policy=[value to set for Content-Security-Policy header]:value'
|
||||
'--strict-transport-security=[value to set for the Strict-Transport-Security header]:value'
|
||||
'--cluster-name=[a name for this Concourse cluster, to be displayed on the dashboard page]:name'
|
||||
'--client-id=[client ID to use for login flow(default: concourse-web)]:id'
|
||||
'--client-secret=[client secret to use for login flow]:secret'
|
||||
)
|
||||
|
||||
local -a concourse_gc_configurations=(
|
||||
'--gc-interval=[interval on which to perform garbage collection]: :_concourse_durations'
|
||||
'--gc-one-off-grace-period=[period after which one-off build containers will be garbage-collected]: :_concourse_durations'
|
||||
'--gc-missing-grace-period=[period after which to reap containers and volumes that were created but went missing from the worker]: :_concourse_durations'
|
||||
'--gc-hijack-grace-period=[period after which hijacked containers will be garbage collected]: :_concourse_durations'
|
||||
'--gc-failed-grace-period=[period after which failed containers will be garbage collected]: :_concourse_durations'
|
||||
'--gc-check-recycle-period=[period after which to reap checks that are completed]: :_concourse_durations'
|
||||
'--gc-var-source-recycle-period=[period after which to reap var_sources that are not used]: :_concourse_durations'
|
||||
)
|
||||
|
||||
local -a concourse_syslog_configurations=(
|
||||
'--syslog-hostname=[client hostname with which the build logs will be sent to the syslog server]: :_hosts'
|
||||
'--syslog-address=[remote syslog server address with port]: :_concourse_host_colon_ports'
|
||||
'--syslog-transport=[transport protocol for syslog messages]:protocol:(tcp udp tls)'
|
||||
'--syslog-drain-interval=[interval over which checking is done for new build logs to send to syslog server]: :_concourse_durations'
|
||||
'--syslog-ca-cert=[paths to PEM-encoded CA cert files to use to verify the Syslog server SSL cert]: :_files'
|
||||
)
|
||||
|
||||
local -a concourse_authentication_configurations=(
|
||||
'--cookie-secure[force sending secure flag on http cookies]'
|
||||
'--auth-duration=[length of time for which tokens are valid]: :_concourse_durations'
|
||||
'--session-signing-key=[file containing an RSA private key, used to sign auth tokens]: :_files'
|
||||
'--password-connector=[connector to use when authenticating via "fly login -u .. -p.."]: :(local ldap)'
|
||||
'*--add-local-user=[list of username:password combinations for all your local users]: :_concourse_username_colon_passwords'
|
||||
'*--add-client=[list of client_id:client_secret combinations]:pair'
|
||||
# Authentication Main Team
|
||||
'*--main-team-local-user=[list of whitelisted local concourse users]: :_users'
|
||||
{-c,--main-team-config=}'[configuration file for specifying team params]: :_concourse_config_files'
|
||||
# Authentication Main Team Bitbucket Cloud
|
||||
'*--main-team-bitbucket-cloud-user=[list of whitelisted Bitbucket Cloud users]: :_users'
|
||||
'*--main-team-bitbucket-cloud-team=[list of whitelisted Bitbucket Cloud teams]:team'
|
||||
# Authentication Main Team CloudFoundry
|
||||
'*--main-team-cf-user=[list of whitelisted CloudFoundry users]: :_users'
|
||||
'*--main-team-cf-org=[list of whitelisted CloudFoundry orgs]:org name'
|
||||
'*--main-team-cf-space=[list of whitelisted CloudFoundry spaces]:space name'
|
||||
'*--main-team-cf-space-with-any-role=[a whitelisted CloudFoundry space for users with any role]:space'
|
||||
'*--main-team-cf-space-with-developer-role=[a whitelisted CloudFoundry space for users with the developer role]:space'
|
||||
'*--main-team-cf-space-with-auditor-role=[a whitelisted CloudFoundry space for users with the auditor role]:space'
|
||||
'*--main-team-cf-space-with-manager-role=[a whitelisted CloudFoundry space for users with the manager role]:space'
|
||||
'*--main-team-cf-space-guid=[a whitelisted CloudFoundry space guid]:space_guid'
|
||||
# Authentication Main Team GitHub
|
||||
'*--main-team-github-user=[list of whitelisted GitHub users]: :_users'
|
||||
'*--main-team-github-org=[list of whitelisted GitHub orgs]:org name'
|
||||
'*--main-team-github-team=[list of whitelisted GitHub teams]:team name'
|
||||
# Authentication Main Team GitLab
|
||||
'*--main-team-gitlab-user=[list of whitelisted GitLab users]: :_users'
|
||||
'*--main-team-gitlab-group=[list of whitelisted GitLab groups]:group name'
|
||||
# Authentication Main Team LDAP
|
||||
'*--main-team-ldap-user=[list of whitelisted LDAP users]: :_users'
|
||||
'*--main-team-ldap-group=[list of whitelisted LDAP groups]:group name'
|
||||
# Authentication Main Team Microsoft
|
||||
'*--main-team-microsoft-user=[a whitelisted Microsoft user]: :_users'
|
||||
'*--main-team-microsoft-group=[a whitelisted Microsoft group]:group name'
|
||||
# Authentication Main Team OAuth2
|
||||
'*--main-team-oauth-user=[list of whitelisted OAuth2 users]: :_users'
|
||||
'*--main-team-oauth-group=[list of whitelisted OAuth2 groups]:group name'
|
||||
# Authentication Main Team OIDC
|
||||
'*--main-team-oidc-user=[list of whitelisted OIDC users]: :_users'
|
||||
'*--main-team-oidc-group=[list of whitelisted OIDC groups]:group name'
|
||||
# Authentication Main Team SAML
|
||||
'*--main-team-saml-user=[a whitelisted SAML user]: :_users'
|
||||
'*--main-team-saml-group=[a whitelisted SAML group]:group name'
|
||||
# Authentication Bitbucket Cloud
|
||||
'--bitbucket-cloud-client-id=[client id]:client ID'
|
||||
'--bitbucket-cloud-client-secret=[client secret]:client secret'
|
||||
# Authentication CloudFoundry
|
||||
'--cf-client-id=[client id]:client ID'
|
||||
'--cf-client-secret=[client secret]:client secret'
|
||||
'--cf-api-url=[the base API URL of your CF deployment]: :_urls'
|
||||
'--cf-ca-cert=[CA Certificate]: :_files'
|
||||
'--cf-skip-ssl-validation[skip SSL validation]'
|
||||
# Authentication GitHub
|
||||
'--github-client-id=[client id]:client ID'
|
||||
'--github-client-secret=[client secret]:client secret'
|
||||
'--github-host=[hostname of GitHub Enterprise deployment]: :_hosts'
|
||||
'--github-ca-cert=[CA certificate of GitHub Enterprise deployment]: :_files'
|
||||
# Authentication GitLab
|
||||
'--gitlab-client-id=[client id]:client ID'
|
||||
'--gitlab-client-secret=[client secret]:client secret'
|
||||
'--gitlab-host=[hostname of Gitlab Enterprise deployment]: :_hosts'
|
||||
# Authentication LDAP
|
||||
'--ldap-display-name=[the auth provider name displayed to users on the login page]:display name'
|
||||
'--ldap-host=[the host and optional port of the LDAP server]: :_hosts'
|
||||
'--ldap-bind-dn=[bind DN for searching LDAP users and groups]:bind DN'
|
||||
'--ldap-bind-pw=[bind Password for the user specified by bind-dn]:bind password'
|
||||
'--ldap-insecure-no-ssl[required if LDAP host does not use TLS]'
|
||||
'--ldap-insecure-skip-verify[skip certificate verification]'
|
||||
'--ldap-start-tls[start on insecure port, then negotiate TLS]'
|
||||
'--ldap-ca-cert=[CA certificate]: :_files'
|
||||
'--ldap-username-prompt=[propmt when logging in through the UI]:prompt'
|
||||
'--ldap-user-search-base-dn= [baseDN to start the search from]:baseDN'
|
||||
'--ldap-user-search-filter=[optional filter to apply when searching the directory]:filter'
|
||||
'--ldap-user-search-username=[attribute to match against the inputted username]:attribute'
|
||||
"--ldap-user-search-scope=[can either be: 'sub' - search the whole sub tree or 'one' - only search one level]:scope:((sub one))"
|
||||
'--ldap-user-search-id-attr=[a mapping of attributes on the user entry to claims]:attribute mapping'
|
||||
'--ldap-user-search-email-attr=[a mapping of attributes on the user entry to claims]:attribute mapping'
|
||||
'--ldap-user-search-name-attr=[a mapping of attributes on the user entry to claims]:attribute mapping'
|
||||
'--ldap-group-search-base-dn=[baseDN to start the search from]:baseDN'
|
||||
'--ldap-group-search-filter=[optional filter to apply when searching the directory]:filter'
|
||||
"--ldap-group-search-scope=[can either be: 'sub' - search the whole sub tree or 'one' - only search one level]:scope:(sub one)"
|
||||
"--ldap-group-search-user-attr=[adds an additional requirement to the filter that an attribute in the group match the user's attribute value]:attribute"
|
||||
"--ldap-group-search-group-attr=[adds an additional requirement to the filter that an attribute in the group match the user's attribute value]:attribute"
|
||||
'--ldap-group-search-name-attr=[the attribute of the group that represents its name]:attribute'
|
||||
# Authentication Microsoft
|
||||
'--microsoft-client-id=[Microsoft client ID]:id'
|
||||
'--microsoft-client-secret=[Microsoft client secret]:secret'
|
||||
'--microsoft-tenant=[Microsoft Tenant limitation]:tenant'
|
||||
'--microsoft-groups=[allowed Active Directory Groups]:groups'
|
||||
'--microsoft-only-security-groups[only fetch security groups]'
|
||||
# Authentication OAuth2
|
||||
'--oauth-display-name=[the auth provider name displayed to users on the login page]:display name'
|
||||
'--oauth-client-id=[client id]:client ID'
|
||||
'--oauth-client-secret=[client secret]:client secret'
|
||||
'--oauth-auth-url=[Authorization URL]: :_urls'
|
||||
'--oauth-token-url=[Token URL]: :_urls'
|
||||
'--oauth-userinfo-url=[UserInfo URL]: :_urls'
|
||||
'*--oauth-scope=[any additional scopes that need to be requested during authorization]:scope'
|
||||
'--oauth-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key'
|
||||
'--oauth-user-id-key=[the user id key indicates which claim to use to map an external user id to a Concourse user id]:id key'
|
||||
'--oauth-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:name key'
|
||||
'--oauth-ca-cert=[CA Certificate]: :_files'
|
||||
'--oauth-skip-ssl-validation[skip SSL validation]'
|
||||
# Authorization OIDC
|
||||
'--oidc-display-name=[the auth provider name displayed to users on the login page]:display name'
|
||||
'--oidc-issuer=[An OIDC issuer URL that will be used to discover provider configuration]: :_urls'
|
||||
'--oidc-client-id=[client id]:client ID'
|
||||
'--oidc-client-secret=[client secret]:client secret'
|
||||
'*--oidc-scope=[any additional scopes that need to be requested during authorization]:scope'
|
||||
'--oidc-groups-key=[the groups key indicates which claim to use to map external groups to Concourse teams]:group key'
|
||||
'--oidc-user-name-key=[the user name key indicates which claim to use to map an external user name to a Concourse user name]:user name key'
|
||||
'--oidc-ca-cert=[CA Certificate]: :_files'
|
||||
'--oidc-skip-ssl-validation[skip SSL validation]'
|
||||
'--oidc-disable-groups[disable OIDC groups claims]'
|
||||
'--oidc-skip-email-verified-validation[ignore the email_verified claim from the upstream provider]'
|
||||
'--oidc-disable-get-user-info[disable not query the additional claims]'
|
||||
# Authorization SAML
|
||||
'--saml-display-name=[SAML auth provider name displayed to users on the login page]:name'
|
||||
'--saml-sso-url=[SAML SSO URL used for POST value]:url:_urls'
|
||||
'--saml-ca-cert=[SAML CA Certificate]: :_files'
|
||||
"--saml-entity-issuer=[SAML manually specify dex's issuer value]"
|
||||
'--saml-sso-issuer=[issuer value expected in the SAML response]:issuer'
|
||||
'--saml-username-attr=[SAML concourse user name]:name'
|
||||
'--saml-email-attr=[SAML concourse email]:name'
|
||||
'--saml-groups-attr=[SAML concourse teams]:name'
|
||||
'--saml-groups-delim=[groups are returned as string with this delimiter]:delimiter'
|
||||
'--saml-name-id-policy-format=[requested format of the NameID]:format'
|
||||
'--saml-skip-ssl-validation[SAML skip SSL validation]'
|
||||
)
|
||||
|
||||
local -a concourse_feature_flags=(
|
||||
'--enable-global-resources[enable equivalent resources across pipelines and teams to share a single version history]'
|
||||
'--enable-redact-secrets[enable redacting secrets in build logs]'
|
||||
'--enable-rerun-when-worker-disappears[enable automatically build rerun when worker disappears]'
|
||||
'--enable-across-step[enable the experimental across step to be used in jobs]'
|
||||
'--enable-pipeline-auditing[enable pipeline instances]'
|
||||
'--enable-p2p-volume-streaming[enable P2P volume streaming]'
|
||||
'--enable-cache-streamed-volumes[streamed resource volumes will be cached on the destination]'
|
||||
'--enable-resource-causality[enable the resource causality page]'
|
||||
)
|
||||
|
||||
local -a concourse_tsa_configurations=(
|
||||
'--tsa-log-level=[minimum level of logs to see]: :_concourse_log_levels'
|
||||
'--tsa-bind-ip=[IP address on which to listen for SSH]: :_concourse_ip_addresses'
|
||||
'--tsa-peer-address=[network address of this web node, reachable by other web nodes]: :_urls'
|
||||
'--tsa-bind-port=[port on which to listen for SSH]: :_concourse_ports'
|
||||
'--tsa-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses'
|
||||
'--tsa-debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports'
|
||||
'--tsa-host-key=[path to private key to use for the SSH server]: :_files'
|
||||
'--tsa-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_files'
|
||||
'--tsa-team-authorized-keys=[path to file containing keys to authorize, in SSH authorized_keys format]: :_concourse_name_colon_paths'
|
||||
'--tsa-atc-url=[ATC API endpoints to which workers will be registered]: :_urls'
|
||||
'--tsa-client-id=[client used to fetch a token from the auth server]:id'
|
||||
'--tsa-client-secret=[client used to fetch a token from the auth server]:secret'
|
||||
'--tsa-token-url=[token endpoint of the auth server]: :_urls'
|
||||
'*--tsa-scope=[scopes to request from the auth server]'
|
||||
'--tsa-heartbeat-interval=[interval on which to heartbeat workers to the ATC]: :_concourse_durations'
|
||||
'--tsa-garden-request-timeout=[how long to wait for requests to Garden to complete]: :_concourse_durations'
|
||||
'--tsa-cluster-name=[a name for this Concourse cluster]:name'
|
||||
'--tsa-log-cluster-name=[log cluster name]:name'
|
||||
)
|
||||
|
||||
case $command in
|
||||
(quickstart)
|
||||
_concourse_quickstart && ret=0
|
||||
;;
|
||||
(web)
|
||||
_concourse_web && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_generate-key] )) ||
|
||||
_concourse_generate-key() {
|
||||
_arguments \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'(-t --type)'{-t,--type=}'[the type of key to generate]:key type:(rsa ssh)' \
|
||||
'(-f --filename)'{-f,--filename=}'[file path where the key shall be created. When generating ssh keys, the public key will be stored in a file with the same name but with .pub appended]: :_files' \
|
||||
'(-b --bits)'{-b,--bits=}'[the number of bits in the key to create]:integer'
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_land-worker] )) ||
|
||||
_concourse_land-worker() {
|
||||
_arguments \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'--name=[the name of the worker you wish to land]:worker name' \
|
||||
'*--tsa-host=[TSA host to forward the worker through]: :_concourse_host_colon_ports' \
|
||||
'--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \
|
||||
'--tsa-worker-private-key=[file containing a public key to expect from the TSA]: :_files'
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_migrate] )) ||
|
||||
_concourse_migrate() {
|
||||
_arguments \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'--encryption-key=[a 16 or 32 length key used to encrypt sensitive information before storing it in the database]:encryption key' \
|
||||
'(- : *)--current-db-version[print the current database version and exit]' \
|
||||
'(- : *)--supported-db-version[print the max supported database version and exit]' \
|
||||
'--migrate-db-to-version=[migrate to the specified database version and exit]:database version' \
|
||||
'--migrate-to-latest-version[migrate to the latest migration version and exit]' \
|
||||
$concourse_postgres_configurations[@] \
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_quickstart] )) ||
|
||||
_concourse_quickstart() {
|
||||
local -a concourse_worker_configurations=(
|
||||
'--worker-name=[name to set for the worker during registration]:name'
|
||||
'--worker-tag=[tag to set during registration]:tag'
|
||||
'--worker-team=[name of the team that this worker will be assigned to]:team'
|
||||
'--worker-http-proxy=[HTTP proxy endpoint to use for containers]:proxy:_urls'
|
||||
'--worker-https-proxy=[HTTPS proxy endpoint to use for containers]:proxy:_urls'
|
||||
'*--worker-no-proxy=[blacklist of addresses to skip the proxy when reaching]:url:_urls'
|
||||
'--worker-ephemeral[worker will be immediately removed upon stalling]'
|
||||
'--worker-certs-dir=[directory to use when creating the resource certificates volume]:dir:_files -/'
|
||||
'--worker-work-dir=[directory in which to place container data]:dir:_files -/'
|
||||
'--worker-bind-ip=[IP address on which to listen for the Garden server]:ip'
|
||||
'--worker-bind-port=[port on which to listen for the Garden server]:port'
|
||||
'--worker-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]:ip'
|
||||
'--worker-debug-bind-port=[port on which to listen for the pprof debugger endpoints]:port'
|
||||
'--worker-healthcheck-bind-ip=[IP address on which to listen for health checking requests]:ip'
|
||||
'--worker-healthcheck-bind-port=[port on which to listen for health checking requests]:port'
|
||||
'--worker-healthcheck-timeout=[HTTP timeout for the full duration of health checking]: :_concourse_durations'
|
||||
'--worker-sweep-interval=[interval on which containers and volumes will be garbage collected from the worker]: :_concourse_durations'
|
||||
'--worker-volume-sweeper-max-in-flight=[maximum number of volumes which can be swept in parallel]:number'
|
||||
'--worker-container-sweeper-max-in-flight=[maximum number of containers which can be swept in parallel]:number'
|
||||
'--worker-rebalance-interval=[duration after which the registration should be swapped to another random SSH gateway]: :_concourse_durations'
|
||||
'--worker-connection-drain-timeout=[duration after which a worker should give up draining forwarded connections on shutdown]: :_concourse_durations'
|
||||
'--worker-external-garden-url=[API endpoint of an externally managed Garden server to use instead of running the embedded Garden server]:url:_urls'
|
||||
'--worker-resource-types=[path to directory containing resource types the worker should advertise]:dir:_files -/'
|
||||
'--worker-log-level=[minimum level of logs to see]:level:_concourse_log_levels'
|
||||
|
||||
# TSA Configuration:
|
||||
'--worker-tsa-host=[TSA host to forward the worker through]:host'
|
||||
'--worker-tsa-public-key=[file containing a public key to expect from the TSA]:file:_files'
|
||||
'--worker-tsa-worker-private-key=[file containing the private key to use when authenticating to the TSA]:file:_files'
|
||||
|
||||
# Tracing:
|
||||
'--worker-tracing-service-name=[service name to attach to traces as metadata]:name'
|
||||
'--worker-tracing-attribute=[attributes to attach to traces as metadata]:attr'
|
||||
'--worker-tracing-honeycomb-api-key=[honeycomb.io api key]:key'
|
||||
'--worker-tracing-honeycomb-dataset=[honeycomb.io dataset name]:dataset'
|
||||
'--worker-tracing-jaeger-endpoint=[jaeger http-based thrift collector]:endpoint'
|
||||
'--worker-tracing-jaeger-tags=[tags to add to the components]:tags'
|
||||
'--worker-tracing-jaeger-service=[jaeger process service name]:service'
|
||||
"--worker-tracing-stackdriver-projectid=[GCP's Project ID]:id"
|
||||
'--worker-tracing-otlp-address=[otlp address to send traces to]:address'
|
||||
'--worker-tracing-otlp-header=[headers to attach to each tracing message]:header'
|
||||
'--worker-tracing-otlp-use-tls[whether to use tls or not]'
|
||||
|
||||
# Runtime Configuration
|
||||
'--worker-runtime=[runtime to use with the worker]:runtime:(guardian containerd houdini)'
|
||||
|
||||
# Guardian Configuration
|
||||
'--worker-garden-bin=[path to a garden server executable]:bin'
|
||||
'--worker-garden-request-timeout=[how long to wait for requests to the Garden server to complete]:time:_concourse_durations'
|
||||
'--worker-garden-config=[path to a config file to use for the Garden backend]:path:_files'
|
||||
|
||||
# DNS Proxy Configuration
|
||||
'--worker-garden-dns-proxy-enable[enable proxy DNS server]'
|
||||
|
||||
# Container Networking
|
||||
'--worker-garden-network-pool=[network range to use for dynamically allocated container subnets]:range'
|
||||
|
||||
# Limits:
|
||||
'--worker-garden-max-containers=[maximum container capacity]:capacity'
|
||||
|
||||
# Containerd Configuration:
|
||||
'--worker-containerd-config=[path to a config file to use for the Containerd daemon]:file:_files'
|
||||
'--worker-containerd-bin=[path to a containerd executable]:file:_files'
|
||||
'--worker-containerd-init-bin=[path to an init executable]:file:_files'
|
||||
'--worker-containerd-seccomp-profile=[path to a seccomp filter override]:file:_files'
|
||||
'--worker-containerd-oci-hooks-dir=[path to the oci hooks dir]:dir:_files -/'
|
||||
'--worker-containerd-cni-plugins-dir=[path to CNI network plugins]:dir:_files -/'
|
||||
'--worker-containerd-request-timeout=[how long to wait for requests to Containerd to complete]: :_concourse_durations'
|
||||
'--worker-containerd-max-containers=[max container capacity]:capacity'
|
||||
'--worker-containerd-privileged-mode=[how many privileges privileged containers get]:type:(full fuse-only ignore)'
|
||||
|
||||
# Containerd Networking
|
||||
"--worker-containerd-external-ip=[IP address to use to reach container's mapped ports]:ip"
|
||||
'--worker-containerd-dns-server=[DNS server IP address to use instead of automatically determined servers]:ip'
|
||||
'--worker-containerd-additional-hosts=[additional entries to add to /etc/hosts in containers]:hosts'
|
||||
'--worker-containerd-restricted-network=[network ranges to which traffic from containers will be restricted]:range'
|
||||
'--worker-containerd-network-pool=[network range to use for dynamically allocated container subnets]:range'
|
||||
'--worker-containerd-mtu=[MTU size for container network interfaces]:size'
|
||||
"--worker-containerd-allow-host-access[allow containers to reach the host's network]"
|
||||
|
||||
# DNS Proxy Configuration:
|
||||
'--worker-containerd-dns-proxy-enable[Enable proxy DNS server]'
|
||||
|
||||
# IPv6 Configuration:
|
||||
'--worker-containerd-v6-enable[enable IPv6 networking]'
|
||||
'--worker-containerd-v6-pool=[IPv6 network range to use for dynamically allocated container addresses]:range'
|
||||
'--worker-containerd-v6-disable-masquerade [Masquerade container traffic with worker address]:address'
|
||||
|
||||
# Baggageclaim Configuration:
|
||||
'--worker-baggageclaim-log-level=[minimum level of logs to see]: :_concourse_log_levels'
|
||||
'--worker-baggageclaim-bind-ip=[IP address on which to listen for API traffic]:ip'
|
||||
'--worker-baggageclaim-bind-port=[port on which to listen for API traffic]:port'
|
||||
'--worker-baggageclaim-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]:ip'
|
||||
'--worker-baggageclaim-debug-bind-port=[port on which to listen for the pprof debugger endpoints]:port'
|
||||
'--worker-baggageclaim-p2p-interface-name-pattern=[regular expression to match a network interface for p2p streaming]:pattern'
|
||||
'--worker-baggageclaim-p2p-interface-family=[4 for IPv4 and 6 for IPv6]:type:(4 6)'
|
||||
'--worker-baggageclaim-volumes=[directory in which to place volume data]:dir:_files -/'
|
||||
'--worker-baggageclaim-driver=[driver to use for managing volumes]:type:(detect naive btrfs overlay)'
|
||||
'--worker-baggageclaim-btrfs-bin=[path to btrfs binary]:path:_files'
|
||||
'--worker-baggageclaim-mkfs-bin=[path to mkfs binary]:path:_files'
|
||||
'--worker-baggageclaim-overlays-dir=[path to directory in which to store overlay data]:dir:_files -/'
|
||||
'--worker-baggageclaim-disable-user-namespaces[disable remapping of user/group IDs in unprivileged volumes]:namespace'
|
||||
)
|
||||
|
||||
_arguments \
|
||||
$concourse_web_configurations[@] \
|
||||
"--enable-lets-encrypt[automatically configure TLS certificate via Let's Encrypt/ACME]" \
|
||||
"--lets-encrypt-acme-url=[URL of ACME CA directory endpoint]:url:_urls" \
|
||||
$concourse_postgres_configurations[@] \
|
||||
$concourse_credential_manager_configurations[@] \
|
||||
'--signing-key-check-interval=[how often to check for outdated or expired signing keys(default: 10m)]: :_concourse_durations' \
|
||||
'--signing-key-rotation-period=[after which time a new signing key for the idtoken secrets provider should be generated]: :_concourse_durations' \
|
||||
'--signing-key-rotation-period=[how long a key should still be published after a new key has been generated]: :_concourse_durations' \
|
||||
$concourse_container_placement_strategy_configurations[@] \
|
||||
$concourse_metric_configurations[@] \
|
||||
$concourse_tracing_configurations[@] \
|
||||
$concourse_policy_check_agent_configurations[@] \
|
||||
$concourse_web_server_configurations[@] \
|
||||
$concourse_gc_configurations[@] \
|
||||
$concourse_syslog_configurations[@] \
|
||||
$concourse_authentication_configurations[@] \
|
||||
$concourse_feature_flags[@] \
|
||||
$concourse_tsa_configurations[@] \
|
||||
$concourse_worker_configurations[@]
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_retire-worker] )) ||
|
||||
_concourse_retire-worker() {
|
||||
_arguments \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'--name=[the name of the worker you wish to retire]:worker name' \
|
||||
'--team=[the team name of the worker you with to retire]:team name' \
|
||||
'*--tsa-host=[TSA host to forward the worker through]: :_concourse_host_colon_ports' \
|
||||
'--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \
|
||||
'--tsa-worker-private-key=[file containing a public key to expect from the TSA]: :_files'
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_web] )) ||
|
||||
_concourse_web() {
|
||||
local -a placement_strategies=(
|
||||
volume-locality random fewest-build-containers limit-active-tasks limit-active-containers
|
||||
limit-active-volumes
|
||||
)
|
||||
local -a second_placement_strategies=(
|
||||
random fewest-build-containers limit-active-tasks limit-active-containers limit-active-volumes
|
||||
)
|
||||
|
||||
_arguments \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
$concourse_web_configurations[@] \
|
||||
"--enable-lets-encrypt[automatically configure TLS certificate via Let's Encrypt/ACME]" \
|
||||
"--lets-encrypt-acme-url=[URL of ACME CA directory endpoint]:url:_urls" \
|
||||
$concourse_postgres_configurations[@] \
|
||||
$concourse_credential_manager_configurations[@] \
|
||||
'--signing-key-check-interval=[how often to check for outdated or expired signing keys(default: 10m)]: :_concourse_durations' \
|
||||
'--signing-key-rotation-period=[after which time a new signing key for the idtoken secrets provider should be generated]: :_concourse_durations' \
|
||||
'--signing-key-rotation-period=[how long a key should still be published after a new key has been generated]: :_concourse_durations' \
|
||||
$concourse_container_placement_strategy_configurations[@] \
|
||||
$concourse_metric_configurations[@] \
|
||||
$concourse_tracing_configurations[@] \
|
||||
$concourse_policy_check_agent_configurations[@] \
|
||||
$concourse_web_server_configurations[@] \
|
||||
$concourse_gc_configurations[@] \
|
||||
$concourse_syslog_configurations[@] \
|
||||
$concourse_authentication_configurations[@] \
|
||||
$concourse_feature_flags[@] \
|
||||
$concourse_tsa_configurations[@]
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_worker] )) ||
|
||||
_concourse_worker() {
|
||||
_arguments \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'--name=[the name to set for the worker during registration]:name' \
|
||||
'*--tag=[a tag to set during registration]:tag' \
|
||||
'--team=[the name of the team that this worker will be assigned to]:team name' \
|
||||
'--http-proxy=[HTTP proxy endpoint to use for containers]: :_urls' \
|
||||
'--https-proxy=[HTTPS proxy endpoint to use for containers]: :_urls' \
|
||||
'*--no-proxy=[blacklist of addresses to skip the proxy when reaching]: :_urls' \
|
||||
'--ephemeral[if set, the worker will be immediately removed upon stalling]' \
|
||||
'--certs-dir=[directory to use when creating the resource certificates volume]: :_files -/' \
|
||||
'--work-dir=[directory in which to place container data]: :_files -/' \
|
||||
'--bind-ip=[IP address on which to listen for the Garden server]: :_concourse_ip_addresses' \
|
||||
'--bind-port=[port on which to listen for the Garden server]: :_concourse_ports' \
|
||||
'--debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' \
|
||||
'--debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' \
|
||||
'--healthcheck-bind-ip=[IP address on which to listen for health checking requests]: :_concourse_ip_addresses' \
|
||||
'--healthcheck-bind-port=[port on which to listen for health checking requests]: :_concourse_ports' \
|
||||
'--healthcheck-timeout=[HTTP timeout for the full duration of health checking]: :_concourse_durations' \
|
||||
'--sweep-interval=[interval on which containers and volumes will be garbage collected from the worker]: :_concourse_durations' \
|
||||
'--volume-sweeper-max-in-flight=[maximum number of volumes which can be swept in parallel]:number' \
|
||||
'--container-sweeper-max-in-flight=[maximum number of containers which can be swept in parallel]:number' \
|
||||
'--rebalance-interval=[duration after which the registration should be swapped to another random SSH gateway]: :_concourse_durations' \
|
||||
'--connection-drain-timeout=[duration after which a worker should give up draining forwarded connections on shutdown]: :_concourse_durations' \
|
||||
'--external-garden-url=[API endpoint of an externally managed Garden server to use instead of running the embedded Garden server]: :_urls' \
|
||||
'--resource-types=[path to directory containing resource types the worker should advertise]: :_files -/' \
|
||||
'--log-level=[minimum level of logs to see]: :_concourse_log_levels' \
|
||||
'*--tsa-host=[TSA host to forward the worker through]: :_hosts' \
|
||||
'--tsa-public-key=[file containing a public key to expect from the TSA]: :_files' \
|
||||
'--tsa-worker-private-key=[file containing the private key to use when authenticating to the TSA]: :_files' \
|
||||
'--runtime=[runtime to use with the worker(default: guardian)]:runtime:(guardian containerd houdini)' \
|
||||
'--garden-bin=[path to gdn executable (or leave as gdn to find it in $PATH)]: :_path_commands' \
|
||||
'--garden-request-timeout=[how long to wait for requests to the Garden server to complete]:time' \
|
||||
'--garden-config=[path to a config file to use for Garden]: :_files' \
|
||||
'--garden-dns-proxy-enable[enable proxy DNS server]' \
|
||||
'--garden-network-pool=[network range to use for dynamically allocated container subnets]:range' \
|
||||
'--garden-max-containers=[maximum container capacity for Garden]:limit' \
|
||||
'--containerd-config=[path to a config file to use for the Containerd]:path:_files' \
|
||||
'--containerd-bin=[path to a containerd executable]:command:_path_commands' \
|
||||
'--containerd-init-bin=[path to an init executable]:init:_files' \
|
||||
'--containerd-seccomp-profile=[path to a seccomp filter override]:filter:_files' \
|
||||
'--containerd-oci-hooks-dir=[path to the oci hooks dir]:dir:_files -/' \
|
||||
'--containerd-cni-plugins-dir=[path to CnI network plugins]:dir:_files -/' \
|
||||
'--containerd-request-timeout=[how long to wait for requests to Containerd to complete]:timeout' \
|
||||
'--containerd-max-containers=[max conatiner capacity for containerd]:limit' \
|
||||
'--containerd-privileged-mode=[how many privileges privileged containers get]:type:(full fuse-only ignore)' \
|
||||
"--containerd-external-ip=[IP address to use to reach container's mapped ports]:ip" \
|
||||
'--containerd-dns-server=[DNS server IP address to use instead of automatically determined servers]:ip' \
|
||||
'--containerd-additional-hosts=[additioanl entries to add to /etc/hosts in containers]:hosts' \
|
||||
'--containerd-restricted-network=[network ranges to which traffic from containers will be restricted]:range' \
|
||||
'--containerd-network-pool=[network range to use for dynamically allocated containers subnets]:range' \
|
||||
'--containerd-mtu=[MTU size for container network interfaces]:size' \
|
||||
"--containerd-allow-host-access[allow containers to reach the host's network]" \
|
||||
'--containerd-dns-proxy-enable[enable proxy DNS server]' \
|
||||
'--containerd-v6-enable[enable IPv6 networking]' \
|
||||
'--containerd-v6-pool=[IPv6 network range to use for dynamically allocated container addresses]:range' \
|
||||
'--containerd-v6-disable-masquerade[Masquerade container traffic with worker address]' \
|
||||
'--baggageclaim-log-level=[minimum level of logs to see]: :_concourse_log_levels' \
|
||||
'--baggageclaim-bind-ip=[IP address on which to listen for API traffic]: :_concourse_ip_addresses' \
|
||||
'--baggageclaim-bind-port=[port on which to listen for API traffic]: :_concourse_ports' \
|
||||
'--baggageclaim-debug-bind-ip=[IP address on which to listen for the pprof debugger endpoints]: :_concourse_ip_addresses' \
|
||||
'--baggageclaim-debug-bind-port=[port on which to listen for the pprof debugger endpoints]: :_concourse_ports' \
|
||||
'--baggageclaim-p2p-interface-name-pattern=[regular expression to match a network interface for p2p streaming]:pattern' \
|
||||
'--baggageclaim-p2p-interface-family=[IPv4 or IPv6(default IPv4)]:type:(4 6)' \
|
||||
'--baggageclaim-volumes=[directory in which to place volume data]: :_files -/' \
|
||||
'--baggageclaim-driver=[driver to use for managing volumes]:driver:(detect naive btrfs overlay)' \
|
||||
'--baggageclaim-btrfs-bin=[path to btrfs binary]: :_path_commands' \
|
||||
'--baggageclaim-mkfs-bin=[path to mkfs.btrfs binary]: :_files' \
|
||||
'--baggageclaim-overlays-dir=[path to directory in which to store overlay data]: :_files -/' \
|
||||
'--baggageclaim-disable-user-namespaces[disable remapping of user/group IDs in unprivileged volumes]'
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_config_files] )) ||
|
||||
_concourse_config_files() {
|
||||
_files -g "*.(yml|yaml)"
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_ip_addresses] )) ||
|
||||
_concourse_ip_addresses() {
|
||||
_message 'IP address'
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_ports] )) ||
|
||||
_concourse_ports() {
|
||||
_message 'port number'
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_host_colon_ports] )) ||
|
||||
_concourse_host_colon_ports() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
_concourse_ports && ret=0
|
||||
else
|
||||
_alternative \
|
||||
'hosts: :_hosts -qS:' \
|
||||
'ip-addresses: :_guard "[[:digit:]]*" "IP address"' \
|
||||
&& ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_type_colon_images] )) ||
|
||||
_concourse_type_colon_images() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
_message 'type' && ret=0
|
||||
else
|
||||
_message 'image' && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_name_colon_values] )) ||
|
||||
_concourse_name_colon_values() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
_message 'name' && ret=0
|
||||
else
|
||||
_message 'value' && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_username_colon_passwords] )) ||
|
||||
_concourse_username_colon_passwords() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
_message 'username' && ret=0
|
||||
else
|
||||
_message 'password' && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_name_colon_paths] )) ||
|
||||
_concourse_name_colon_paths() {
|
||||
local ret=1
|
||||
if compset -P '*:'; then
|
||||
_message 'name' && ret=0
|
||||
else
|
||||
_files && ret=0
|
||||
fi
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_durations] )) ||
|
||||
_concourse_durations() {
|
||||
_message 'duration, eg: "5s", "5m", "5h", "5d"'
|
||||
}
|
||||
|
||||
(( $+functions[_concourse_log_levels] )) ||
|
||||
_concourse_log_levels() {
|
||||
local levels=(
|
||||
'debug:debug traces'
|
||||
'info:normal log level'
|
||||
'error:log only errors'
|
||||
'fatal:log only fatal errors'
|
||||
)
|
||||
_describe -t log-levels 'log level' levels
|
||||
}
|
||||
|
||||
_concourse_server "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
#compdef cpack
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cpack 4.3.0 (https://kitware.com/cmake)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_cpack() {
|
||||
local ret=1
|
||||
|
||||
_arguments \
|
||||
'-G[Override/define CPACK_GENERATOR]:generator:_cpack_generators' \
|
||||
'-C[Specify the project configurations]:configuration:(Debug Release)' \
|
||||
'*-D[Set a CPack variable]:var_val' \
|
||||
'--config[Specify the config file]:file:_files' \
|
||||
'(-V --verbose)'{-V,--verbose}'[Enable verbose output]' \
|
||||
'--trace[Put underlying cmake scripts in trace mode]' \
|
||||
'--trace-expand[Put underlying cmake scripts in expanded trace mode]' \
|
||||
'--debug[Enable debug output]' \
|
||||
'-P[Override/define CPACK_PACKAGE_NAME]:package_name' \
|
||||
'-R[Override/define CPACK_PACKAGE_VERSION]:package_version' \
|
||||
'-B[Override/define CPACK_PACKAGE_DIRECTORY]:package_directory:_files -/' \
|
||||
'--vendor[Override/define CPACK_PACKAGE_VENDOR]:vendor' \
|
||||
'--preset[Read arguments from a package preset]' \
|
||||
'--list-presets[List available package preset]' \
|
||||
'(- *)'{--version,-version}=-'[Print version number and exit]::format:(json-v1)' \
|
||||
'(- *)--help[Print usage information and exit]' \
|
||||
'(- *)--help-full[Print all help manuals and exit]' \
|
||||
'(- *)--help-manual[Print one help manual and exit]:manual:_cpack_help_manuals' \
|
||||
'(- *)--help-manual-list[List help manuals available and exit]' \
|
||||
'(- *)--help-command[Print help for one command and exit]:command:_cpack_help_commands' \
|
||||
'(- *)--help-command-list[List commands with help available and exit]' \
|
||||
'(- *)--help-commands[Print cmake-commands manual and exit]' \
|
||||
'(- *)--help-module[Print help for one module and exit]:module:_cpack_help_modules' \
|
||||
'(- *)--help-module-list[List modules with help available and exit]' \
|
||||
'(- *)--help-modules[Print cmake-modules manual and exit]' \
|
||||
'(- *)--help-policy[Print help for one policy and exit]:policy:_cpack_help_policies' \
|
||||
'(- *)--help-policy-list[List policies with help available and exit]' \
|
||||
'(- *)--help-policies[Print cmake-policies manual and exit]' \
|
||||
'(- *)--help-property[Print help for one property and exit]:property:_cpack_help_properties' \
|
||||
'(- *)--help-property-list[List properties with help available and exit]' \
|
||||
'(- *)--help-properties[Print cmake-properties manual and exit]' \
|
||||
'(- *)--help-variable[Print help for one variable and exit]:variable:_cpack_help_variables' \
|
||||
'(- *)--help-variable-list[List variables with help available and exit]' \
|
||||
'(- *)--help-variables[Print cmake-variables manual and exit]' \
|
||||
&& ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_cpack_generators() {
|
||||
local -a generators=(
|
||||
"7Z:[7-Zip file format with default compression algorithm]"
|
||||
"7Z_BZ2:[7-Zip file format with BZip2 compression]"
|
||||
"7Z_DEFLATE:[7-Zip file format with Deflate compression]"
|
||||
"7Z_LZMA:[7-Zip file format with LZMA compression]"
|
||||
"7Z_LZMA2:[7-Zip file format with LZMA2 compression]"
|
||||
"7Z_PPMD:[7-Zip file format with PPMd compression]"
|
||||
"7Z_STORE:[7-Zip file format without compression]"
|
||||
"7Z_ZSTD:[7-Zip file format with Zstandard compression]"
|
||||
"AppImage:[AppImage packages]"
|
||||
"DEB:[Debian packages]"
|
||||
"External:[CPack External packages]"
|
||||
"IFW:[Qt Installer Framework]"
|
||||
"INNOSETUP:[Inno Setup packages]"
|
||||
"NSIS:[Null Soft Installer]"
|
||||
"NSIS64:[Null Soft Installer (64-bit)]"
|
||||
"NuGet:[NuGet packages]"
|
||||
"RPM:[RPM packages]"
|
||||
"STGZ:[Self extracting Tar GZip compression]"
|
||||
"TAR:[Tar no compression]"
|
||||
"TBZ2:[Tar BZip2 compression]"
|
||||
"TGZ:[Tar GZip compression]"
|
||||
"TXZ:[Tar XZ compression]"
|
||||
"TZ:[Tar Compress compression]"
|
||||
"TZST:[Tar Zstandard compression]"
|
||||
"ZIP:[ZIP file format with default compression algorithm]"
|
||||
"ZIP_BZ2:[ZIP file format with BZip2 compression]"
|
||||
"ZIP_DEFLATE:[ZIP file format with Deflate compression]"
|
||||
"ZIP_LZMA:[ZIP file format with LZMA compression]"
|
||||
"ZIP_LZMA2:[ZIP file format with LZMA2 compression]"
|
||||
"ZIP_STORE:[ZIP file format without compression]"
|
||||
"ZIP_ZSTD:[ZIP file format with Zstandard compression]"
|
||||
)
|
||||
|
||||
_describe -t 'generators' generator generators
|
||||
}
|
||||
|
||||
_cpack_help_manuals() {
|
||||
local -a manuals=(${(f)"$(cpack --help-manual-list 2>/dev/null | sed 's/([0-9][0-9]*)$//' )"})
|
||||
_values 'manual' $manuals
|
||||
}
|
||||
|
||||
_cpack_help_commands() {
|
||||
local -a commands=(${(f)"$(cpack --help-command-list 2>/dev/null )"})
|
||||
_values 'command' $commands
|
||||
}
|
||||
|
||||
_cpack_help_modules() {
|
||||
local -a modules=(${(f)"$(cpack --help-module-list 2>/dev/null )"})
|
||||
_values 'module' $modules
|
||||
}
|
||||
|
||||
_cpack_help_policies() {
|
||||
local -a policies=(${(f)"$(cpack --help-policy-list 2>/dev/null )"})
|
||||
_values 'policy' $policies
|
||||
}
|
||||
|
||||
_cpack_help_properties() {
|
||||
local -a properties=(${(f)"$(cpack --help-property-list 2>/dev/null )"})
|
||||
_values 'property' $properties
|
||||
}
|
||||
|
||||
_cpack_help_variables() {
|
||||
local -a variables=(${(f)"$(cpack --help-variable-list 2>/dev/null )"})
|
||||
_values 'variable' $variables
|
||||
}
|
||||
|
||||
_cpack "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
#compdef cpanm
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cpanm 1.7049 (https://github.com/miyagawa/cpanminus)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments -n -C -s \
|
||||
'(-i --install)'{-i,--install}'[Install the modules]' \
|
||||
'--self-upgrade[Upgrades itself]' \
|
||||
'--info[Displays the distribution information in "AUTHOR/Dist-Name-ver.tar.gz" format in the stdout]' \
|
||||
"--installdeps[Installs the dependencies of the target distribution but won't build itself]" \
|
||||
'--look[Download and unpack the distribution and then open the directory with your shell]' \
|
||||
'(- *)'{-h,--help}'[Display the help message]' \
|
||||
'(- *)'{-V,--version}'[Display the version number]' \
|
||||
'(-f --force)'{-f,--force}'[Force install modules even when testing failed]' \
|
||||
'(-n --notest)'{-n,--notest}'[Skip the testing of modules]' \
|
||||
'--test-only[Run the tests only]' \
|
||||
'(-S --sudo)'{-S,--sudo}'[Switch to the root user with "sudo" when installing modules]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Makes the output verbose]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Makes the output even more quiet than the default]' \
|
||||
'(-l --local-lib)'{-l,--local-lib}'[Sets the local::lib compatible path to install modules to]' \
|
||||
'(-L --local-lib-contained)'{-L,--local-lib-contained}'[Same with "--local-lib" but with --self-contained set]' \
|
||||
'--self-contained[When examining the dependencies, assume no non-core modules are installed on the system]' \
|
||||
"--exclude-vendor[Don't include module installed under the 'vendor' paths]" \
|
||||
'--mirror=[Specifies the base URL for the CPAN mirror to use]:mirror' \
|
||||
"--mirror-only[Download the mirror's index file instead of querying the CPAN Meta DB]" \
|
||||
'(-M --from)'{-M,--from}='[Use the given mirror URL and its index as the only source to search and download modules from]' \
|
||||
'--mirror-index[Specifies the file path to "02packages.details.txt" for module search index]' \
|
||||
'--cpanmetadb[Specifies an alternate URI for CPAN MetaDB index lookups]' \
|
||||
'--metacpan[Prefers MetaCPAN API over CPAN MetaDB]' \
|
||||
'--cpanfile=[Specified an alternate path for cpanfile]: :_files' \
|
||||
"--prompt[Prompts when a test fails so that you can skip, force install, retry or look what's going wrong]" \
|
||||
'--dev[Search for a newer developer release as well]' \
|
||||
'--reinstall[Reinstall even if your locally installed version is latest]' \
|
||||
'--interactive[Makes the configuration interactive]' \
|
||||
'(--pp --pureperl)'{--pp,--pureperl}'[Prefer Pure perl build of modules]' \
|
||||
'--with-recommends[Installs dependencies declared as "recommends"]' \
|
||||
'--with-suggests[Installs dependencies declared as "suggests"]' \
|
||||
'--with-develop[Install develop phase dependencies in "cpanfile"]' \
|
||||
'--with-configure[Installs configure phase dependencies in "cpanfile"]' \
|
||||
'--with-feature=[Specifies the feature to enable]::feature' \
|
||||
'--without-feature=[Not specifies the feature to enable]::feature' \
|
||||
'--with-all-feature[Specifies the all features to enable]' \
|
||||
'--configure-timeout=[Specify the timeout length to wait for the configure]' \
|
||||
'--build-timeout=[Specify the timeout length to wait for the build]' \
|
||||
'--test-timeout=[Specify the timeout length to wait for the test]' \
|
||||
'--configure-args=[Pass arguments for configure]:args' \
|
||||
'--build-args=[Pass arguments for build]:args' \
|
||||
'--test-args=[Pass arguments for test]:args' \
|
||||
'--install-args=[Pass arguments for install]:args' \
|
||||
'--scandeps[Scans the dependencies of given modules and output the tree in a text format]' \
|
||||
'--format=[Determines what format to display the scanned dependency tree]:fmt:(tree json yaml dists)' \
|
||||
'--save-dist=[Specifies the optional directory path to copy downloaded tarballs]: :_files -/' \
|
||||
'(-U --uninstall)'{-U,--uninstall}'[Uninstalls a module from the library path]' \
|
||||
'--cascade-search[Specifies whether to cascade search when you specify multiple mirrors]' \
|
||||
'--skip-installed[Skip install if specified module is already installed]' \
|
||||
'--skip-satisfies[Skip install if specified module and version is already installed]' \
|
||||
'--verify[Verify the integrity of distribution files]' \
|
||||
'--report-perl-version[Report perl version as port of User-Agent]' \
|
||||
'--auto-cleanup[Specifies the number of days in which cpanm work directories expire]::days' \
|
||||
'--man-pages[Generate man pages for executables(man1) and libraries(man3)]' \
|
||||
'--lwp[Uses LWP module to download stuff over HTTP]' \
|
||||
'--wget[Uses GNU Wget(if available) to download stuff]' \
|
||||
'--curl[Uses cURL(if available) to download stuff]' \
|
||||
&& return 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
#compdef cpm
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cpm 0.998003 (https://github.com/skaji/cpm)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_cpm() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Show help message]' \
|
||||
'(- *)--version[Show version and exit]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Enable debug mode]' \
|
||||
'1: :_cpm_subcommands' \
|
||||
'*::arg:->args' && ret=0
|
||||
|
||||
case $state in
|
||||
(args)
|
||||
case $words[1] in
|
||||
(install)
|
||||
_arguments \
|
||||
'(-w --workers)'{-w,--workers=}'[number of workers(default=5)]:num' \
|
||||
'(-L --local-lib-contained)'{-L,--local-lib-contained=}'[directory to install module into, default=local/]: :_files -/' \
|
||||
'(-g --global)'{-g,--global}'[install modules into current @INC instead of local/]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[verbose mode]' \
|
||||
'(--prebuilt --no-prebuilt)--prebuilt[save builds for CPAN distributions and later install the prebuilts if available]' \
|
||||
'(--prebuilt --no-prebuilt)--no-prebuilt[no prebuilt]' \
|
||||
'--target-perl=[install modules as if version is your perl is VERSION]:version' \
|
||||
'--mirror[base URL for the CPAN mirror to use]:url' \
|
||||
'(--pp --pureperl-only)'{--pp,--pureperl-only}'[prefer pureperl only build]' \
|
||||
'(--static-install --no-static-install)--static-install[enable the static install]' \
|
||||
'(--static-install --no-static-install)--no-static-install[disable the static install]' \
|
||||
\*{-r,--resolver=}'[specify resolvers]:resolver' \
|
||||
'--no-defult-resolvers[Use default resolvers if you specify --resolver option]' \
|
||||
'--reinstall[reinstall the distribution even if you already have the latest version installed]' \
|
||||
'--dev[resolve TRIAL distributions too]' \
|
||||
'(--color --no-color)--color[turn on color output]' \
|
||||
'(--color --no-color)--no-color[turn off color output]' \
|
||||
'(--test --no-test)--test[run test cases]' \
|
||||
'(--test --no-test)--no-test[do not run test cases]' \
|
||||
'--man-pages[generate man pages]' \
|
||||
'(--retry --no-retry)--retry[retry configure/build/test/install if fails]' \
|
||||
'(--retry --no-retry)--no-retry[do not retry]' \
|
||||
'--show-build-log-on-failure[show build.log on failure]' \
|
||||
'--configure-timeout=[specify configure timeout second]:sec' \
|
||||
'--build-timeout=[specify build timeout second]:sec' \
|
||||
'--test-timeout=[specify test timeout second]:sec' \
|
||||
'(--show-progress --no-show-progress)--show-progress[show progress]' \
|
||||
'(--show-progress --no-show-progress)--no-show-progress[do not show progress]' \
|
||||
'--cpmfile=[specify cpmfile path]: :_files' \
|
||||
'--cpanfile=[specify cpanfile path]: :_files' \
|
||||
'--metafile=[specify META file path]: :_files' \
|
||||
'--snapshot=[specify cpanfile.snapshot path]: :_files' \
|
||||
'(- *)'{-V,--version}'[show version]' \
|
||||
'(- *)'{-h,--help}'[show help message]' \
|
||||
'*--feature=[specify the feature to enable in cpanfile]:feature' \
|
||||
'*:modules' \
|
||||
&& ret=0
|
||||
;;
|
||||
(*)
|
||||
ret=0
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_cpm_subcommands] )) ||
|
||||
_cpm_subcommands() {
|
||||
local -a commands=(
|
||||
"install:Install modules"
|
||||
"help:Show help"
|
||||
"version:Show version"
|
||||
)
|
||||
|
||||
_describe -t subcommands "subcommands" commands
|
||||
}
|
||||
|
||||
_cpm "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
#compdef cppcheck
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2019 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cppcheck -- a tool for static C/C++ code analysis (https://cppcheck.sourceforge.io/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Georgy Komarov (https://github.com/jubnzv)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Notes
|
||||
# -----
|
||||
#
|
||||
# Created for Cppcheck version 2.17.1 (https://github.com/danmar/cppcheck)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_cppcheck_files() {
|
||||
_path_files -/ -g "*.(c|cpp|cxx|h|hpp|C)"
|
||||
}
|
||||
|
||||
_cppcheck() {
|
||||
local check_ids='(all warning style performance portability information unusedFunction missingInclude)'
|
||||
local platforms='(unix32 unix64 win32A win32W win64 avr8 elbrus-e1cp pic8 pic8-enhanced pic16 mips32 native unspecified)'
|
||||
local coding_standards='(normal autosar cert-c-2016 cert-cpp-2016 misra-c-2012 misra-c-2023 misra-cpp-2008 misra-cpp-2023)'
|
||||
|
||||
_arguments \
|
||||
"--addon=[Execute addon]" \
|
||||
"--addon-python=[Specify the python interpreter]: :_files" \
|
||||
"--cppcheck-build-dir=[Analysis output directory]:directory:_files -/" \
|
||||
"--check-config[Check cppcheck configuration]" \
|
||||
"--check-level=[Configure how much valueflow analysis you want]:level:(reduced normal exhaustive)" \
|
||||
"--check-library[Show information when library files have incomplete info]" \
|
||||
"--checkers-report=[Write a report of all the active checkers to the given file]:file:_files" \
|
||||
"--clang=[Use clang parser instead of the builtin Cppcheck parser]: :_files" \
|
||||
"--config-exclude=[Path to be excluded from configuration checking]:directory:_files -/" \
|
||||
"--config-exclude-files=[A file that contains a list of config-excludes]:file:_files" \
|
||||
"--doc[Print a list of all available checks]" \
|
||||
"*--disable=[Disable individual checks]:id:$check_ids" \
|
||||
"--dump[Dump xml data for each translation unit]" \
|
||||
"-D[Define preprocessor symbol]" \
|
||||
"-E[Print preprocessor output on stdout and don't do any further processing]" \
|
||||
"--enable=[Enable additional checks]:id:$check_ids" \
|
||||
"--error-exitcode=[Integer to return if errors are found]" \
|
||||
"--errorlist[Print a list of all the error messages in XML format]" \
|
||||
"--exitcode-suppressions=[Used when certain messages should be displayed but should not cause a non-zero exitcode]:_files" \
|
||||
"*--file-filter=[Analyze only those files matching the given filter str]:filter" \
|
||||
"--file-list=[Specify the files to check in a text file]:file:_files" \
|
||||
"(-f --force)"{-f,--force}"[Force checking of all configurations in files]" \
|
||||
"(--fsigned-char --funsigned-char)--fsigned-char[Treat char type as signed]" \
|
||||
"(--fsigned-char --funsigned-char)--funsigned-char[Treat char type as unsigned]" \
|
||||
"(- 1 *)"{-h,--help}"[Print help]" \
|
||||
"-I[A file that contains a list of config-excludes]:directory:_files -/" \
|
||||
"--include-file=[Specify directory paths to search for included header files in a text file]:file:_files" \
|
||||
"--include=[Force inclusion of a file before the checked file]:file:_files" \
|
||||
"-i[Give a source file or source file directory to exclude from the check]:directory or file:_files" \
|
||||
"--inconclusive[Report even though the analysis is inconclusive]" \
|
||||
"--inline-suppr[Enable inline suppressions]" \
|
||||
"-j[Number of threads to do the checking simultaneously]::num" \
|
||||
"-l[No new threads should be started if the load average is exceeds this value]::load_avg" \
|
||||
{-x,--language=}"[Forces cppcheck to check all files as the given language]:language:(c c++)" \
|
||||
"--library=[Load config file that contains information about types and functions]:config:_files" \
|
||||
"--max-configs=[Maximum number of configurations to check in a file]" \
|
||||
"--max-ctu-depth=[Maximum depth in whole program analysis]:num" \
|
||||
"--output-file=[File to save results]:file:_files" \
|
||||
"--output-format=[Specify the output format]:format:(text sarif xml)" \
|
||||
"--platform=[Specified platform specific types and sizes]:platform:$platforms" \
|
||||
"--plist-output=[Generate Clang-plist output files in folder]:file:_files" \
|
||||
"--project=[Run Cppcheck on project]:file:_files" \
|
||||
"--project-configuration=[Limit the configuration cppcheck should check]:configuration" \
|
||||
"(-q --quiet)"{-q,--quiet}"[Do not show progress reports]" \
|
||||
{-rp,--relative-paths}"=[Use relative paths in output (separated with ;)]:file:_files" \
|
||||
"--report-progress[Report progress messages while checking a file]" \
|
||||
"--report-type=[Add guideline and classification fields for specified coding standard]:standard:$coding_standards" \
|
||||
"--rule=[Match regular expression]:rule" \
|
||||
"--rule-file=[Use given rule file]:file:_files" \
|
||||
"--showtime=[show timing information]:type:(none file file-total summary top5_file top5_summary top5)" \
|
||||
"--std=[Set standard]:std:(c89 c99 c11 c++03 c++11 c++14 c++17 c++20)" \
|
||||
"--suppress=[Suppress warnings (format: \[error id\]:\[filename\]:\[line\])]" \
|
||||
"--suppressions-list=[Suppress warnings listed in the file]:file:_files" \
|
||||
"--suppress-xml=[Suppress warnings listed in a xml file]:file:_files" \
|
||||
"--template=[Format the error messages]" \
|
||||
"--template-location=[Format the error message location]" \
|
||||
"*-U[Undefine preprocessor symbol]:symbol" \
|
||||
"(-v --verbose)"{-v,--verbose}"[Output more detailed error information]" \
|
||||
"--version[Print out version number]" \
|
||||
"--xml[Write results in xml format to stderr]" \
|
||||
"*: :_cppcheck_files"
|
||||
}
|
||||
|
||||
_cppcheck "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
#compdef ctest
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for ctest 4.3.0 (https://kitware.com/cmake)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_ctest() {
|
||||
local ret=1
|
||||
|
||||
_arguments \
|
||||
'--preset=[Read arguments from a test preset]:preset' \
|
||||
'--list-presets[List available test presets]' \
|
||||
'(-C --build-config)'{-C,--build-config}'[Choose configuration to test]:config' \
|
||||
'--progress[Enable short progress output from tests]' \
|
||||
'(-V --verbose -VV --extra-verbose)'{-V,--verbose}'[Enable verbose output from tests]' \
|
||||
'(-V --verbose -VV --extra-verbose)'{-VV,--extra-verbose}'[Enable more verbose output from tests]' \
|
||||
'--debug[Displaying more verbose internals of CTest]' \
|
||||
'--output-on-failure[Output anything outputted by the test program if the test should fail]' \
|
||||
'--stop-on-failure[Stop running the tests after one has failed]' \
|
||||
'--test-output-size-passed[Limit the output for passed tests to <size> bytes]:size' \
|
||||
'--test-output-size-failed[Limit the output for failed tests to <size> bytes]:size' \
|
||||
'--test-output-truncation[Truncate mode]:mode:(tail middle head)' \
|
||||
'-F[Enable failover]' \
|
||||
'(-j --parallel)'{-j,--parallel}'[Run tests in parallel]::level' \
|
||||
'(-Q --quiet)'{-Q,--quiet}'[Make ctest quiet]' \
|
||||
'(-O --output-log)'{-O,--output-log}'[Output to log file]:file:_files' \
|
||||
'--output-junit[Output test results to JUnit XML file]:file:_files' \
|
||||
'(-N --show-only)'{-N,--show-only}'[Disable actual execution of tests]::format:(format human json-v1)' \
|
||||
\*{-L,--label-regex}'[Run tests with labels matching regular expression]:regex' \
|
||||
\*{-R,--tests-regex}'[Run tests matching regular expression]:regex' \
|
||||
\*{-E,--exclude-regex}'[Exclude tests matching regular expression]:regex' \
|
||||
\*{-LE,--label-exclude}'[Exclude tests with labels matching regular expression]:regex' \
|
||||
\*{-FA,--fixture-exclude-any}'[Do not automatically add any tests for fixtures matching regular expression]:regex' \
|
||||
\*{-FS,--fixture-exclude-setup}'[Do not automatically add setup tests for fixtures matching regular expression]:regex' \
|
||||
\*{-FC,--fixture-exclude-cleanup}'[Do not automatically add cleanup tests for fixtures matching regular expression]:regex' \
|
||||
'(--dashboard)'{-D,--dashboard}'[Execute dashboard test]:dashboard' \
|
||||
'*-D[Define a variable for script mode]:var' \
|
||||
'(-M --test-model)'{-M,--test-model}'[Set the model for a dashboard]:model' \
|
||||
'(-T --test-action)'{-T,--test-action}'[Set the dashboard action to perform]' \
|
||||
'--group[Specify what build group on the dashboard]:group' \
|
||||
\*{-S,--script,-Sp,--script-new-process}'[Execute a dashboard for a configuration]:script:_files' \
|
||||
'(-A --add-notes)'{-A,--add-notes}'[Add a notes file with submission]:file:_files' \
|
||||
'(-I --test-information)'{-I,--test-information}'[Run a specific number of tests by number]:number' \
|
||||
'(-U --union)'{-U,--union}'[Take the Union of -I and -R]' \
|
||||
'--rerun-failed[Run only the tests that failed previously]' \
|
||||
'--tests-from-file[Run the tests listed in the given file]:file:_files' \
|
||||
'--exclude-from-file[Run tests except those listed in the given file]:file:_files' \
|
||||
'--repeat-until-fail[Repeat each test to run <n> times without failing]:n' \
|
||||
'--repeat[Repeat each test to run <n> times]:condition-n:(until-fail: until-pass: after-timeout:)' \
|
||||
'--max-width[Set the max width for a test name to output]' \
|
||||
'--interactive-debug-mode[Set the interactive mode to 0 or 1]:n:(0 1)' \
|
||||
'--resource-spec-file[Set the resource spec file to use]:file:_files' \
|
||||
'--no-label-summary[Disable timing summary information for labels]' \
|
||||
'--no-subproject-summary[Disable timing summary information for subprojects]' \
|
||||
'--test-dir[Specify the directory in which to look for tests]:dir:_files -/' \
|
||||
'--build-and-test[Configure, build and run a test]' \
|
||||
'*--build-target[Specify a specific target to build]:target' \
|
||||
'--build-nocmake[Run the build without running cmake first]' \
|
||||
'--build-run-dir[Specify directory to run programs from]:dir:_files -/' \
|
||||
'--build-two-config[Run CMake twice]' \
|
||||
'--build-exe-dir[Specify the directory for the executable]:dir:_files -/' \
|
||||
'--build-generator[Specify the generator to use]:generator' \
|
||||
'--build-generator-platform[Specify the generator-specific platform]:generator_platform' \
|
||||
'--build-generator-toolset[Specify the generator-specific toolset]:build_toolset' \
|
||||
'--build-project[Specify the name of the project to build]:project' \
|
||||
'--build-makeprogram[Specify the make program to use]:make:_files' \
|
||||
'--build-noclean[Skip the make clean step]' \
|
||||
'--build-config-sample[A sample executable to use to determine the configuration]:sample' \
|
||||
'*--build-options[Add extra options to the build step]' \
|
||||
'--test-command[The test to run with the --build-and-test-option]:command' \
|
||||
'--test-timeout[The time limit in seconds]:timeout' \
|
||||
'--test-load[CPU load threshold for starting new parallel tests]:threshold' \
|
||||
'--tomorrow-tag[starts with next day tag]' \
|
||||
'--overwrite[Overwrite CTest configuration option]' \
|
||||
'--extra-submit[Submit extra files to the dashboard]:file:_files' \
|
||||
'*--http-header[Append HTTP header when submitting]:header' \
|
||||
'--schedule-random[Use a random order for scheduling tests]' \
|
||||
'--schedule-random-seed[Override seed for random order of tests]:seed' \
|
||||
'--submit-index[Submit individual dashboard tests with specific index]:index' \
|
||||
'--timeout[Set the default test timeout]:timeout' \
|
||||
'--stop-time[Set a time at which all tests should stop running]:time' \
|
||||
'--http1.0[Submit using HTTP 1.0]' \
|
||||
'--no-compress-output[Do not compress test output when submitting]' \
|
||||
'--print-labels[Print all available test labels]' \
|
||||
'--no-tests=[Regard no tests]:type:(error ignore)' \
|
||||
'(- *)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]' \
|
||||
'(- *)'{--version,-version}'[Print version number and exit]' \
|
||||
'(- *)--help-full[Print all help manuals and exit]' \
|
||||
'(- *)--help-manual[Print one help manual and exit]:manual:_ctest_help_manuals' \
|
||||
'(- *)--help-manual-list[List help manuals available and exit]' \
|
||||
'(- *)--help-command[Print help for one command and exit]:command:_ctest_help_commands' \
|
||||
'(- *)--help-command-list[List commands with help available and exit]' \
|
||||
'(- *)--help-commands[Print cmake-commands manual and exit]' \
|
||||
'(- *)--help-module[Print help for one module and exit]:module:_ctest_help_modules' \
|
||||
'(- *)--help-module-list[List modules with help available and exit]' \
|
||||
'(- *)--help-modules[Print cmake-modules manual and exit]' \
|
||||
'(- *)--help-policy[Print help for one policy and exit]:policy:_ctest_help_policies' \
|
||||
'(- *)--help-policy-list[List policies with help available and exit]' \
|
||||
'(- *)--help-policies[Print cmake-policies manual and exit]' \
|
||||
'(- *)--help-property[Print help for one property and exit]:property:_ctest_help_properties' \
|
||||
'(- *)--help-property-list[List properties with help available and exit]' \
|
||||
'(- *)--help-properties[Print cmake-properties manual and exit]' \
|
||||
'(- *)--help-variable[Print help for one variable and exit]:variable:_ctest_help_variables' \
|
||||
'(- *)--help-variable-list[List variables with help available and exit]' \
|
||||
'(- *)--help-variables[Print cmake-variables manual and exit]' \
|
||||
&& ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_ctest_help_manuals() {
|
||||
local -a manuals=(${(f)"$(ctest --help-manual-list 2>/dev/null | sed 's/([0-9][0-9]*)$//' )"})
|
||||
_values 'manual' $manuals
|
||||
}
|
||||
|
||||
_ctest_help_commands() {
|
||||
local -a commands=(${(f)"$(ctest --help-command-list 2>/dev/null )"})
|
||||
_values 'command' $commands
|
||||
}
|
||||
|
||||
_ctest_help_modules() {
|
||||
local -a modules=(${(f)"$(ctest --help-module-list 2>/dev/null )"})
|
||||
_values 'module' $modules
|
||||
}
|
||||
|
||||
_ctest_help_policies() {
|
||||
local -a policies=(${(f)"$(ctest --help-policy-list 2>/dev/null )"})
|
||||
_values 'policy' $policies
|
||||
}
|
||||
|
||||
_ctest_help_properties() {
|
||||
local -a properties=(${(f)"$(ctest --help-property-list 2>/dev/null )"})
|
||||
_values 'property' $properties
|
||||
}
|
||||
|
||||
_ctest_help_variables() {
|
||||
local -a variables=(${(f)"$(ctest --help-variable-list 2>/dev/null )"})
|
||||
_values 'variable' $variables
|
||||
}
|
||||
|
||||
_ctest "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
#compdef dad
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dad a command line manager of aria2 daemon. (https://github.com/baskerville/diana).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Jindřich Pilař (https://github.com/JindrichPilar)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_dad() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
|
||||
local -a commands=(
|
||||
"start:Start aria2c daemon"
|
||||
"stop:Stop aria2c daemon"
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)'-h"[Show help and exit]" \
|
||||
"-d[Set download dir]:download_dir:->val" \
|
||||
"-s[Set secret token]:secret_token:->val" \
|
||||
"-u[Set aria2c username]:username:->val" \
|
||||
"-p[Set aria2c password]:password:->val" \
|
||||
'1:cmd:->cmds' \
|
||||
'*: :->args'
|
||||
|
||||
case "$state" in
|
||||
(cmds)
|
||||
_describe -t commands 'commands' commands
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_dad
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,739 @@
|
|||
#compdef dart
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2023 Github zsh-users - https://github.com/zsh-users
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dart 3.11.0 (https://dart.dev/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_dart() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments -C -A "-*" \
|
||||
'(-v --verbose)'{-v,--verbose}'[Show additional command output]' \
|
||||
'(- *)--version[Print the Dart SDK version]' \
|
||||
'(--enable-analytics --disable-analytics --suppress-analytics)--enable-analytics[Enable analytics]' \
|
||||
'(--enable-analytics --disable-analytics --suppress-analytics)--disable-analytics[Disable analytics]' \
|
||||
'(--enable-analytics --disable-analytics --suppress-analytics)--suppress-analytics[Disallow analytics for this "dart *" run without changing the analytics configuration]' \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_subcommands' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(args)
|
||||
case $words[1] in
|
||||
(help)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_subcommands' \
|
||||
&& ret=0
|
||||
;;
|
||||
(analyze)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'--fatal-infos[Treat info level issues as fatal]' \
|
||||
'(--no-fatal-warnings --fatal-warnings)--fatal-warnings[Treat warnings level issue as fatal]' \
|
||||
'(--no-fatal-warnings --fatal-warnings)--no-fatal-warnings[Do not treat warnings level issue as fatal]' \
|
||||
'*: :_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(compile)
|
||||
_dart_compile && ret=0
|
||||
;;
|
||||
(create)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-t --template)'{-t,--template}'[The project template to use]:template:(cli console package server-shelf web)' \
|
||||
'(--no-pub --pub)--pub[Run "pub get" after the project has been created]' \
|
||||
'(--no-pub --pub)--no-pub[Do not run "pub get" after the project has been created]' \
|
||||
'--force[Force project generation even if the target directory already exists]' \
|
||||
'*: :_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(devtools)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(- *)--version[Prints the DevTools version]' \
|
||||
'--host=[Hostname to serve DevTools on(defaults to localhost)]:host' \
|
||||
'--port=[Port to serve DevTools on, specify 0 to automatically use any available port(defaults to 9100)]:port' \
|
||||
'--dtd-uri=[A URI pointing to a Dart Tooling Daemon]:uri' \
|
||||
'(--no-launch-browser --launch-browser)--launch-browser[Launches DevTools in a browser immediately at start]' \
|
||||
'(--no-launch-browser --launch-browser)--no-launch-browser[Do not launches DevTools in a browser immediately at start]' \
|
||||
'--machine[Sets output format to JSON for consumption in tools]' \
|
||||
'--record-memory-profile=[Start devtools headlessly and write memory profiling samples to the indicated file]:file:_files' \
|
||||
'--app-size-base=[Path to the base app size file used for app size]' \
|
||||
'(--no-disable-cors --disable-cors)--disable-cors[Disable CORS]' \
|
||||
'(--no-disable-cors --disable-cors)--no-disable-cors[Do not disable CORS]' \
|
||||
'*:server_uri :' \
|
||||
&& ret=0
|
||||
;;
|
||||
(doc)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-o --output)'{-o,--output=}'[Configuration the output directory(defaults to "doc/api")]:dir:_files -/' \
|
||||
'(--dry-run)--validate-links[Display warnings for broken links]' \
|
||||
'(--validate-links)--dry-run[Try to generate the docs without saving them]' \
|
||||
'*:dir:_files -/' \
|
||||
&& ret=0
|
||||
;;
|
||||
(fix)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Preview the proposed changes but make no changes]' \
|
||||
'--apply[Apply the proposed changes]' \
|
||||
'--code=[Apply fixes for one or more diagnostics codes]:codes' \
|
||||
'*: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(format)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Show all options and flags with --help]' \
|
||||
'(-o --output)'{-o,--output}'[Set where to write formatted output]:format:_dart_format_output' \
|
||||
'--show[Set which filenames to print]:show type:(all changed none)' \
|
||||
'--summary[Show the specified summary after formatting]:summary type:(line none profile)' \
|
||||
'--set-exit-if-changed[Return exit code 1 if there are any formatting changes]' \
|
||||
'--page-width[Try to keep lines no longer than this(defaults to 80)]:width' \
|
||||
'--trailing-commas[How trailing commas in input affect formatting]:style:(automate preserve)' \
|
||||
'(-i --indent)'{-i,--indent}'[Add this many spaces of leading indentation]' \
|
||||
'--follow-links[Follow links to files and directories]' \
|
||||
'(- *)--version[Show dart_style version]' \
|
||||
'--enable-experiment[Enable one or more experimental features]:features' \
|
||||
'--selection[Track selection through formatting]:selection' \
|
||||
'--stdin-name[Use this path in error messages when input is read from stdin]:name' \
|
||||
'*:file_or_directory:_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(info)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(--no-remove-file-paths --remove-file-paths)--remove-file-paths[Remove file paths in displayed information]' \
|
||||
'(--no-remove-file-paths --remove-file-paths)--no-remove-file-paths[Do not remove file paths in displayed information]' \
|
||||
'*: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(pub)
|
||||
_dart_pub && ret=0
|
||||
;;
|
||||
(run)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-r --resident)'{-r,--resident}'[Enable faster startup times with the resident frontend compiler]' \
|
||||
'--resident-compiler-info-file[The path to an info file to use to communicate with a resident frontend compiler]:file:_files' \
|
||||
'--observe=[Specify debug port and bind address]:port_address' \
|
||||
'--enable-vm-service=[Enable the VM service and listens on the specified port for connections(default port 8181)]:port_address' \
|
||||
'(--serve-devtools --no-serve-devtools)--serve-devtools[Serves an instance of the Dart DevTools debugger and profiler]' \
|
||||
'(--serve-devtools --no-serve-devtools)--no-serve-devtools[Do not serve an instance of the Dart DevTools debugger and profiler]' \
|
||||
'--pause-isolates-on-exit[Pause isolates on exit when running with --enable-vm-service]' \
|
||||
'--pause-isolates-on-unhandled-exceptions[Pause isolates when an unhandled exception is encountered when running with --enable-vm-service]' \
|
||||
'--warn-on-pause-with-no-debugger[Print a warning when an isolate pauses with no attached debugger when running with --enable-vm-service]' \
|
||||
'--timeline-streams=[Enables recording for specific timeline streams]:stream:_dart_run_timeline_streams' \
|
||||
'--pause-isolates-on-start[Pause isolates on start when running with --enable-vm-service]' \
|
||||
'--profile-microtasks[Record information about each microtask]' \
|
||||
'(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]' \
|
||||
'(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]' \
|
||||
'--timeline-recorder=[Selects the timeline recorder to use]:recorder:(none ring endless startup systrace file callback)' \
|
||||
'--verbosity[Sets the verbosity level of the compilation]:level:(all error info warning)' \
|
||||
'*'{-d,--define=}'[Define an environment declaration]:key_value:' \
|
||||
'--disable-service-auth-codes[Disables the requirement for an authentication code]' \
|
||||
'--enable-service-port-fallback[Use 0 if binding port is failed]' \
|
||||
'--root-certs-file=[The path to a file containing the trusted root certificates]:file:_files' \
|
||||
'--root-certs-cache=[The path to a cache directory containing the trusted root certificates]:file:_files -/' \
|
||||
'--trace-loading[Enable tracing of library and script loading]' \
|
||||
'--packages=[The path to the package resolution configuration file]:file:_files'\
|
||||
'--write-service-info=[Outputs information necessary to connect to the VM service]:service_info:_files' \
|
||||
'(--no-dds --dds)--dds[Use the Dart Development Service for enhanced debugging functionality]' \
|
||||
'(--no-dds --dds)--no-dds[Not use the Dart Development Service for enhanced debugging functionality]' \
|
||||
'(--no-serve-observatory --serve-observatory)--serve-observatory[Enable hosting Observatory throught the VM service]' \
|
||||
'(--no-serve-observatory --serve-observatory)--no-serve-observatory[Disable hosting Observatory throught the VM service]' \
|
||||
'(--no-print-dtd --print-dtd)--print-dtd[Prints connection details for the Dart Tooling Daemon]' \
|
||||
'(--no-print-dtd --print-dtd)--no-print-dtd[Not print connection details for the Dart Tooling Daemon]' \
|
||||
'--enable-experiment=[Enable one or more experimental features]:features:_dart_run_enable_experiment' \
|
||||
'*: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(test)
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(- *)--version[Show the package:test version]' \
|
||||
'*'{-n,--name}'[A substring of the name of the test to run]:name' \
|
||||
'*'{-N,--plain-name}'[A plain-text substring of the name of the test to run]:plain_name' \
|
||||
'*'{-t,--tags}'[Run only tests with all of the specified tags]:tag' \
|
||||
'*'{-x,--exclude-tags}'[Do not run tests with any of the specified tags]:tag' \
|
||||
'--run-skipped[Run skipped tests instead of skipping them]' \
|
||||
'(-p --platform)'{-p,--platform}'[The platform on which to run the tests]:platform:(vm chrome firefox edge node experimental-chrome-wasm)' \
|
||||
'(-c --compiler)'{-c,--compiler}'[The compiler to use to run tests]:compiler:(dart2js dart2wasm exe kernel source)' \
|
||||
'(-P --preset)'{-P,--preset}'[The configuration preset to use]:preset' \
|
||||
'(-j --concurrency)'{-j,--concurrency}'[The number of concurrent test suites run(defaults to 1)]:concurrency' \
|
||||
'--total-shards[The total number of invocations of the test runner being run]:number' \
|
||||
'--shard-index[The index of this test runner invocation]:index' \
|
||||
'(--ignore-timeouts --timeout)--timeout[The default test timeout]:timeout' \
|
||||
'(--ignore-timeouts --timeout)--ignore-timeouts[Ignore all timeouts]' \
|
||||
'--pause-after-load[Pause for debugging before any tests execute]' \
|
||||
'--debug[Run the VM and Chrome tests in debug mode]' \
|
||||
'--coverage=[Gather coverage and output it to the specified directory]:dir:_files -/' \
|
||||
'(--no-chain-stack-traces --chain-stack-traces)--chain-stack-traces[Use chained stack traces to provide greater exception]' \
|
||||
'(--no-chain-stack-traces --chain-stack-traces)--no-chain-stack-traces[Do not use chained stack traces to provide greater exception]' \
|
||||
'--no-retry[Do not rerun tests that have retry set]' \
|
||||
'--test-randomize-ordering-seed[Use the specified seed to randomize the execution order of test cases]:seed' \
|
||||
'(--no-fail-test --fail-test)--fail-test[Stop running tests after the first failure]' \
|
||||
'(--no-fail-test --fail-test)--no-fail-test[Do not stop running tests after the first failure]' \
|
||||
'(-r --reporter)'{-r,--reporter=}'[Set how to print test results]:reporter:_dart_test_reporter' \
|
||||
'--file-reporter[Enable an additional reporter writing test results to a file]:reporter_file' \
|
||||
'--verbose-trace[Emit stack traces with core library frames]' \
|
||||
'--js-trace[Emit raw JavaScript stack traces for browser tests]' \
|
||||
'(--color --no-color)--color[Use terminal colors]' \
|
||||
'(--color --no-color)--no-color[Do not use terminal colors]' \
|
||||
'*: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_compile] )) ||
|
||||
_dart_compile() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_compile_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'(-o --output)'{-o,--output}'[Write the output to file]:output:_files'
|
||||
)
|
||||
|
||||
case $words[1] in
|
||||
(aot-snapshot|exe|jit-snapshot|kernel)
|
||||
opts+=(
|
||||
'--verbosity[Sets the verbosity level of the compilation]:level:(all error info warning)'
|
||||
'(-p --packages)'{-p,--packages=}'[Get package locations from the specified file instead of .dart_tool/package_config.json]:config:_files'
|
||||
)
|
||||
;|
|
||||
(aot-snapshot|exe|jit-snapshot|kernel|wasm)
|
||||
opts+=(
|
||||
'*'{-d,--define=}'[Define an environment declaration]:key_value:'
|
||||
)
|
||||
;|
|
||||
(aot-snapshot|exe|kernel)
|
||||
opts+=(
|
||||
'--depfile=[Path to output Ninja depfile]:file:_files'
|
||||
)
|
||||
;|
|
||||
(aot-snapshot|exe)
|
||||
opts+=(
|
||||
'(-S --save-debugging-info)'{-S,--save-debugging-info=}'[Remove debugging information from the output and save it separately to the specified file]:file:_files'
|
||||
'--target-os[Compile to a specific target operating system]:os:(android fuchsia ios linux macos windows)'
|
||||
)
|
||||
;|
|
||||
(aot-snapshot|wasm)
|
||||
opts+=(
|
||||
'--enable-asserts[Enable assert statements]'
|
||||
)
|
||||
;|
|
||||
(kernel)
|
||||
opts+=(
|
||||
'(--no-link-platform --link-platform)--link-platform[Include the platform kernel in the resulting kernel file]'
|
||||
'(--no-link-platform --link-platform)--no-link-platform[Do not include the platform kernel in the resulting kernel file]'
|
||||
'(--no-embed-sources --embed-sources)--embed-sources[Embed source files in the generated kernel component]'
|
||||
'(--no-embed-sources --embed-sources)--no-embed-sources[Do not embed source files in the generated kernel component]'
|
||||
)
|
||||
;|
|
||||
(wasm)
|
||||
opts+=(
|
||||
'(--no-source-maps --source-maps)--source-maps[Generate a source map file]'
|
||||
'(--no-source-maps --source-maps)--no-source-maps[Not generate a source map file]'
|
||||
)
|
||||
;;
|
||||
(js)
|
||||
opts+=(
|
||||
'-O-[Set the compiler optimization level(defaults to -O1)]:level:(0 1 2 3 4)'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
opts+=('*:entry_point:_files')
|
||||
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_compile_subcommands] )) ||
|
||||
_dart_compile_subcommands() {
|
||||
local -a commands=(
|
||||
"aot-snapshot:Compile Dart to an AOT snapshot"
|
||||
"exe:Compile Dart to a self-contained executable"
|
||||
"jit-snapshot:Compile Dart to a JIT snapshot"
|
||||
"js:Compile Dart to JavaScript"
|
||||
"kernel:Compile Dart to a kernel snapshot"
|
||||
"wasm:Compile Dart to a WebAssembly/WasmGC module"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_format_output] )) ||
|
||||
_dart_format_output() {
|
||||
local -a outputs=(
|
||||
"json:Print code and selection as JSON"
|
||||
"none:Discard output"
|
||||
"show:Print code to terminal"
|
||||
"write:Overwrite formatted files on disk(default)"
|
||||
)
|
||||
_describe -t outputs 'output' outputs "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub] )) ||
|
||||
_dart_pub() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Print detailed logging]' \
|
||||
'(--color --no-color)--color[Use colors in terminal output]' \
|
||||
'(--color --no-color)--no-color[Do not use colors in terminal output]' \
|
||||
'(-C --directory)'{-C,--directory=}'[Run the subcommand in the directory]:dir:_files -/'\
|
||||
'1: :_dart_pub_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
)
|
||||
|
||||
case $words[1] in
|
||||
(add|downgrade|get|publish|remove|upgrade)
|
||||
opts+=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Report what dependencies would change but do not change any]'
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/'
|
||||
'*: :_files'
|
||||
)
|
||||
;|
|
||||
(add|downgrade|get|upgrade)
|
||||
opts+=(
|
||||
'--offline[Use cached packages instead of accessing the network]'
|
||||
)
|
||||
;|
|
||||
(add|get|remove|upgrade)
|
||||
opts+=(
|
||||
'--precompile[Build executables in immediate dependencies]'
|
||||
'--no-example[Do not run "example/" if it exists]'
|
||||
)
|
||||
;|
|
||||
(get)
|
||||
opts+=(
|
||||
'--enforce-lockfile[Enforce pubspec.lock]'
|
||||
)
|
||||
;|
|
||||
(publish)
|
||||
opts+=(
|
||||
'(-f --force)'{-f,--force}'[Publish without confirmation if there are no errors]'
|
||||
'--skip-validation[Publish without validation and resolution]'
|
||||
'--ignore-warnings[Do not treat warnings as fatal]'
|
||||
)
|
||||
;|
|
||||
(upgrade)
|
||||
opts+=(
|
||||
'--tighten[Updates lower bounds in pubspec.yaml to match the resolved version]'
|
||||
'--unlock-transitive[Also upgrades the transitive dependencies of the listed dependencies]'
|
||||
'--major-versions[Upgrades packages to their latest resolvable versions and updates pubspec.yaml]'
|
||||
)
|
||||
;|
|
||||
(bump)
|
||||
_dart_pub_bump && return 0
|
||||
;;
|
||||
(cache)
|
||||
_dart_pub_cache && return 0
|
||||
return 1
|
||||
;;
|
||||
(deps)
|
||||
opts+=(
|
||||
'(-s --style)'{-s,--style}'[How output should be displayed]:style:(compact tree list)'
|
||||
'(--dev --no-dev)--dev[Include dev dependencies]'
|
||||
'(--dev --no-dev)--no-dev[Do not include dev dependencies]'
|
||||
'--executables[List all available executables]'
|
||||
'--json[Output dependency information in a json format]'
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/'
|
||||
)
|
||||
;;
|
||||
(global)
|
||||
_dart_pub_global && return 0
|
||||
return 1
|
||||
;;
|
||||
(outdated)
|
||||
opts+=(
|
||||
'(--no-dependency-overrides --dependency-overrides)--dependency-overrides[Show resolutions with "dependency_overrides"]'
|
||||
'(--no-dependency-overrides --dependency-overrides)--no-dependency-overrides[Do not show resolutions with "dependency_overrides"]'
|
||||
'(--no-dev-dependencies --dev-dependencies)--dev-dependencies[Take dev dependencies into account]'
|
||||
'(--no-dev-dependencies --dev-dependencies)--no-dev-dependencies[Do not take dev dependencies into account]'
|
||||
'--json[Output the results using a json format]'
|
||||
'(--no-prereleased --prereleases)--prereleases[Include prereleases in latest version]'
|
||||
'(--no-prereleased --prereleases)--no-prereleases[Do not include prereleases in latest version]'
|
||||
'(--no-show-all --show-all)--show-all[Include dependencies that are already fulfilling --mode]'
|
||||
'(--no-show-all --show-all)--no-show-all[Do not include dependencies that are already fulfilling --mode]'
|
||||
'(--no-transitive --transitive)--transitive[Show transitive dependencies]'
|
||||
'(--no-transitive --transitive)--no-transitive[Do not show transitive dependencies]'
|
||||
'(-C --directory)'{-C,--directory=}'[Run this in the directory]:dir:_files -/' )
|
||||
;;
|
||||
(token)
|
||||
_dart_pub_token && return 0
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_subcommands] )) ||
|
||||
_dart_pub_subcommands() {
|
||||
local -a commands=(
|
||||
"add:Add dependencies to 'pubspec.yaml'"
|
||||
"bump:Increases the version number of the current package"
|
||||
"cache:Work with the system cache"
|
||||
"deps:Print package dependencies"
|
||||
"downgrade:Downgrade the current package's dependencies to oldest versions"
|
||||
"get:Get the current package's dependencies"
|
||||
"global:Work with global packages"
|
||||
"login:Log into pub.dev"
|
||||
"logout:Log out of pub.dev"
|
||||
"outdated:Analyze your dependencies to find which ones can be upgraded"
|
||||
"publish:Publish the current package to pub.dev"
|
||||
"remove:Removes dependencies from 'pubspec.yaml'"
|
||||
"token:Manage authentication tokens for hosted pub repositories"
|
||||
"unpack:Downloads a package and unpacks it in place"
|
||||
"upgrade:Upgrade the current package's dependencies to latest versions"
|
||||
"workspace:Work with the pub workspace"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_bump] )) ||
|
||||
_dart_pub_bump() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_pub_bump_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Report what would change, but do not change anything]'
|
||||
)
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_bump_subcommands] )) ||
|
||||
_dart_pub_bump_subcommands() {
|
||||
local -a commands=(
|
||||
'breaking:Increment to the next breaking version(eg. 0.1.2 -> 0.2.0)'
|
||||
'major:Increment the major version number(eg. 3.1.2 -> 4.0.0)'
|
||||
'minor:Increment the minor version number(eg. 3.1.2 -> 3.2.0)'
|
||||
'patch:Increment the patch version number(eg. 3.1.2 -> 3.1.3)'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_cache] )) ||
|
||||
_dart_pub_cache() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_pub_cache_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'*: :_files'
|
||||
)
|
||||
case $words[1] in
|
||||
(add)
|
||||
opts+=(
|
||||
'--all[Install all matching versions]'
|
||||
'(-v --version)'{-v,--version}'[Version constraint]:version'
|
||||
)
|
||||
;;
|
||||
(clean)
|
||||
opts+=(
|
||||
'(-f --force)'{-f,--force}'[Do not ask for confirmation]'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_cache_subcommands] )) ||
|
||||
_dart_pub_cache_subcommands() {
|
||||
local -a commands=(
|
||||
"add:Install a package"
|
||||
"clean:Clears the global PUB_CACHE"
|
||||
"repair:Reinstall cached packages"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_global] )) ||
|
||||
_dart_pub_global() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_pub_global_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'*: :_files'
|
||||
)
|
||||
case $words[1] in
|
||||
(activate)
|
||||
opts+=(
|
||||
'(-s --source)'{-s,--source}'[The source used to find the package]:source'
|
||||
'--git-path[Path of git package in repository]:git_path'
|
||||
'--git-ref[Git branch or commit to be retrieved]:git_ref'
|
||||
'(-x --executable --noexecutables)--no-executables[Do not put executables on PATH]'
|
||||
'(-x --executable --noexecutables)'{-x,--executable}'[Executable to place on PATH]'
|
||||
'--overwrite[Overwrite executables from other packages with the same name]'
|
||||
'(-u --hosted-url)'{-u,--hosted-url}'[A custom pub server URL for the package]:server'
|
||||
)
|
||||
;;
|
||||
(run)
|
||||
opts+=(
|
||||
'(--enable-asserts --no-enable-asserts)--enable-asserts[Enable assert statements]'
|
||||
'(--enable-asserts --no-enable-asserts)--no-enable-asserts[Do not enable assert statements]'
|
||||
'*--enable-experiment=[Runs the executable in a VM with the given experiments enabled]:experiment'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_global_subcommands] )) ||
|
||||
_dart_pub_global_subcommands() {
|
||||
local -a commands=(
|
||||
"activate:Make a package's executables globally available"
|
||||
"deactivate:Remove a previously activated package"
|
||||
"list:List globally activated packages"
|
||||
"run:Run an executable from a globally activated package"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_token] )) ||
|
||||
_dart_pub_token() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_pub_token_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'*: :_files'
|
||||
)
|
||||
case $words[1] in
|
||||
(add)
|
||||
opts+=(
|
||||
'--env-var=[Read the secret token from this environment variable]:envvar'
|
||||
)
|
||||
;;
|
||||
(remove)
|
||||
opts+=(
|
||||
'--all[Remove all secret tokens]'
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_token_subcommands] )) ||
|
||||
_dart_pub_token_subcommands() {
|
||||
local -a commands=(
|
||||
"add:Add an authentication token for a package repository"
|
||||
"list:List servers for which a token exists"
|
||||
"remove:Remove secret token for package repository at hosted-url"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_workspace] )) ||
|
||||
_dart_pub_workspace() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[Print this usage information]' \
|
||||
'1: :_dart_pub_workspace_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
local -a opts=(
|
||||
'(- *)'{-h,--help}'[Print this usage information]'
|
||||
'--json[Output information in a json format]'
|
||||
)
|
||||
_arguments "$opts[@]" && ret=0
|
||||
;;
|
||||
esac
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
(( $+functions[_dart_pub_workspace_subcommands] )) ||
|
||||
_dart_pub_workspace_subcommands() {
|
||||
local -a commands=(
|
||||
'list:List all packages in the workspace and their directory'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
|
||||
(( $+functions[_dart_run_timeline_streams] )) ||
|
||||
_dart_run_timeline_streams() {
|
||||
local -a streams=(all API Compiler CompilerVerbose Dart Debugger Embedder GC Isolate VM)
|
||||
_values -s ',' streams $streams
|
||||
}
|
||||
|
||||
(( $+functions[_dart_run_enable_experiment] )) ||
|
||||
_dart_run_enable_experiment() {
|
||||
local -a features=(
|
||||
'augumentations:Augumentations - enhancing declarations from outside'
|
||||
'const-function:Allow more of the Dart language to be executed in const expression'
|
||||
'dot-shorthands:Shorter dot syntax for static accesses'
|
||||
'enhanced-parts:Generalize parts to be nested and have exports/imports'
|
||||
'getter-setter-error:Stop reporting errors about mismatching types in a getter/setter pair'
|
||||
'inference-update-4:A bundle of updates to type inference'
|
||||
'macros:Static meta-programming'
|
||||
'native-asserts:Compile and bundle native asserts'
|
||||
'null-aware-elements:Null-aware elements and map entries in collections'
|
||||
'record-use:Output arguments used by static functions'
|
||||
'sound-flow-analysis:Assume sound null safety when computing type promotion, reachability, definite assignment'
|
||||
'test-experiment:Has no effect'
|
||||
'unquoted-imports:Shorter import syntax'
|
||||
'variance:Sound variance'
|
||||
)
|
||||
_describe -t features 'command' features "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_test_reporter] )) ||
|
||||
_dart_test_reporter() {
|
||||
local -a reporters=(
|
||||
"compact:A single line, updated continuously"
|
||||
"expanded:A separate line for each update"
|
||||
"failures-only:A separate line for failing tests with no output for passing tests"
|
||||
"github:A custom reporter for GitHub Actions"
|
||||
"json:A machine-readable format"
|
||||
"silent:A reporter with no output"
|
||||
)
|
||||
_describe -t reporters 'reporter' reporters "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_dart_subcommands] )) ||
|
||||
_dart_subcommands() {
|
||||
local -a commands=(
|
||||
"analyze:Analyze Dart code in a directory"
|
||||
"compile:Compile Dart to various formats"
|
||||
"create:Create a new Dart project"
|
||||
"devtools:Open DevTools (optionally connecting to an existing application)"
|
||||
"doc:Generate API documentation for Dart projects"
|
||||
"fix:Apply automated fixes to Dart source code"
|
||||
"format:Idiomatically format Dart source code"
|
||||
"info:Show diagnostic information about the installed tooling"
|
||||
"pub:Work with packages"
|
||||
"run:Run a Dart program"
|
||||
"test:Run tests for a project"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
_dart "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#compdef dget
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dget 2.25.19
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Kris Shannon <k.shannon@amaze.com.au>
|
||||
# * Shohei YOSHIDA <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments -A "-*" \
|
||||
'(- *)'{-h,--help}'[Show help message]' \
|
||||
'(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \
|
||||
'(-a --all)'{-a,--all}'[Package is a source package; download all binary packages]' \
|
||||
'(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \
|
||||
'(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \
|
||||
'(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \
|
||||
'(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \
|
||||
'(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \
|
||||
'(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \
|
||||
'(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \
|
||||
'(--no-conf -k --insecure)'{-k,--insecure}'[Do not check SSL certificates when downloading]' \
|
||||
'(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
|
||||
"(--no-conf)--no-conf[Don't read devscripts config files]" \
|
||||
'(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
#compdef dhcpcd
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dhcpcd 9.4.1 (http://roy.marples.name/projects/dhcpcd/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(-b --background)'{-b,--background}'[Background immediately]' \
|
||||
'(-c --script)'{-c,--script}'[Use this script instead of the default]: :_files' \
|
||||
'(-D --duid)'{-D,--duid}'[Use a DHCP Unique Identifier]:id' \
|
||||
'(-d --debug)'{-d,--debug}'[Echo debug messages to the stderr and syslog]' \
|
||||
'(-E --lastlease)'{-E,--lastlease}'[If dhcpcd cannot obtain a lease, then try to use the last lease acquired for the interface]' \
|
||||
'--lastleaseextend[Same as the -E/--lastlease, but the lease will be retained even if it expires]' \
|
||||
\*{-e,--env}'[Push value to the environment for use in dhcpcd-run-hooks(8)]:env' \
|
||||
'(-g --reconfigure)'{-g,--reconfigure}'[dhcpcd will re-apply IP address, routing and run dhcpcd-run-hooks(8) for each interface]' \
|
||||
'(-F --fqdn)'{-F,--fqdn}'[Requests that the DHCP server updates DNS using FQDN instead of just a hostname]:fqdn' \
|
||||
'(-f --config)'{-f,--config}'[Specify a config to load instead of default]: :_files' \
|
||||
'(-h --hostname)'{-h,--hostname}'[Sends hostname to the DHCP server so it can be registered in DNS]:hostname' \
|
||||
'(-I --clientid)'{-I,--clientid}'[Send the clientid]:clientid' \
|
||||
'(-i --vendorclassid)'{-i,--vendorclassid}'[Override the DHCPv4 venderclassid field sent]:vendorclassid' \
|
||||
'(-j --logfile)'{-j,--logfile}'[Writes to the specified logfile]: :_files' \
|
||||
\*{-k,--release}'[Release its lease and de-configure the interface regardless of -p, --persistent option]: :_net_interfaces' \
|
||||
'(-l --leasetime)'{-l,--leasetime}'[Request a lease time of seconds. -1 represents an infinite lease time]:seconds' \
|
||||
'(-M --manager)'{-M,--manager}'[Start dhcpcd in Manager mode even if only one interface specified on the command line]' \
|
||||
'(-m --metric)'{-m,--metric}'[Metrics are used to prefer an interface over another one, lowest wins]:metric' \
|
||||
\*{-n,--rebind}'[Notifies dhcpcd to reload its configuration and rebind the specified interface]: :_net_interfaces' \
|
||||
\*{-N,--renew}'[Notifies dhcpcd to renew existing addresses on the specified interface]: :_net_interfaces' \
|
||||
\*{-o,--option}'[Request the DHCP option variable for use in dhcpcd-run-hooks]:option' \
|
||||
'(-p --persistent)'{-p,--persistent}"[Don't de-configure the interface and configuration at exit]" \
|
||||
'(-r --request)'{-r,--request}'[Request the address in the DHCP DISCOVER message]:address' \
|
||||
'(-s --inform)'{-s,--inform}'[Behaves exactly like -r, but sends a DHCP inform instead of a request]:address' \
|
||||
'--inform6[Performs a DHCPv6 Information Request]' \
|
||||
\*{-S,--static}'[Configures a static DHCP value]:value' \
|
||||
'(-t --timeout)'{-t,--timeout}'[Timeout after seconds]:seconds' \
|
||||
'(-u --userclass)'{-u,--userclass}'[Tags the DHCPv4 message with the userclass class]:class' \
|
||||
'(-v --vendor)'{-v,--vendor}'[Add an encapsulated vendor option]:vendor' \
|
||||
'(- *)--version[Display both program version and copyright information]' \
|
||||
'-w[Wait for an address to be assigned before forking to the background]' \
|
||||
'--waitip=[Wait for an address to assigned before forking to the background]: :(4 6)' \
|
||||
\*{-x,--exit}'[This will signal an existing dhcpcd process running on the interface to exit]: :_net_interfaces' \
|
||||
'(-y --reboot)'{-y,--reboot}'[Allow reboot seconds before moving to the discover phase if we have an old lease to use]:seconds' \
|
||||
'1:network interface:_net_interfaces'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
#compdef diana
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Diana a command line interface to the aria2 daemon. (https://github.com/baskerville/diana).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Jindřich Pilař (https://github.com/JindrichPilar)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local GIDs PGIDs
|
||||
|
||||
_diana_load_gids() {
|
||||
GIDs=()
|
||||
local downloads hashArr fileName
|
||||
|
||||
downloads=$(diana list | cut -d' ' -f1)
|
||||
|
||||
if [ ${#downloads} -eq "0" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
hashArr=("${(f)$(echo "$downloads")}")
|
||||
for ((i=1; i<=${#hashArr[@]}; i++)); do
|
||||
fileName=$(diana files $hashArr[i] | grep "[X]" | rev | cut -d'/' -f1 | rev);
|
||||
GIDs+=("$hashArr[i]:$fileName");
|
||||
done
|
||||
}
|
||||
|
||||
_diana_load_paused_gids() {
|
||||
PGIDs=()
|
||||
local downloads hashArr fileName
|
||||
|
||||
downloads=$(diana paused | cut -d' ' -f1)
|
||||
|
||||
if [ ${#downloads} -eq "0" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
hashArr=("${(f)$(echo "$downloads")}")
|
||||
for ((i=1; i<=${#hashArr[@]}; i++)); do
|
||||
fileName=$(diana files $hashArr[i] | grep "[X]" | rev | cut -d'/' -f1 | rev);
|
||||
PGIDs+=("$hashArr[i]:$fileName");
|
||||
done
|
||||
}
|
||||
|
||||
_diana_command_arguments() {
|
||||
case $words[1] in
|
||||
(remove)
|
||||
_diana_load_gids
|
||||
_describe -t output 'Downloads to delete' GIDs
|
||||
;;
|
||||
(info)
|
||||
_diana_load_gids
|
||||
_describe -t output 'Downloads to get info' GIDs
|
||||
;;
|
||||
(files)
|
||||
_diana_load_gids
|
||||
_describe -t output 'Get files for downloads' GIDs
|
||||
;;
|
||||
(forcerm)
|
||||
_diana_load_gids
|
||||
_describe -t output 'Downloads to delete' GIDs
|
||||
;;
|
||||
(pause)
|
||||
_diana_load_gids
|
||||
_describe -t output 'Downloads to pause' GIDs
|
||||
;;
|
||||
(resume)
|
||||
_diana_load_paused_gids
|
||||
_describe -t output 'Downloads to resume' PGIDs
|
||||
;;
|
||||
(preview)
|
||||
_diana_load_gids
|
||||
_describe -t output 'Downloads to preview' GIDs
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_diana_subcommands() {
|
||||
local -a commands=(
|
||||
"list:Output the list of active downloads."
|
||||
"paused:Output the list of paused downloads."
|
||||
"stopped:Output the list of stopped downloads."
|
||||
"info:Output information regarding the given GIDs."
|
||||
"files:Output the files owned by the downloads corresponding to the given GIDs."
|
||||
"errors:Output the list of errors."
|
||||
"stats:Output download bandwidth statistics."
|
||||
"add:Download the given items (local or remote URLs to torrents, etc.)."
|
||||
"remove:Remove the downloads corresponding to the given GIDs."
|
||||
"forcerm:Forcibly remove the downloads corresponding to the given GIDs."
|
||||
"pause:Pause the downloads corresponding to the given GIDs."
|
||||
"resume:Resume the downloads corresponding to the given GIDs."
|
||||
"preview:Preview all the files from all the downloads corresponding to the given GIDs."
|
||||
"sleep:Pause all the active downloads."
|
||||
"wake:Resume all the paused downloads."
|
||||
"purge:Clear the list of stopped downloads and errors."
|
||||
"clean:Stop seeding completed downloads."
|
||||
)
|
||||
|
||||
_describe -t commands 'commands' commands
|
||||
}
|
||||
|
||||
_arguments \
|
||||
'1:cmd:_diana_subcommands' \
|
||||
'*:: :_diana_command_arguments'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
#compdef direnv
|
||||
# ------------------------------------------------------------------------------
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of the zsh-users nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS OR THE AUTHOR BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for direnv 2.34.0 (https://direnv.net/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Nitai J. Perez <youcangetselfish@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
(( $+functions[_direnv_commands] )) ||
|
||||
_direnv_commands() {
|
||||
local -a commands=(
|
||||
'allow:Grants direnv permission to load the given .envrc or .env file'
|
||||
'permit:Grants direnv permission to load the given .envrc or .env file'
|
||||
'grant:Grants direnv permission to load the given .envrc or .env file'
|
||||
'block:Revokes the authorization of a given .envrc or .env file'
|
||||
'deny:Revokes the authorization of a given .envrc or .env file'
|
||||
'disallow:Revokes the authorization of a given .envrc or .env file'
|
||||
'revoke:Revokes the authorization of a given .envrc or .env file'
|
||||
'edit:Opens PATH_TO_RC or the current .envrc or .env into an $EDITOR and allow the file to be loaded afterwards'
|
||||
'exec:Executes a command after loading the first .envrc or .env found in DIR'
|
||||
'export:Loads an .envrc or .env and prints the diff in terms of exports'
|
||||
"fetchurl:Fetches a given URL into direnv's CAS"
|
||||
'help:shows help'
|
||||
'hook:Used to setup the shell hook'
|
||||
'prune:removes old allowed files'
|
||||
'reload:triggers an env reload'
|
||||
'status:prints some debug status information'
|
||||
'stdlib:Displays the stdlib available in the .envrc execution context'
|
||||
'version:prints the version or checks that direnv is older than VERSION_AT_LEAST'
|
||||
)
|
||||
|
||||
_describe 'command' commands
|
||||
}
|
||||
|
||||
_direnv() {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :_direnv_commands' \
|
||||
'*:: :->command_args' && ret=0
|
||||
|
||||
case $state in
|
||||
(command_args)
|
||||
case $words[1] in
|
||||
(allow|permit|grant|block|deny|revoke|edit)
|
||||
_arguments \
|
||||
'1:rc file:_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(exec)
|
||||
_arguments \
|
||||
'1:directory:_files -/' \
|
||||
'2:command:_command_names' \
|
||||
&& ret=0
|
||||
;;
|
||||
(export)
|
||||
local -a supported_shells=(bash elvish gha gzenv murex tcsh vim zsh fish json pwsh systemd)
|
||||
_arguments \
|
||||
'1:shell:($supported_shells)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(hook)
|
||||
_arguments \
|
||||
'1:shell:(bash zsh fish tcsh elvish)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(fetchurl)
|
||||
_arguments \
|
||||
'1:url:_urls' \
|
||||
'2:integrity hash' \
|
||||
&& ret=0
|
||||
;;
|
||||
(status)
|
||||
_arguments \
|
||||
'--json[print status information in JSON format]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(version)
|
||||
_arguments \
|
||||
'1:version at least' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments \
|
||||
'1:show private:(SHOW_PRIVATE)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(prune|reload|status|stdlib)
|
||||
# do not complete
|
||||
ret=0
|
||||
;;
|
||||
(*)
|
||||
_default && ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_direnv "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue