Compare commits
1463 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 |
|
|
@ -1,5 +1,5 @@
|
|||
; This file is for unifying the coding style for different editors and IDEs.
|
||||
; More information at http://EditorConfig.org
|
||||
; More information at https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -1,3 +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.
|
||||
118
README.md
118
README.md
|
|
@ -1,79 +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](https://github.com/zsh-users/zsh-completions/issues) for details on each completion definition.
|
||||
## Usage
|
||||
|
||||
Gentoo's completions have been removed, as they are maintained upstream. See: [Gentoo zsh-completions](https://github.com/radhermit/gentoo-zsh-completions)
|
||||
### 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
|
||||
---
|
||||
|
||||
* Arch Linux: [community/zsh-completions](https://www.archlinux.org/packages/zsh-completions) / [AUR/zsh-completions-git](https://aur.archlinux.org/packages/zsh-completions-git/)
|
||||
* [Gentoo](http://packages.gentoo.org/package/app-shells/zsh-completions)
|
||||
* Mac OS: [Homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh-completions.rb)
|
||||
* Debian based distributions (Debian/Ubuntu/Linux Mint...): Packager needed, please get in touch !
|
||||
* RPM based distributions (Fedora/RHEL/CentOS...): Packager needed, please get in touch !
|
||||
### Using zsh frameworks
|
||||
|
||||
#### Using frameworks
|
||||
#### [antigen](https://github.com/zsh-users/antigen)
|
||||
|
||||
* If you're using [antigen](https://github.com/zsh-users/antigen), just add `antigen bundle zsh-users/zsh-completions` to your .zshrc where you're loading your other zsh plugins.
|
||||
Add `antigen bundle zsh-users/zsh-completions` to your `~/.zshrc`.
|
||||
|
||||
#### [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
|
||||
|
||||
#### Manual installation
|
||||
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/src $fpath)
|
||||
```bash
|
||||
fpath=(path/to/zsh-completions/src $fpath)
|
||||
```
|
||||
|
||||
* You may have to force rebuild `zcompdump`:
|
||||
|
||||
rm -f ~/.zcompdump; compinit
|
||||
|
||||
#### oh-my-zsh
|
||||
|
||||
If you use [oh-my-zsh][] then just clone the repository inside your oh-my-zsh repo:
|
||||
|
||||
```Shell
|
||||
git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions
|
||||
```bash
|
||||
rm -f ~/.zcompdump; compinit
|
||||
```
|
||||
|
||||
and enable it in your `.zshrc` by adding it to your plugin list and reloading the completion:
|
||||
---
|
||||
|
||||
```zsh
|
||||
plugins=(… zsh-completions)
|
||||
autoload -U compinit && compinit
|
||||
```
|
||||
### Contributing
|
||||
|
||||
[oh-my-zsh]: http://github.com/robbyrussell/oh-my-zsh
|
||||
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
|
||||
|
||||
Contributing
|
||||
------------
|
||||
---
|
||||
|
||||
Contributions are welcome, just make sure you follow the guidelines:
|
||||
## License
|
||||
|
||||
* 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 completion, ask before.
|
||||
* Completions only partially implemented are not accepted.
|
||||
* Please add a header containing authors, license info, status and origin of the script (example [here](src/_ack)).
|
||||
* Please try to follow [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.
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
See each file for license details.
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
237
src/_ack
237
src/_ack
|
|
@ -1,237 +0,0 @@
|
|||
#compdef ack ack2 ack-grep ack-standalone
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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.96 and 2.14 (http://betterthangrep.com).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com> (version 1.94)
|
||||
# * Zhao Cai <caizhaoff@gmail.com> (version 2.04)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_ack_version() {
|
||||
local version
|
||||
version=(${(f)"$(_call_program version $words[1] --version)"})
|
||||
version=${${(z)${version[1]}}[2]}
|
||||
echo $version
|
||||
}
|
||||
|
||||
_ack() {
|
||||
local context curcontext="$curcontext" state line cmds update_policy ret=1
|
||||
integer NORMARG
|
||||
typeset -A opt_args
|
||||
|
||||
# Don't complete if command doesn't exist
|
||||
[[ ${+commands[${words[1]}]} -eq 0 ]] && return 0
|
||||
|
||||
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)${(S)${(f)${${"$(_call_program types $words[1] --help=types)"}#*--\[no\]}}%; first line matches \/*\/}#*no\]})
|
||||
[[ $#_ack_raw_types -gt 0 ]] && _store_cache "ack-grep" _ack_raw_types
|
||||
fi
|
||||
|
||||
ack_20_options=(
|
||||
'--ackrc[specify an ackrc file to use]:files:_files'
|
||||
'(- 1 *)--bar[consult Admiral Ackbar]'
|
||||
'(--nobreak --break)'{--nobreak,--break}'[print a break between results from different files, default on]'
|
||||
'(- 1 *)--cathy[chocolate chocolate chocolate]'
|
||||
'(- 1 *)--create-ackrc[create custom ackrc files based on the default settings loaded by ackrc]'
|
||||
'(- 1 *)--dump[writes the list of options loaded and where they came from to standard output]'
|
||||
'(--files-from -x)--files-from=[read the list of files to search from FILE]:files:_files'
|
||||
'(--filter --nofilter)--filter[force ack to treat input as pipe]'
|
||||
'(--filter --nofilter)--nofilter[force ack to treat input as tty]'
|
||||
'(--noheading --heading)'{--noheading,--heading}'[print a filename heading above results, default on]'
|
||||
'(- 1 *)--help-types[display all known types]'
|
||||
'--ignore-ack-defaults[ignore default definitions included with ack]'
|
||||
'*--ignore-file=[ignore file]:ignore file filter: _describe "ignore file filter" ignore_filter_opts'
|
||||
'(-k --known-types)'{-k,--known-types}'[include only files of types that ack recognizes]'
|
||||
'--lines=[only print line(s) NUM of each file]:number'
|
||||
'--nopager[do not send output through a pager, overrides ackrc, ACK_PAGER & ACK_PAGER_COLOR]'
|
||||
'-s[suppress error messages about nonexistent or unreadable files]'
|
||||
'(- 1 *)--thpppt[bill the cat]'
|
||||
'*--type-del[remove all filters associated with TYPE]' \
|
||||
'(-x --files-from)-x[read the list of files to search from STDIN]'
|
||||
)
|
||||
|
||||
ack_19_options=(
|
||||
'(-a --all -u --unrestricted)'{-a,--all}'[operate on all files, regardless of type (but still skip directories like blib, CVS, etc.)]'
|
||||
'-G+[only paths matching the given regex are included in the search]:regex'
|
||||
'--invert-file-match[print/search handle files that do not match -g/-G]'
|
||||
'--line=[only print given line of each file]:number' \
|
||||
'(-u --unrestricted -a --all)'{-u,--unrestricted}'[all files and directories (including blib/, core.*, ...) are searched, nothing is skipped]'
|
||||
)
|
||||
|
||||
if (( $(_ack_version) > 2.0 )); then
|
||||
ack_version_options=(${ack_20_options})
|
||||
else
|
||||
ack_version_options=(${ack_19_options})
|
||||
fi
|
||||
|
||||
_arguments -C -s -S -n \
|
||||
'(- 1 *)--version[display version and copyright information]' \
|
||||
'(- 1 *)--help[print a short help statement]' \
|
||||
'(- 1 *)--man[print the manual page]' \
|
||||
$ack_version_options \
|
||||
'(-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[suppress 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+[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=[ignore directory]:directory:_files' \
|
||||
'(-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' \
|
||||
'(-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/ ##/\[}']' \
|
||||
'*: :->args' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
args)
|
||||
if [[ CURRENT -eq NORMARG && ${+opt_args[--match]} -eq 0 ]]; then
|
||||
# If the current argument is the first non-option argument
|
||||
# and --match isn't present then a pattern is expected
|
||||
_message -e patterns 'pattern' && ret=0
|
||||
else
|
||||
_files
|
||||
fi
|
||||
;;
|
||||
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
|
||||
}
|
||||
|
||||
ignore_filter_opts=(
|
||||
'is\::FILENAME'
|
||||
'ext\::[EXTENSION,EXTENSION2,...]'
|
||||
'match\::PATTERN'
|
||||
'firstlinematch\::PATTERN'
|
||||
)
|
||||
|
||||
_ack_types_caching_policy() {
|
||||
|
||||
# Rebuild if ackrc more recent than cache.
|
||||
[[ -f ${ACKRC:-$HOME/.ackrc} && ${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 "$@"
|
||||
|
||||
# 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
|
||||
|
||||
45
src/_afew
45
src/_afew
|
|
@ -1,6 +1,6 @@
|
|||
#compdef afew
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,7 +28,8 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for afew an initial tagging script for notmuch mail. (https://github.com/teythoon/afew)
|
||||
# Completion script for afew(version 3.0.1) an initial tagging script for notmuch mail.
|
||||
# (https://github.com/teythoon/afew)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -38,30 +39,22 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_afew() {
|
||||
|
||||
_arguments -C \
|
||||
'(- 1 *)'-h"[Show help and exit]" \
|
||||
"(-c --classify -l --learn= -t --tag -u --update -U --update-reference -m --move-mails)"{-w,--watch}"[Continuously monitor the mailbox for new messages matching the given query]" \
|
||||
"(-c --classify -l --learn= -u --update -U --update-reference -m --move-mails -w --watch)"{-t,--tag}"[Run the tag filters]" \
|
||||
"(-c --classify -t --tag -u --update -U --update-reference -m --move-mails -w --watch)"{-l,--learn=}"[Train category with the messages matching query]" \
|
||||
"(-c --classify -l --learn= -t --tag -U --update-reference -m --move-mails -w --watch)"{-u,--update}"[Update the categories (requires no query)]" \
|
||||
"(-c --classify -l --learn= -t --tag -u --update -m --move-mails -w --watch)"{-U,--update-reference}"[Update the reference category (takes quite some time) (requires no query)]" \
|
||||
"(-l --learn= -t --tag -u --update -U --update-reference -m --move-mails -w --watch)"{-c,--classify}"[Classify each message matching the iven query]" \
|
||||
"(-c --classify -l --learn= -t --tag -u --update -U --update-reference -w --watch)"{-m,--move-mails}"[Move mail files between maildir folders]" \
|
||||
"(-n --all)"{-a,--all}"[Operate on all email]" \
|
||||
"(-a --new)"{-n,--new}"[Operate on all new email]" \
|
||||
{-C,--notmuch-config=}"[Path to notmuch configuration file]:files:_files" \
|
||||
{-e,--enable-filters=}"[Flter classes to use]:filters" \
|
||||
{-d,--dry-run}"[Dont change the DB]" \
|
||||
{-R,--reference-set-size=}"[Size of the reference set (default: 1000)]:size:" \
|
||||
{-T,--reference-set-timeframe-days=}"[Do not use emails older than DAYS days (default: 30)]:days:" \
|
||||
{--verbose,-v}"[Be more verbose]" \
|
||||
'*:Query:' \
|
||||
|
||||
}
|
||||
|
||||
_afew
|
||||
_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
|
||||
|
|
|
|||
217
src/_ag
217
src/_ag
|
|
@ -1,217 +0,0 @@
|
|||
#compdef ag
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2015 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 ag (https://github.com/ggreer/the_silver_searcher)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Akira Maeda <https://github.com/glidenote>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
_ag_version() {
|
||||
local version
|
||||
version=( $($words[1] --version) )
|
||||
version=${version[@]:2:1}
|
||||
version=( "${(@s/./)version}" )
|
||||
echo "${version[2]}"
|
||||
}
|
||||
|
||||
# Dynamically build the file type completion
|
||||
# Modifies the global $AG_OPTS array
|
||||
_ag_add_file_types() {
|
||||
local typ exts
|
||||
for i in $($words[1] --list-file-types); do
|
||||
if [[ "${i:0:2}" = '--' ]]; then
|
||||
if [[ "${typ}x" != "x" ]]; then
|
||||
AG_OPTS+="${typ}[${exts}]"
|
||||
fi
|
||||
typ=$i
|
||||
exts=
|
||||
else
|
||||
exts+=$i
|
||||
fi
|
||||
done
|
||||
AG_OPTS+="${typ}[${exts}]"
|
||||
}
|
||||
|
||||
# Add version appropriate options above base
|
||||
# Modifies the global $AG_OPTS array
|
||||
_ag_add_version_opts() {
|
||||
local minor=$(_ag_version)
|
||||
|
||||
if [[ $minor -gt 21 ]];then
|
||||
_ag_add_file_types
|
||||
AG_OPTS+=(
|
||||
'(- 1 *)--list-file-types[list supported filetypes to search]'
|
||||
'--silent[suppress all log messages, including errors]'
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ $minor -gt 22 ]];then
|
||||
AG_OPTS+=(
|
||||
'(-z --search-zip)'{-z,--search-zip}'[search contents of compressed files]'
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ $minor -le 24 ]];then
|
||||
AG_OPTS+=(
|
||||
'(-s --case-sensitive)'{-s,--case-sensitive}'[match case sensitively]'
|
||||
'(--noheading --heading)'{--noheading,--heading}'[print file names above matching contents]'
|
||||
)
|
||||
fi
|
||||
if [[ $minor -gt 24 ]];then
|
||||
AG_OPTS+=(
|
||||
'(-s --case-sensitive)'{-s,--case-sensitive}'[Match case sensitively. Default on.]'
|
||||
'(-H --noheading --heading)'{-H,--noheading,--heading}'[print file names above matching contents]'
|
||||
'--vimgrep[output results like vim''s, :vimgrep /pattern/g would (report every match on the line)]'
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ $minor -gt 26 ]];then
|
||||
AG_OPTS+=(
|
||||
'(-0 --null --print0)'{-0,--null,--print0}'[separate the filenames with \\0, rather than \\n]'
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ $minor -le 27 ]];then
|
||||
AG_OPTS+=(
|
||||
'--depth[Search up to NUM directories deep. Default is 25.]:number'
|
||||
)
|
||||
fi
|
||||
if [[ $minor -gt 27 ]];then
|
||||
AG_OPTS+=(
|
||||
'(-c --count)'{-c,--count}'[only print the number of matches in each file]'
|
||||
'--depth[Search up to NUM directories deep, -1 for unlimited. Default is 25.]:number'
|
||||
'(-F --fixed-strings)'{-F,--fixed-strings}'[alias for --literal for compatibility with grep]'
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ $minor -le 28 ]];then
|
||||
AG_OPTS+=(
|
||||
'(--no-numbers)--no-numbers[don´t show line numbers]'
|
||||
)
|
||||
fi
|
||||
if [[ $minor -gt 28 ]];then
|
||||
AG_OPTS+=(
|
||||
'(--nofilename --filename)'{--nofilename,--filename}'[Print file names. Default on, except when searching a single file.]'
|
||||
'(--nonumbers --numbers)'{--nonumbers,--numbers}'[Print line numbers. Default is to omit line numbers when searching streams]'
|
||||
'(-o --only-matching)'{-o,--only-matching}'[print only the matching part of the lines]'
|
||||
)
|
||||
fi
|
||||
}
|
||||
|
||||
_ag() {
|
||||
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 _ag_types_caching_policy
|
||||
|
||||
# Don't complete if command doesn't exist
|
||||
[[ ${+commands[${words[1]}]} -eq 0 ]] && return 0
|
||||
|
||||
if ( [[ ${+AG_OPTS} -eq 0 ]] || _cache_invalid "_AG_OPTS" ) && ! _retrieve_cache "_AG_OPTS"; then
|
||||
# Base opts starts at ag version 0.20
|
||||
AG_OPTS=(
|
||||
'(- 1 *)--help[print a short help statement]'
|
||||
'(- 1 *)--man[print the manual page]'
|
||||
'(- 1 *)--version[display version and copyright information]'
|
||||
'--ackmate[output results in a format parseable by AckMate]'
|
||||
'(-A --after)'{-A,--after}'[Print NUM lines before match. Default is 2]:number'
|
||||
'(-t --all-text -a --all-types -u --unrestricted)'{-t,--all-text}"[search all text files, excluding hidden ones]"
|
||||
'(-a --all-types -t --all-text -u --unrestricted)'{-a,--all-types}"[search all text files, excluding hidden ones and not obeying ignore files (.agignore, .gitignore...)]"
|
||||
'(-B --before)'{-B,--before}'[Print NUM lines after match. Defaults is 2]:number'
|
||||
'(--nobreak --break)'{--nobreak,--break}'[Print a newline between matches in different files. Default on.]'
|
||||
'(--color --nocolor)--color[Print color codes in results. Default on.]'
|
||||
'(--nocolor --color --color-line-number --color-match --color-path)--nocolor[Do not print color codes in results. Default on.]'
|
||||
'(--nocolor)--color-line-number[Color codes for line numbers. Default is 1;33.]'
|
||||
'(--nocolor)--color-match[Color codes for result match numbers. Default is 30;43.]'
|
||||
'(--nocolor)--color-path[Color codes for path names. Default is 1;32.]'
|
||||
'--column[print column numbers in results]'
|
||||
'(-C --context)'{-C,--context}'[Print NUM lines before and after matches. Default is 2.]:number'
|
||||
'(-D --debug)'{-D,--debug}'[enable debug logging]'
|
||||
'(-G --file-search-regex)'{-G,--file-search-regex}'[only search file names matching PATTERN]:pattern'
|
||||
'(-l --files-with-matches)'{-l,--files-with-matches}'[only print filenames containing matches, not matching lines]'
|
||||
'(-L --files-without-matches)'{-L,--files-without-matches}"[only print filenames that don't contain matches]"
|
||||
'(-f --follow)'{-f,--follow}'[follow symlinks]'
|
||||
'(-g)-g[print filenames that match PATTERN]:pattern'
|
||||
'(--nogroup --group)'{--nogroup,--group}'[same as --\[no\]break --\[no\]heading]'
|
||||
'--hidden[search hidden files, still obeys ignore files.]'
|
||||
'*--ignore[Ignore files/directories matching this pattern. Literal file and directory names are also allowed.]:files:_files'
|
||||
'(-i --ignore-case)'{-i,--ignore-case}'[match case insensitively]:pattern'
|
||||
'*--ignore-dir[alias for --ignore for compatibility with ack]:files:_files'
|
||||
'(-v --invert-match)'{-v,--invert-match}'[invert match]'
|
||||
'(-Q --literal)'{-Q,--literal}'[match PATTERN literally, no regular expression]'
|
||||
'(-m --max-count)'{-m,--max-count}'[Skip the rest of a file after NUM matches. Default is 10,000.]:number'
|
||||
'(--pager --nopager)'{--pager,--nopager}'[Display results with PAGER. Disabled by default.]:pager program:_command_names'
|
||||
'(--passthrough)--passthrough[when searching a stream, print all lines even if they don''t match]'
|
||||
'(-p --path-to-agignore)'{-p,--path-to-agignore}'[provide a path to a specific .agignore file]:files:_files'
|
||||
'--print-long-lines[print matches on very long lines, > 2k characters by default]'
|
||||
'--search-binary[search binary files]'
|
||||
'(-U --skip-vcs-ignores)'{-U,--skip-vcs-ignores}'[ignore VCS ignore files (.gitigore, .hgignore, svn:ignore), but still use .agignore]'
|
||||
'(-S --smart-case)'{-S,--smart-case}'[match case sensitively if PATTERN contains any uppercase letters, else match case insensitively]'
|
||||
'--stats[print stats (files scanned, time taken, etc)]'
|
||||
'(-u --unrestricted -t --all-text -a --all-types)'{-u,--unrestricted}'[search ALL files, includes: hidden, binary & ignored files (.agignore, .gitignore...)]'
|
||||
'(-w --word-regexp)'{-w,--word-regexp}'[only match whole words]'
|
||||
)
|
||||
_ag_add_version_opts
|
||||
AG_OPTS+=(
|
||||
'*: :_files'
|
||||
)
|
||||
[[ $#AG_OPTS -gt 0 ]] && _store_cache '_AG_OPTS' AG_OPTS
|
||||
fi
|
||||
|
||||
_arguments -C -s -S ${AG_OPTS} && ret=0
|
||||
unset AG_OPTS
|
||||
|
||||
case $state in
|
||||
# placeholder
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_ag_types_caching_policy() {
|
||||
# Rebuild if .agignore more recent than cache.
|
||||
[[ -f $HOME/.agignore && $$HOME/.agignore -nt "$1" ]] && return 0
|
||||
|
||||
# Rebuild if cache is older than one week.
|
||||
local -a oldp
|
||||
oldp=( "$1"(Nmw+1) )
|
||||
(( $#oldp )) && return 0
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
_ag "$@"
|
||||
|
|
@ -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
|
||||
333
src/_android
333
src/_android
|
|
@ -1,333 +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>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_android() {
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
|
||||
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'
|
||||
'avd:displays the AVD Manager window'
|
||||
'sdk:displays the SDK Manager window'
|
||||
'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 "$@"
|
||||
|
||||
# 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
|
||||
708
src/_ansible
708
src/_ansible
|
|
@ -1,708 +0,0 @@
|
|||
#compdef ansible
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 ansible v2.0.0.2 (http://ansible.org)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Romain Bossart (https://github.com/bosr)
|
||||
# * Adam Stevko (https://github.com/xen0l)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Needs either ANSIBLE_HOSTS or /etc/ansible/hosts on linux
|
||||
# (or /usr/local/etc/ansible/hosts on OSX)
|
||||
#
|
||||
# Note 1: the following gist (https://gist.github.com/15ed54a438a36d67fd99.git)
|
||||
# has some files to help improve the hostfile shell parsing
|
||||
#
|
||||
# Note 2: I tried to use `_arguments --`, but the output of `ansible --help`
|
||||
# is not parsed entirely correctly, and anyway no modules or host would available.
|
||||
#
|
||||
|
||||
|
||||
# ansible zsh completion
|
||||
#
|
||||
|
||||
__host_file_location () {
|
||||
# find the location of the host file:
|
||||
# 1. check $ANSIBLE_HOSTS
|
||||
# 2. else check /etc/ansible/hosts or /usr/local/etc/...
|
||||
# (depending on platform)
|
||||
#
|
||||
[[ "$OSTYPE" == darwin* ]] && FALLBACK="/usr/local/etc/ansible/hosts"
|
||||
[[ "$OSTYPE" == linux* ]] && FALLBACK="/etc/ansible/hosts"
|
||||
HOST_FILE=${ANSIBLE_HOSTS:=${FALLBACK}}
|
||||
[[ -f ${HOST_FILE} ]] || HOST_FILE=/dev/null
|
||||
|
||||
echo ${HOST_FILE}
|
||||
}
|
||||
|
||||
__ll_group_list () {
|
||||
# parses the ini hostfile for groups only: [...]
|
||||
HOST_FILE=$(__host_file_location)
|
||||
|
||||
local -a group_list
|
||||
group_list=$(command \
|
||||
cat ${HOST_FILE} \
|
||||
| awk '$1 ~ /^\[.*\]$/ && !/=/ && !/:vars/ \
|
||||
{ gsub(/[\[\]]/, "", $1); gsub(/:children/, "", $1) ; print $1 }' \
|
||||
| uniq )
|
||||
|
||||
echo ${group_list}
|
||||
}
|
||||
|
||||
|
||||
__host_list ()
|
||||
{
|
||||
# parses the ini hostfile for hosts only
|
||||
# but then has to remove all group occurrences
|
||||
HOST_FILE=$(__host_file_location)
|
||||
|
||||
# this will also contain groups if they are referenced in other groups
|
||||
local -a mixed_host_list
|
||||
mixed_host_list=$(command \
|
||||
cat ${HOST_FILE} \
|
||||
| awk 'NF && $1 !~ /^[:space:]*#|[\[:=]/ { print $1 }' \
|
||||
| sort | uniq)
|
||||
|
||||
# compute set difference h1 - h2
|
||||
local -a h1 h2 host_list
|
||||
h1=${mixed_host_list}
|
||||
h2=$(__ll_group_list)
|
||||
host_list=($(command \
|
||||
sort <(echo $h1) <(echo $h2) <(echo $h2) \
|
||||
| uniq -u \
|
||||
| paste -s -d ' ' - )
|
||||
)
|
||||
|
||||
_wanted application expl 'hosts' compadd ${host_list}
|
||||
|
||||
# method that delegates to ansible (slow)
|
||||
# _wanted application expl 'hosts' compadd $(command ansible \
|
||||
# all --list-hosts\
|
||||
# 2>/dev/null)
|
||||
}
|
||||
|
||||
__group_list ()
|
||||
{
|
||||
gl=($(command echo $(__ll_group_list) | paste -s -d ' ' - )) # 'a\nb\nc' -> (a b c)
|
||||
_wanted application2 expl 'groups' compadd $gl
|
||||
}
|
||||
|
||||
|
||||
_modules=(
|
||||
'a10_server:Manage A10 Networks AX/SoftAX/Thunder/vThunder devices'
|
||||
'a10_service_group:Manage A10 Networks devices’ service groups'
|
||||
'a10_virtual_server:Manage A10 Networks devices’ virtual servers'
|
||||
'accelerate:Enable accelerated mode on remote node'
|
||||
'acl:Sets and retrieves file ACL information.'
|
||||
'add_host:add a host (and alternatively a group) to the ansible-playbook in-memory inventory'
|
||||
'airbrake_deployment:Notify airbrake about app deployments'
|
||||
'alternatives:Manages alternative programs for common commands'
|
||||
'apache2_module:enables/disables a module of the Apache2 webserver'
|
||||
'apk:Manages apk packages'
|
||||
'apt:Manages apt-packages'
|
||||
'apt_key:Add or remove an apt key'
|
||||
'apt_repository:Add and remove APT repositories'
|
||||
'apt_rpm:apt_rpm package manager'
|
||||
'assemble:Assembles a configuration file from fragments'
|
||||
'assert:Fail with custom message'
|
||||
'async_status:Obtain status of asynchronous task'
|
||||
'at:Schedule the execution of a command or script file via the at command.'
|
||||
'authorized_key:Adds or removes an SSH authorized key'
|
||||
'azure:create or terminate a virtual machine in azure'
|
||||
'bigip_facts:Collect facts from F5 BIG-IP devices'
|
||||
'bigip_gtm_wide_ip:Manages F5 BIG-IP GTM wide ip'
|
||||
'bigip_monitor_http:Manages F5 BIG-IP LTM http monitors'
|
||||
'bigip_monitor_tcp:Manages F5 BIG-IP LTM tcp monitors'
|
||||
'bigip_node:Manages F5 BIG-IP LTM nodes'
|
||||
'bigip_pool:Manages F5 BIG-IP LTM pools'
|
||||
'bigip_pool_member:Manages F5 BIG-IP LTM pool members'
|
||||
'bigip_virtual_server:Manages F5 BIG-IP LTM virtual servers'
|
||||
'bigpanda:Notify BigPanda about deployments'
|
||||
'blockinfile:Insert/update/remove a text block surrounded by marker lines.'
|
||||
'boundary_meter:Manage boundary meters'
|
||||
'bower:Manage bower packages with bower'
|
||||
'bundler:Manage Ruby Gem dependencies with Bundler'
|
||||
'bzr:Deploy software (or files) from bzr branches'
|
||||
'campfire:Send a message to Campfire'
|
||||
'capabilities:Manage Linux capabilities'
|
||||
'circonus_annotation:create an annotation in circonus'
|
||||
'cl_bond:Configures a bond port on Cumulus Linux'
|
||||
'cl_bridge:Configures a bridge port on Cumulus Linux'
|
||||
'cl_img_install:Install a different Cumulus Linux version.'
|
||||
'cl_interface:Configures a front panel port, loopback or management port on Cumulus Linux.'
|
||||
'cl_interface_policy:Configure interface enforcement policy on Cumulus Linux'
|
||||
'cl_license:Install Cumulus Linux license'
|
||||
'cl_ports:Configure Cumulus Switch port attributes (ports.conf)'
|
||||
'clc_aa_policy:Create or Delete Anti Affinity Policies at CenturyLink Cloud.'
|
||||
'clc_alert_policy:Create or Delete Alert Policies at CenturyLink Cloud.'
|
||||
'clc_blueprint_package:deploys a blue print package on a set of servers in CenturyLink Cloud.'
|
||||
'clc_firewall_policy:Create/delete/update firewall policies'
|
||||
'clc_group:Create/delete Server Groups at Centurylink Cloud'
|
||||
'clc_loadbalancer:Create, Delete shared loadbalancers in CenturyLink Cloud.'
|
||||
'clc_modify_server:modify servers in CenturyLink Cloud.'
|
||||
'clc_publicip:Add and Delete public ips on servers in CenturyLink Cloud.'
|
||||
'clc_server:Create, Delete, Start and Stop servers in CenturyLink Cloud.'
|
||||
'clc_server_snapshot:Create, Delete and Restore server snapshots in CenturyLink Cloud.'
|
||||
'cloudflare_dns:manage Cloudflare DNS records'
|
||||
'cloudformation:Create or delete an AWS CloudFormation stack'
|
||||
'cloudtrail:manage CloudTrail creation and deletion'
|
||||
'command:Executes a command on a remote node'
|
||||
'composer:Dependency Manager for PHP'
|
||||
'consul:Add, modify & delete services within a consul cluster.'
|
||||
'consul_acl:manipulate consul acl keys and rules'
|
||||
'consul_kv:Manipulate entries in the key/value store of a consul cluster.'
|
||||
'consul_session:manipulate consul sessions'
|
||||
'copy:Copies files to remote locations.'
|
||||
'cpanm:Manages Perl library dependencies.'
|
||||
'cron:Manage cron.d and crontab entries.'
|
||||
'cronvar:Manage variables in crontabs'
|
||||
'crypttab:Encrypted Linux block devices'
|
||||
'cs_account:Manages accounts on Apache CloudStack based clouds.'
|
||||
'cs_affinitygroup:Manages affinity groups on Apache CloudStack based clouds.'
|
||||
'cs_cluster:Manages host clusters on Apache CloudStack based clouds.'
|
||||
'cs_configuration:Manages configuration on Apache CloudStack based clouds.'
|
||||
'cs_domain:Manages domains on Apache CloudStack based clouds.'
|
||||
'cs_facts:Gather facts on instances of Apache CloudStack based clouds.'
|
||||
'cs_firewall:Manages firewall rules on Apache CloudStack based clouds.'
|
||||
'cs_instance:Manages instances and virtual machines on Apache CloudStack based clouds.'
|
||||
'cs_instance_facts:Gathering facts from the API of instances from Apache CloudStack based clouds.'
|
||||
'cs_instancegroup:Manages instance groups on Apache CloudStack based clouds.'
|
||||
'cs_ip_address:Manages public IP address associations on Apache CloudStack based clouds.'
|
||||
'cs_iso:Manages ISO images on Apache CloudStack based clouds.'
|
||||
'cs_loadbalancer_rule:Manages load balancer rules on Apache CloudStack based clouds.'
|
||||
'cs_loadbalancer_rule_member:Manages load balancer rule members on Apache CloudStack based clouds.'
|
||||
'cs_network:Manages networks on Apache CloudStack based clouds.'
|
||||
'cs_pod:Manages pods on Apache CloudStack based clouds.'
|
||||
'cs_portforward:Manages port forwarding rules on Apache CloudStack based clouds.'
|
||||
'cs_project:Manages projects on Apache CloudStack based clouds.'
|
||||
'cs_resourcelimit:Manages resource limits on Apache CloudStack based clouds.'
|
||||
'cs_securitygroup:Manages security groups on Apache CloudStack based clouds.'
|
||||
'cs_securitygroup_rule:Manages security group rules on Apache CloudStack based clouds.'
|
||||
'cs_sshkeypair:Manages SSH keys on Apache CloudStack based clouds.'
|
||||
'cs_staticnat:Manages static NATs on Apache CloudStack based clouds.'
|
||||
'cs_template:Manages templates on Apache CloudStack based clouds.'
|
||||
'cs_user:Manages users on Apache CloudStack based clouds.'
|
||||
'cs_vmsnapshot:Manages VM snapshots on Apache CloudStack based clouds.'
|
||||
'cs_volume:Manages volumes on Apache CloudStack based clouds.'
|
||||
'cs_zone:Manages zones on Apache CloudStack based clouds.'
|
||||
'cs_zone_facts:Gathering facts of zones from Apache CloudStack based clouds.'
|
||||
'datadog_event:Posts events to DataDog service'
|
||||
'datadog_monitor:Manages Datadog monitors'
|
||||
'debconf:Configure a .deb package'
|
||||
'debug:Print statements during execution'
|
||||
'deploy_helper:Manages some of the steps common in deploying projects.'
|
||||
'digital_ocean:Create/delete a droplet/SSH_key in DigitalOcean'
|
||||
'digital_ocean_domain:Create/delete a DNS record in DigitalOcean'
|
||||
'digital_ocean_sshkey:Create/delete an SSH key in DigitalOcean'
|
||||
'django_manage:Manages a Django application.'
|
||||
'dnf:Manages packages with the *dnf* package manager'
|
||||
'dnsimple:Interface with dnsimple.com (a DNS hosting service).'
|
||||
'dnsmadeeasy:Interface with dnsmadeeasy.com (a DNS hosting service).'
|
||||
'docker:manage docker containers'
|
||||
'docker_image:manage docker images'
|
||||
'docker_login:Manage Docker registry logins'
|
||||
'dpkg_selections:Dpkg package selection selections'
|
||||
'dynamodb_table:Create, update or delete AWS Dynamo DB tables.'
|
||||
'easy_install:Installs Python libraries'
|
||||
'ec2:create, terminate, start or stop an instance in ec2'
|
||||
'ec2_ami:create or destroy an image in ec2'
|
||||
'ec2_ami_copy:copies AMI between AWS regions, return new image id'
|
||||
'ec2_ami_find:Searches for AMIs to obtain the AMI ID and other information'
|
||||
'ec2_ami_search(D):Retrieve AWS AMI information for a given operating system.'
|
||||
'ec2_asg:Create or delete AWS Autoscaling Groups'
|
||||
'ec2_eip:associate an EC2 elastic IP with an instance.'
|
||||
'ec2_elb:De-registers or registers instances from EC2 ELBs'
|
||||
'ec2_elb_facts:Gather facts about EC2 Elastic Load Balancers in AWS'
|
||||
'ec2_elb_lb:Creates or destroys Amazon ELB.'
|
||||
'ec2_eni:Create and optionally attach an Elastic Network Interface (ENI) to an instance'
|
||||
'ec2_eni_facts:Gather facts about ec2 ENI interfaces in AWS'
|
||||
'ec2_facts:Gathers facts about remote hosts within ec2 (aws)'
|
||||
'ec2_group:maintain an ec2 VPC security group.'
|
||||
'ec2_key:maintain an ec2 key pair.'
|
||||
'ec2_lc:Create or delete AWS Autoscaling Launch Configurations'
|
||||
'ec2_metric_alarm:Create/update or delete AWS Cloudwatch ‘metric alarms’'
|
||||
'ec2_remote_facts:Gather facts about ec2 instances in AWS'
|
||||
'ec2_scaling_policy:Create or delete AWS scaling policies for Autoscaling groups'
|
||||
'ec2_snapshot:creates a snapshot from an existing volume'
|
||||
'ec2_tag:create and remove tag(s) to ec2 resources.'
|
||||
'ec2_vol:create and attach a volume, return volume id and device map'
|
||||
'ec2_vol_facts:Gather facts about ec2 volumes in AWS'
|
||||
'ec2_vpc:configure AWS virtual private clouds'
|
||||
'ec2_vpc_dhcp_options:Manages DHCP Options, and can ensure the DHCP options for the given VPC match what’s requested'
|
||||
'ec2_vpc_igw:Manage an AWS VPC Internet gateway'
|
||||
'ec2_vpc_net:Configure AWS virtual private clouds'
|
||||
'ec2_vpc_net_facts:Gather facts about ec2 VPCs in AWS'
|
||||
'ec2_vpc_route_table:Manage route tables for AWS virtual private clouds'
|
||||
'ec2_vpc_route_table_facts:Gather facts about ec2 VPC route tables in AWS'
|
||||
'ec2_vpc_subnet:Manage subnets in AWS virtual private clouds'
|
||||
'ec2_vpc_subnet_facts:Gather facts about ec2 VPC subnets in AWS'
|
||||
'ec2_win_password:gets the default administrator password for ec2 windows instances'
|
||||
'ecs_cluster:create or terminate ecs clusters'
|
||||
'ecs_service:create, terminate, start or stop a service in ecs'
|
||||
'ecs_service_facts:list or describe services in ecs'
|
||||
'ecs_task:run, start or stop a task in ecs'
|
||||
'ecs_taskdefinition:register a task definition in ecs'
|
||||
'ejabberd_user:Manages users for ejabberd servers'
|
||||
'elasticache:Manage cache clusters in Amazon Elasticache.'
|
||||
'elasticache_subnet_group:manage Elasticache subnet groups'
|
||||
'elasticsearch_plugin:Manage Elasticsearch plugins'
|
||||
'eos_command:Run arbitrary command on EOS device'
|
||||
'eos_config:Manage Arista EOS configuration sections'
|
||||
'eos_eapi:Manage and configure EAPI. Requires EOS v4.12 or greater.'
|
||||
'eos_template:Manage Arista EOS device configurations'
|
||||
'expect:Executes a command and responds to prompts'
|
||||
'facter:Runs the discovery program *facter* on the remote system'
|
||||
'fail:Fail with custom message'
|
||||
'fetch:Fetches a file from remote nodes'
|
||||
'file:Sets attributes of files'
|
||||
'filesystem:Makes file system on block device'
|
||||
'find:return a list of files based on specific criteria'
|
||||
'fireball(D):Enable fireball mode on remote node'
|
||||
'firewalld:Manage arbitrary ports/services with firewalld'
|
||||
'flowdock:Send a message to a flowdock'
|
||||
'gc_storage:This module manages objects/buckets in Google Cloud Storage.'
|
||||
'gce:create or terminate GCE instances'
|
||||
'gce_img:utilize GCE image resources'
|
||||
'gce_lb:create/destroy GCE load-balancer resources'
|
||||
'gce_net:create/destroy GCE networks and firewall rules'
|
||||
'gce_pd:utilize GCE persistent disk resources'
|
||||
'gce_tag:add or remove tag(s) to/from GCE instance'
|
||||
'gem:Manage Ruby gems'
|
||||
'get_url:Downloads files from HTTP, HTTPS, or FTP to node'
|
||||
'getent:a wrapper to the unix getent utility'
|
||||
'git:Deploy software (or files) from git checkouts'
|
||||
'github_hooks:Manages github service hooks.'
|
||||
'glance_image(D):Add/Delete images from glance'
|
||||
'gluster_volume:Manage GlusterFS volumes'
|
||||
'group:Add or remove groups'
|
||||
'group_by:Create Ansible groups based on facts'
|
||||
'grove:Sends a notification to a grove.io channel'
|
||||
'hall:Send notification to Hall'
|
||||
'haproxy:Enable, disable, and set weights for HAProxy backend servers using socket commands.'
|
||||
'hg:Manages Mercurial (hg) repositories.'
|
||||
'hipchat:Send a message to hipchat.'
|
||||
'homebrew:Package manager for Homebrew'
|
||||
'homebrew_cask:Install/uninstall homebrew casks.'
|
||||
'homebrew_tap:Tap a Homebrew repository.'
|
||||
'hostname:Manage hostname'
|
||||
'htpasswd:manage user files for basic authentication'
|
||||
'iam:Manage IAM users, groups, roles and keys'
|
||||
'iam_cert:Manage server certificates for use on ELBs and CloudFront'
|
||||
'iam_policy:Manage IAM policies for users, groups, and roles'
|
||||
'include_vars:Load variables from files, dynamically within a task.'
|
||||
'ini_file:Tweak settings in INI files'
|
||||
'ios_command:Run arbitrary commands on ios devices.'
|
||||
'ios_config:Manage Cisco IOS configuration sections'
|
||||
'ios_template:Manage Cisco IOS device configurations over SSH'
|
||||
'iosxr_command:Run arbitrary commands on ios devices.'
|
||||
'iosxr_config:Manage Cisco IOS XR configuration sections'
|
||||
'iosxr_template:Manage Cisco IOS device configurations over SSH'
|
||||
'ipify_facts:Retrieve the public IP of your internet gateway.'
|
||||
'iptables:Modify the systems iptables'
|
||||
'irc:Send a message to an IRC channel'
|
||||
'jabber:Send a message to jabber user or chat room'
|
||||
'jboss:deploy applications to JBoss'
|
||||
'jira:create and modify issues in a JIRA instance'
|
||||
'junos_command:Execute arbitrary commands on Juniper JUNOS devices'
|
||||
'junos_config:Manage Juniper JUNOS configuration sections'
|
||||
'junos_template:Manage Juniper JUNOS device configurations'
|
||||
'kernel_blacklist:Blacklist kernel modules'
|
||||
'keystone_user(D):Manage OpenStack Identity (keystone) users, tenants and roles'
|
||||
'known_hosts:Add or remove a host from the ``known_hosts`` file'
|
||||
'layman:Manage Gentoo overlays'
|
||||
'librato_annotation:create an annotation in librato'
|
||||
'lineinfile:Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression.'
|
||||
'linode:create / delete / stop / restart an instance in Linode Public Cloud'
|
||||
'lldp:get details reported by lldp'
|
||||
'locale_gen:Creates or removes locales.'
|
||||
'logentries:Module for tracking logs via logentries.com'
|
||||
'lvg:Configure LVM volume groups'
|
||||
'lvol:Configure LVM logical volumes'
|
||||
'lxc_container:Manage LXC Containers'
|
||||
'macports:Package manager for MacPorts'
|
||||
'mail:Send an email'
|
||||
'maven_artifact:Downloads an Artifact from a Maven Repository'
|
||||
'modprobe:Add or remove kernel modules'
|
||||
'mongodb_user:Adds or removes a user from a MongoDB database.'
|
||||
'monit:Manage the state of a program monitored via Monit'
|
||||
'mount:Control active and configured mount points'
|
||||
'mqtt:Publish a message on an MQTT topic for the IoT'
|
||||
'mysql_db:Add or remove MySQL databases from a remote host.'
|
||||
'mysql_replication:Manage MySQL replication'
|
||||
'mysql_user:Adds or removes a user from a MySQL database.'
|
||||
'mysql_variables:Manage MySQL global variables'
|
||||
'nagios:Perform common tasks in Nagios related to downtime and notifications.'
|
||||
'netscaler:Manages Citrix NetScaler entities'
|
||||
'newrelic_deployment:Notify newrelic about app deployments'
|
||||
'nexmo:Send a SMS via nexmo'
|
||||
'nmcli:Manage Networking'
|
||||
'nova_compute(D):Create/Delete VMs from OpenStack'
|
||||
'nova_keypair(D):Add/Delete key pair from nova'
|
||||
'npm:Manage node.js packages with npm'
|
||||
'nxos_command:Run arbitrary command on Cisco NXOS devices'
|
||||
'nxos_config:Manage Cisco NXOS configuration sections'
|
||||
'nxos_nxapi:Manage NXAPI configuration on an NXOS device.'
|
||||
'nxos_template:Manage Cisco NXOS device configurations'
|
||||
'ohai:Returns inventory data from *Ohai*'
|
||||
'open_iscsi:Manage iscsi targets with open-iscsi'
|
||||
'openbsd_pkg:Manage packages on OpenBSD.'
|
||||
'openvswitch_bridge:Manage Open vSwitch bridges'
|
||||
'openvswitch_db:Configure open vswitch database.'
|
||||
'openvswitch_port:Manage Open vSwitch ports'
|
||||
'opkg:Package manager for OpenWrt'
|
||||
'ops_command:Run arbitrary commands on OpenSwitch devices.'
|
||||
'ops_config:Manage OpenSwitch configuration using CLI'
|
||||
'ops_template:Push configuration to OpenSwitch'
|
||||
'os_auth:Retrieve an auth token'
|
||||
'os_client_config:Get OpenStack Client config'
|
||||
'os_flavor_facts:Retrieve facts about one or more flavors'
|
||||
'os_floating_ip:Add/Remove floating IP from an instance'
|
||||
'os_group:Manage OpenStack Identity Groups'
|
||||
'os_image:Add/Delete images from OpenStack Cloud'
|
||||
'os_image_facts:Retrieve facts about an image within OpenStack.'
|
||||
'os_ironic:Create/Delete Bare Metal Resources from OpenStack'
|
||||
'os_ironic_node:Activate/Deactivate Bare Metal Resources from OpenStack'
|
||||
'os_keypair:Add/Delete a keypair from OpenStack'
|
||||
'os_keystone_domain:Manage OpenStack Identity Domains'
|
||||
'os_keystone_role:Manage OpenStack Identity Roles'
|
||||
'os_network:Creates/removes networks from OpenStack'
|
||||
'os_networks_facts:Retrieve facts about one or more OpenStack networks.'
|
||||
'os_nova_flavor:Manage OpenStack compute flavors'
|
||||
'os_object:Create or Delete objects and containers from OpenStack'
|
||||
'os_port:Add/Update/Delete ports from an OpenStack cloud.'
|
||||
'os_project:Manage OpenStack Projects'
|
||||
'os_router:Create or delete routers from OpenStack'
|
||||
'os_security_group:Add/Delete security groups from an OpenStack cloud.'
|
||||
'os_security_group_rule:Add/Delete rule from an existing security group'
|
||||
'os_server:Create/Delete Compute Instances from OpenStack'
|
||||
'os_server_actions:Perform actions on Compute Instances from OpenStack'
|
||||
'os_server_facts:Retrieve facts about one or more compute instances'
|
||||
'os_server_volume:Attach/Detach Volumes from OpenStack VM’s'
|
||||
'os_subnet:Add/Remove subnet to an OpenStack network'
|
||||
'os_subnets_facts:Retrieve facts about one or more OpenStack subnets.'
|
||||
'os_user:Manage OpenStack Identity Users'
|
||||
'os_user_group:Associate OpenStack Identity users and groups'
|
||||
'os_volume:Create/Delete Cinder Volumes'
|
||||
'osx_defaults:osx_defaults allows users to read, write, and delete Mac OS X user defaults from Ansible'
|
||||
'osx_say:Makes an OSX computer to speak.'
|
||||
'ovirt:oVirt/RHEV platform management'
|
||||
'package:Generic OS package manager'
|
||||
'pacman:Manage packages with *pacman*'
|
||||
'pagerduty:Create PagerDuty maintenance windows'
|
||||
'pagerduty_alert:Trigger, acknowledge or resolve PagerDuty incidents'
|
||||
'pam_limits:Modify Linux PAM limits'
|
||||
'patch:Apply patch files using the GNU patch tool.'
|
||||
'pause:Pause playbook execution'
|
||||
'pear:Manage pear/pecl packages'
|
||||
'ping:Try to connect to host, verify a usable python and return ``pong`` on success.'
|
||||
'pingdom:Pause/unpause Pingdom alerts'
|
||||
'pip:Manages Python library dependencies.'
|
||||
'pkg5:Manages packages with the Solaris 11 Image Packaging System'
|
||||
'pkg5_publisher:Manages Solaris 11 Image Packaging System publishers'
|
||||
'pkgin:Package manager for SmartOS, NetBSD, et al.'
|
||||
'pkgng:Package manager for FreeBSD >= 9.0'
|
||||
'pkgutil:Manage CSW-Packages on Solaris'
|
||||
'portage:Package manager for Gentoo'
|
||||
'portinstall:Installing packages from FreeBSD’s ports system'
|
||||
'postgresql_db:Add or remove PostgreSQL databases from a remote host.'
|
||||
'postgresql_ext:Add or remove PostgreSQL extensions from a database.'
|
||||
'postgresql_lang:Adds, removes or changes procedural languages with a PostgreSQL database.'
|
||||
'postgresql_privs:Grant or revoke privileges on PostgreSQL database objects.'
|
||||
'postgresql_user:Adds or removes a users (roles) from a PostgreSQL database.'
|
||||
'profitbricks:Create, destroy, start, stop, and reboot a ProfitBricks virtual machine.'
|
||||
'profitbricks_datacenter:Create or destroy a ProfitBricks Virtual Datacenter.'
|
||||
'profitbricks_nic:Create or Remove a NIC.'
|
||||
'profitbricks_volume:Create or destroy a volume.'
|
||||
'profitbricks_volume_attachments:Attach or detach a volume.'
|
||||
'proxmox:management of instances in Proxmox VE cluster'
|
||||
'proxmox_template:management of OS templates in Proxmox VE cluster'
|
||||
'puppet:Runs puppet'
|
||||
'pushbullet:Sends notifications to Pushbullet'
|
||||
'pushover:Send notifications via https'
|
||||
'quantum_floating_ip(D):Add/Remove floating IP from an instance'
|
||||
'quantum_floating_ip_associate(D):Associate or disassociate a particular floating IP with an instance'
|
||||
'quantum_network(D):Creates/Removes networks from OpenStack'
|
||||
'quantum_router(D):Create or Remove router from openstack'
|
||||
'quantum_router_gateway(D):set/unset a gateway interface for the router with the specified external network'
|
||||
'quantum_router_interface(D):Attach/Dettach a subnet’s interface to a router'
|
||||
'quantum_subnet(D):Add/remove subnet from a network'
|
||||
'rabbitmq_binding:This module manages rabbitMQ bindings'
|
||||
'rabbitmq_exchange:This module manages rabbitMQ exchanges'
|
||||
'rabbitmq_parameter:Adds or removes parameters to RabbitMQ'
|
||||
'rabbitmq_plugin:Adds or removes plugins to RabbitMQ'
|
||||
'rabbitmq_policy:Manage the state of policies in RabbitMQ.'
|
||||
'rabbitmq_queue:This module manages rabbitMQ queues'
|
||||
'rabbitmq_user:Adds or removes users to RabbitMQ'
|
||||
'rabbitmq_vhost:Manage the state of a virtual host in RabbitMQ'
|
||||
'raw:Executes a low-down and dirty SSH command'
|
||||
'rax:create / delete an instance in Rackspace Public Cloud'
|
||||
'rax_cbs:Manipulate Rackspace Cloud Block Storage Volumes'
|
||||
'rax_cbs_attachments:Manipulate Rackspace Cloud Block Storage Volume Attachments'
|
||||
'rax_cdb:create/delete or resize a Rackspace Cloud Databases instance'
|
||||
'rax_cdb_database:create / delete a database in the Cloud Databases'
|
||||
'rax_cdb_user:create / delete a Rackspace Cloud Database'
|
||||
'rax_clb:create / delete a load balancer in Rackspace Public Cloud'
|
||||
'rax_clb_nodes:add, modify and remove nodes from a Rackspace Cloud Load Balancer'
|
||||
'rax_clb_ssl:Manage SSL termination for a Rackspace Cloud Load Balancer.'
|
||||
'rax_dns:Manage domains on Rackspace Cloud DNS'
|
||||
'rax_dns_record:Manage DNS records on Rackspace Cloud DNS'
|
||||
'rax_facts:Gather facts for Rackspace Cloud Servers'
|
||||
'rax_files:Manipulate Rackspace Cloud Files Containers'
|
||||
'rax_files_objects:Upload, download, and delete objects in Rackspace Cloud Files'
|
||||
'rax_identity:Load Rackspace Cloud Identity'
|
||||
'rax_keypair:Create a keypair for use with Rackspace Cloud Servers'
|
||||
'rax_meta:Manipulate metadata for Rackspace Cloud Servers'
|
||||
'rax_mon_alarm:Create or delete a Rackspace Cloud Monitoring alarm.'
|
||||
'rax_mon_check:Create or delete a Rackspace Cloud Monitoring check for an existing entity.'
|
||||
'rax_mon_entity:Create or delete a Rackspace Cloud Monitoring entity'
|
||||
'rax_mon_notification:Create or delete a Rackspace Cloud Monitoring notification.'
|
||||
'rax_mon_notification_plan:Create or delete a Rackspace Cloud Monitoring notification plan.'
|
||||
'rax_network:create / delete an isolated network in Rackspace Public Cloud'
|
||||
'rax_queue:create / delete a queue in Rackspace Public Cloud'
|
||||
'rax_scaling_group:Manipulate Rackspace Cloud Autoscale Groups'
|
||||
'rax_scaling_policy:Manipulate Rackspace Cloud Autoscale Scaling Policy'
|
||||
'rds:create, delete, or modify an Amazon rds instance'
|
||||
'rds_param_group:manage RDS parameter groups'
|
||||
'rds_subnet_group:manage RDS database subnet groups'
|
||||
'redhat_subscription:Manage Red Hat Network registration and subscriptions using the ``subscription-manager`` command'
|
||||
'redis:Various redis commands, slave and flush'
|
||||
'replace:Replace all instances of a particular string in a file using a back-referenced regular expression.'
|
||||
'rhn_channel:Adds or removes Red Hat software channels'
|
||||
'rhn_register:Manage Red Hat Network registration using the ``rhnreg_ks`` command'
|
||||
'riak:This module handles some common Riak operations'
|
||||
'rollbar_deployment:Notify Rollbar about app deployments'
|
||||
'route53:add or delete entries in Amazons Route53 DNS service'
|
||||
'route53_facts:Retrieves route53 details using AWS methods'
|
||||
'route53_health_check:add or delete health-checks in Amazons Route53 DNS service'
|
||||
'route53_zone:add or delete Route53 zones'
|
||||
'rpm_key:Adds or removes a gpg key from the rpm db'
|
||||
's3:manage objects in S3.'
|
||||
's3_bucket:Manage s3 buckets in AWS'
|
||||
's3_lifecycle:Manage s3 bucket lifecycle rules in AWS'
|
||||
's3_logging:Manage logging facility of an s3 bucket in AWS'
|
||||
'script:Runs a local script on a remote node after transferring it'
|
||||
'seboolean:Toggles SELinux booleans.'
|
||||
'selinux:Change policy and state of SELinux'
|
||||
'selinux_permissive:Change permissive domain in SELinux policy'
|
||||
'sendgrid:Sends an email with the SendGrid API'
|
||||
'sensu_check:Manage Sensu checks'
|
||||
'seport:Manages SELinux network port type definitions'
|
||||
'service:Manage services.'
|
||||
'set_fact:Set host facts from a task'
|
||||
'setup:Gathers facts about remote hosts'
|
||||
'shell:Execute commands in nodes.'
|
||||
'slack:Send Slack notifications'
|
||||
'slackpkg:Package manager for Slackware >= 12.2'
|
||||
'slurp:Slurps a file from remote nodes'
|
||||
'snmp_facts:Retrieve facts for a device using SNMP.'
|
||||
'sns:Send Amazon Simple Notification Service (SNS) messages'
|
||||
'sns_topic:Manages AWS SNS topics and subscriptions'
|
||||
'solaris_zone:Manage Solaris zones'
|
||||
'sqs_queue:Creates or deletes AWS SQS queues.'
|
||||
'stackdriver:Send code deploy and annotation events to stackdriver'
|
||||
'stat:retrieve file or file system status'
|
||||
'sts_assume_role:Assume a role using AWS Security Token Service and obtain temporary credentials'
|
||||
'subversion:Deploys a subversion repository.'
|
||||
'supervisorctl:Manage the state of a program or group of programs running via supervisord'
|
||||
'svc:Manage daemontools services.'
|
||||
'svr4pkg:Manage Solaris SVR4 packages'
|
||||
'swdepot:Manage packages with swdepot package manager (HP-UX)'
|
||||
'synchronize:Uses rsync to make synchronizing file paths in your playbooks quick and easy.'
|
||||
'sysctl:Manage entries in sysctl.conf.'
|
||||
'taiga_issue:Creates/deletes an issue in a Taiga Project Management Platform'
|
||||
'template:Templates a file out to a remote server.'
|
||||
'twilio:Sends a text message to a mobile phone through Twilio.'
|
||||
'typetalk:Send a message to typetalk'
|
||||
'ufw:Manage firewall with UFW'
|
||||
'unarchive:Unpacks an archive after (optionally) copying it from the local machine.'
|
||||
'uptimerobot:Pause and start Uptime Robot monitoring'
|
||||
'uri:Interacts with webservices'
|
||||
'urpmi:Urpmi manager'
|
||||
'user:Manage user accounts'
|
||||
'vca_fw:add remove firewall rules in a gateway in a vca'
|
||||
'vca_nat:add remove nat rules in a gateway in a vca'
|
||||
'vca_vapp:Manages vCloud Air vApp instances.'
|
||||
'vertica_configuration:Updates Vertica configuration parameters.'
|
||||
'vertica_facts:Gathers Vertica database facts.'
|
||||
'vertica_role:Adds or removes Vertica database roles and assigns roles to them.'
|
||||
'vertica_schema:Adds or removes Vertica database schema and roles.'
|
||||
'vertica_user:Adds or removes Vertica database users and assigns roles.'
|
||||
'virt:Manages virtual machines supported by libvirt'
|
||||
'virt_net:Manage libvirt network configuration'
|
||||
'virt_pool:Manage libvirt storage pools'
|
||||
'vmware_cluster:Create VMware vSphere Cluster'
|
||||
'vmware_datacenter:Manage VMware vSphere Datacenters'
|
||||
'vmware_dns_config:Manage VMware ESXi DNS Configuration'
|
||||
'vmware_dvs_host:Add or remove a host from distributed virtual switch'
|
||||
'vmware_dvs_portgroup:Create or remove a Distributed vSwitch portgroup'
|
||||
'vmware_dvswitch:Create or remove a distributed vSwitch'
|
||||
'vmware_host:Add/remove ESXi host to/from vCenter'
|
||||
'vmware_migrate_vmk:Migrate a VMK interface from VSS to VDS'
|
||||
'vmware_portgroup:Create a VMware portgroup'
|
||||
'vmware_target_canonical_facts:Return canonical (NAA) from an ESXi host'
|
||||
'vmware_vm_facts:Return basic facts pertaining to a vSphere virtual machine guest'
|
||||
'vmware_vm_shell:Execute a process in VM'
|
||||
'vmware_vm_vss_dvs_migrate:Migrates a virtual machine from a standard vswitch to distributed'
|
||||
'vmware_vmkernel:Create a VMware VMkernel Interface'
|
||||
'vmware_vmkernel_ip_config:Configure the VMkernel IP Address'
|
||||
'vmware_vsan_cluster:Configure VSAN clustering on an ESXi host'
|
||||
'vmware_vswitch:Add a VMware Standard Switch to an ESXi host'
|
||||
'vsphere_copy:Copy a file to a vCenter datastore'
|
||||
'vsphere_guest:Create/delete/manage a guest VM through VMware vSphere.'
|
||||
'wait_for:Waits for a condition before continuing.'
|
||||
'webfaction_app:Add or remove applications on a Webfaction host'
|
||||
'webfaction_db:Add or remove a database on Webfaction'
|
||||
'webfaction_domain:Add or remove domains and subdomains on Webfaction'
|
||||
'webfaction_mailbox:Add or remove mailboxes on Webfaction'
|
||||
'webfaction_site:Add or remove a website on a Webfaction host'
|
||||
'win_acl:Set file/directory permissions for a system user or group.'
|
||||
'win_chocolatey:Installs packages using chocolatey'
|
||||
'win_copy:Copies files to remote locations on windows hosts.'
|
||||
'win_dotnet_ngen:Runs ngen to recompile DLLs after .NET updates'
|
||||
'win_environment:Modifies environment variables on windows hosts.'
|
||||
'win_feature:Installs and uninstalls Windows Features'
|
||||
'win_file:Creates, touches or removes files or directories.'
|
||||
'win_file_version:Get DLL or EXE file build version'
|
||||
'win_firewall_rule:Windows firewall automation'
|
||||
'win_get_url:Fetches a file from a given URL'
|
||||
'win_group:Add and remove local groups'
|
||||
'win_iis_virtualdirectory:Configures a virtual directory in IIS.'
|
||||
'win_iis_webapplication:Configures a IIS Web application.'
|
||||
'win_iis_webapppool:Configures a IIS Web Application Pool.'
|
||||
'win_iis_webbinding:Configures a IIS Web site.'
|
||||
'win_iis_website:Configures a IIS Web site.'
|
||||
'win_lineinfile:Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression.'
|
||||
'win_msi:Installs and uninstalls Windows MSI files'
|
||||
'win_nssm:NSSM '
|
||||
'win_package:Installs/Uninstalls a installable package, either from local file system or url'
|
||||
'win_ping:A windows version of the classic ping module.'
|
||||
'win_regedit:Add, Edit, or Remove Registry Keys and Values'
|
||||
'win_regmerge:Merges the contents of a registry file into the windows registry'
|
||||
'win_scheduled_task:Manage scheduled tasks'
|
||||
'win_service:Manages Windows services'
|
||||
'win_share:Manage Windows shares'
|
||||
'win_stat:returns information about a Windows file'
|
||||
'win_template:Templates a file out to a remote server.'
|
||||
'win_timezone:Sets Windows machine timezone'
|
||||
'win_unzip:Unzips compressed files and archives on the Windows node'
|
||||
'win_updates:Download and install Windows updates'
|
||||
'win_uri:Interacts with webservices.'
|
||||
'win_user:Manages local Windows user accounts'
|
||||
'win_webpicmd:Installs packages using Web Platform Installer command-line'
|
||||
'xattr:set/retrieve extended attributes'
|
||||
'xenserver_facts:get facts reported on xenserver'
|
||||
'yum:Manages packages with the *yum* package manager'
|
||||
'yum_repository:Add and remove YUM repositories'
|
||||
'zabbix_group:Zabbix host groups creates/deletes'
|
||||
'zabbix_host:Zabbix host creates/updates/deletes'
|
||||
'zabbix_hostmacro:Zabbix host macro creates/updates/deletes'
|
||||
'zabbix_maintenance:Create Zabbix maintenance windows'
|
||||
'zabbix_screen:Zabbix screen creates/updates/deletes'
|
||||
'zfs:Manage zfs'
|
||||
'znode:Create, delete, retrieve, and update znodes using ZooKeeper.'
|
||||
'zypper:Manage packages on SUSE and openSUSE'
|
||||
'zypper_repository:Add and remove Zypper repositories'
|
||||
)
|
||||
|
||||
|
||||
_ansible ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -W \
|
||||
'1:pattern:->pattern'\
|
||||
"(-a --args)"{-a,--args}"[ARGS module arguments]:arguments:(ARG)"\
|
||||
'--ask-become-pass[ask for privilege escalation password]'\
|
||||
"(-k --ask-pass)"{-k,--ask-pass}"[ask for connection password]"\
|
||||
'--ask-su-pass[ask for su password (deprecated, use become)]'\
|
||||
"(-K --ask-sudo-pass)"{-K,--ask-sudo-pass}"[ask for sudo password (deprecated, use become)]"\
|
||||
'--ask-vault-pass[ask for vault password]'\
|
||||
"(-B --background)"{-B,--background}"[DURATION run asynchronously for DURATION (s)]:duration:(DURATION)"\
|
||||
"(-b --become)"{-b,--become}"[run operations with become (nopasswd implied)]"\
|
||||
'--become-method[privilege escalation method to use (default=sudo)]:method:(sudo su pbrun pfexec runas doas)'\
|
||||
'--become-user[run operations as this user (default=root)]:user:(USER)'\
|
||||
"(-C --check)"{-C,--check}"[don't make any changes]"\
|
||||
"(-c --connection)"{-c,--connection}"[CONNECTION connection type to use (default=smart)]:connection type:(smart ssh local chroot)"\
|
||||
"(-D --diff)"{-D,--diff}"[show differences when changing (small) files and templates]"\
|
||||
"(-e --extra-vars)"{-e,--extra-vars}"[set additional variables as key=value or YAML/JSON]"\
|
||||
"(-f --forks)"{-f,--forks}"[FORKS number of parallel processes to use (default=5)]:forks:(5)"\
|
||||
"(-h --help)"{-h,--help}"[help message]"\
|
||||
"(-i --inventory-file)"{-i,--inventory-file}"[INVENTORY specify inventory host file]:inventory file:_files"\
|
||||
"(-l --limit)"{-l,--limit}"[SUBSET further limit selected hosts to an additional pattern]:subset pattern:->pattern"\
|
||||
'--list-hosts[outputs a list of matching hosts. Does not execute anything else]'\
|
||||
"(-m --module-name)"{-m,--module-name}"[MODULE_NAME module name (default=command)]:module name:->module"\
|
||||
"(-M --module-path)"{-M,--module-path}"[MODULE_PATH specify path to module library (default=None)]:module path:_files -/"\
|
||||
'--new-vault-password-file[new vault password file for rekey]:new vault password file:_files'\
|
||||
"(-o --one-line)"{-o,--one-line}"[condense output]"\
|
||||
'--output[output file name for encrypt or decrypt; use - for stdout]:output file:_files'\
|
||||
"(-P --poll)"{-P,--poll}"[POLL_INTERVAL set the poll interval (s) if using -B (default=15)]:poll interval:(15)"\
|
||||
'--private-key[PRIVATE_KEY_FILE use this file to authenticate the connection]:private key file:_files'\
|
||||
'--scp-extra-args[specify extra arguments to pass to scp only]'\
|
||||
'--sftp-extra-args[specify extra arguments to pass to sftp only]'\
|
||||
'--ssh-common-args[specify common arguments to pass to sftp/scp/ssh]'\
|
||||
'--ssh-extra-args[specify extra arguments to pass to ssh only]'\
|
||||
"(-S --su)"{-S,--su}"[run operations with su (deprecated, use become)]"\
|
||||
"(-R --su-user)"{-R,--su-user}"[SU_USER run operations with su as this user (default=root) (deprecated, use become)]:su user:(root)"\
|
||||
"(-s --sudo)"{-s,--sudo}"[run operations with sudo (nopasswd) (deprecated, use become)]"\
|
||||
"(-U --sudo-user)"{-U,--sudo-user}"[SUDO_USER desired sudo user (default=root) (deprecated, use become)]:su user:(root)"\
|
||||
'--syntax-check[perform a syntax check on the playbook, but do not execute it]'\
|
||||
"(-T --timeout)"{-T,--timeout}"[TIMEOUT override the SSH timeout (s) (default=10)]:ssh timeout:(10)"\
|
||||
"(-t --tree)"{-t,--tree}"[OUTPUT_DIRECTORY log output to this directory]:output directory:_files -/"\
|
||||
"(-u --user)"{-u,--user}"[REMOTE_USER connect as this user (default=${USER})]:connect as user:(${USER})"\
|
||||
"--vault-password-file[VAULT_PASSWORD_FILE vault password file]:vault password file:_files"\
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]"\
|
||||
"--version[show program's version number and exit]"\
|
||||
|
||||
case $state in
|
||||
pattern)
|
||||
_arguments '*:feature:__host_list'
|
||||
_arguments '*:feature:__group_list'
|
||||
;;
|
||||
module)
|
||||
_describe -t commands "modules" _modules
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_ansible "$@"
|
||||
|
||||
# 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,183 +0,0 @@
|
|||
#compdef ansible-galaxy
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 ansible-galaxy v2.0.0.2 (http://ansible.org)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Romain Bossart (https://github.com/bosr)
|
||||
# * Adam Stevko (https://github.com/xen0l)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Note: I tried to use `_arguments --`, but the output of `ansible --help`
|
||||
# is not parsed entirely correctly, and anyway no modules or host would available.
|
||||
#
|
||||
|
||||
# ansible-galaxy zsh completion
|
||||
#
|
||||
_ansible-galaxy ()
|
||||
{
|
||||
local context curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
"1:command:(delete import info init install list login remove search setup)" \
|
||||
"*::option:->option"
|
||||
|
||||
case $state in
|
||||
option)
|
||||
case $line[1] in
|
||||
delete)
|
||||
_arguments \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
":github_user:(GITHUB_USER)" \
|
||||
":github_repo:(GITHUB_REPO)"
|
||||
;;
|
||||
import)
|
||||
_arguments \
|
||||
"--branch[REFERENCE The name of a branch to import.]:reference:(master)" \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"--no-wait[Don't wait for import results.]" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"--status[Check the status of the most recent import request forgiven github_user/github_repo.]" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
":github_user:(GITHUB_USER)" \
|
||||
":github_repo:(GITHUB_REPO)"
|
||||
;;
|
||||
info)
|
||||
_arguments \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"(-p --roles-path)"{-p,--roles-path}"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
":role name:(ROLE,version)"
|
||||
;;
|
||||
init)
|
||||
_arguments \
|
||||
"(-f --force)"{-f,--force}"[ Force overwriting an existing role]" \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"(-p --init-path)"{-p,--init-path}"[INIT_PATH path in which the skeleton role will be created (default=./)]:init path:(./)" \
|
||||
"(--offline)--offline[Don't query the galaxy API when creating roles]" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
":role name:(ROLE)"
|
||||
;;
|
||||
install)
|
||||
_arguments \
|
||||
"(-f --force)"{-f,--force}"[Force overwriting an existing role]" \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"(-i --ignore-errors)"{-i,--ignore-errors}"[Ignore errors and continue with the next specified role]" \
|
||||
"(-n --no-deps)"{-n,--no-deps}"[Don't download roles listed as dependencies]" \
|
||||
"(-r --role-file)"{-r,--role-file}"[ROLE_FILE A file containing a list of roles to be imported]:role file:_files" \
|
||||
"(-p --roles-path)"{-p,--roles-path}"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
":role name:(ROLE)"
|
||||
;;
|
||||
list)
|
||||
_arguments \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-p --roles-path)"{-p,--roles-path}"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
":role name:(ROLE)"
|
||||
;;
|
||||
login)
|
||||
_arguments \
|
||||
"--github_token[TOKEN Identify with github token rather than username and password.]:token:(TOKEN)" \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]"
|
||||
;;
|
||||
remove)
|
||||
_arguments \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-p --roles-path)"{-p,--roles-path}"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
"*:role name:(ROLE)"
|
||||
;;
|
||||
search)
|
||||
_arguments \
|
||||
"--author[AUTHOR GitHub username]:author:(AUTHOR)" \
|
||||
"--galaxy-tags[TAGS list of galaxy tags to filter by]:tags:(TAGS)" \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"--platforms[PLATFORMS list of OS platforms to filter by" \
|
||||
"(-p --roles-path)"{-p,--roles-path}"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]"
|
||||
;;
|
||||
setup)
|
||||
_arguments \
|
||||
"(-h --help)"{-h,--help}"[help message]" \
|
||||
"(-c --ignore-certs)"{-c,--ignore-certs}"[Ignore SSL certificate validation errors.]" \
|
||||
"--list[List all of your integrations.]" \
|
||||
"--remove[REMOVE_ID Remove the integration matching the provided ID value.]:id:(REMOVE_ID)" \
|
||||
"(-s --server)"{-s,--server}"[API_SERVER The API server destination]:api server:(http://apiserver)" \
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]" \
|
||||
"--version[show program's version number and exit]" \
|
||||
":source:(travis)" \
|
||||
":github_user:(GITHUB_USER)" \
|
||||
":github_repo:(GITHUB_REPO)" \
|
||||
":secret:(SECRET)"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_ansible-galaxy "$@"
|
||||
|
||||
# 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,190 +0,0 @@
|
|||
#compdef ansible-playbook
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 ansible-playbook v2.0.0.2 (http://ansible.org)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Romain Bossart (https://github.com/bosr)
|
||||
# * Adam Stevko (https://github.com/xen0l)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
#
|
||||
# Needs either ANSIBLE_HOSTS or /etc/ansible/hosts on linux
|
||||
# (or /usr/local/etc/ansible/hosts on OSX)
|
||||
#
|
||||
# Note 1: the following gist (https://gist.github.com/15ed54a438a36d67fd99.git)
|
||||
# has some files to help improve the hostfile shell parsing
|
||||
#
|
||||
# Note 2: I tried to use `_arguments --`, but the output of `ansible --help`
|
||||
# is not parsed entirely correctly, and anyway no modules or host would available.
|
||||
#
|
||||
|
||||
# ansible-playbook zsh completion
|
||||
#
|
||||
__host_file_location () {
|
||||
# find the location of the host file:
|
||||
# 1. check $ANSIBLE_HOSTS
|
||||
# 2. else check /etc/ansible/hosts or /usr/local/etc/...
|
||||
# (depending on platform)
|
||||
#
|
||||
|
||||
[[ "$OSTYPE" == darwin* ]] && FALLBACK="/usr/local/etc/ansible/hosts"
|
||||
[[ "$OSTYPE" == linux* ]] && FALLBACK="/etc/ansible/hosts"
|
||||
HOST_FILE=${ANSIBLE_HOSTS:=${FALLBACK}}
|
||||
[[ -f ${HOST_FILE} ]] || HOST_FILE=/dev/null
|
||||
|
||||
echo ${HOST_FILE}
|
||||
}
|
||||
|
||||
__ll_group_list () {
|
||||
# parses the ini hostfile for groups only: [...]
|
||||
HOST_FILE=$(__host_file_location)
|
||||
|
||||
local -a group_list
|
||||
group_list=$(command \
|
||||
cat ${HOST_FILE} \
|
||||
| awk '$1 ~ /^\[.*\]$/ && !/=/ && !/:vars/ \
|
||||
{ gsub(/[\[\]]/, "", $1); gsub(/:children/, "", $1) ; print $1 }' \
|
||||
| uniq )
|
||||
|
||||
echo ${group_list}
|
||||
}
|
||||
|
||||
|
||||
__host_list ()
|
||||
{
|
||||
# parses the ini hostfile for hosts only
|
||||
# but then has to remove all group occurrences
|
||||
HOST_FILE=$(__host_file_location)
|
||||
|
||||
# this will also contain groups if they are referenced in other groups
|
||||
local -a mixed_host_list
|
||||
mixed_host_list=$(command \
|
||||
cat ${HOST_FILE} \
|
||||
| awk 'NF && $1 !~ /[\[:=]/ { print $1 }' \
|
||||
| sort | uniq)
|
||||
|
||||
# compute set difference h1 - h2
|
||||
local -a h1 h2 host_list
|
||||
h1=${mixed_host_list}
|
||||
h2=$(__ll_group_list)
|
||||
host_list=($(command \
|
||||
sort <(echo $h1) <(echo $h2) <(echo $h2) \
|
||||
| uniq -u \
|
||||
| paste -s -d ' ' - )
|
||||
)
|
||||
|
||||
_wanted application expl 'hosts' compadd ${host_list}
|
||||
|
||||
# method that delegates to ansible (slow)
|
||||
# _wanted application expl 'hosts' compadd $(command ansible \
|
||||
# all --list-hosts\
|
||||
# 2>/dev/null)
|
||||
}
|
||||
|
||||
__group_list ()
|
||||
{
|
||||
gl=($(command echo $(__ll_group_list) | paste -s -d ' ' - )) # 'a\nb\nc' -> (a b c)
|
||||
_wanted application2 expl 'groups' compadd $gl
|
||||
}
|
||||
|
||||
|
||||
|
||||
_ansible-playbook ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C -W \
|
||||
"1:playbook yml file:_files -g '*.yml'"\
|
||||
'--ask-become-pass[ask for privilege escalation password]'\
|
||||
"(-k --ask-pass)"{-k,--ask-pass}"[ask for connection password]"\
|
||||
'--ask-su-pass[ask for su password (deprecated, use become)]'\
|
||||
"(-K --ask-sudo-pass)"{-K,--ask-sudo-pass}"[ask for sudo password (deprecated, use become)]"\
|
||||
'--ask-vault-pass[ask for vault password]'\
|
||||
"(-b --become)"{-b,--become}"[run operations with become (nopasswd implied)]"\
|
||||
'--become-method[privilege escalation method to use (default=sudo)]:method:(sudo su pbrun pfexec runas doas)'\
|
||||
'--become-user[run operations as this user (default=root)]:user:(USER)'\
|
||||
"(-C --check)"{-C,--check}"[don't make any changes]"\
|
||||
"(-c --connection)"{-c,--connection}"[CONNECTION connection type to use (default=smart)]:connection type:(smart ssh local chroot)"\
|
||||
"(-D --diff)"{-D,--diff}"[when changing (small files and templates, show the diff in those. Works great with --check)]"\
|
||||
"(-e --extra-vars)"{-e,--extra-vars}"[EXTRA_VARS set additional variables as key=value or YAML/JSON]:extra vars:(EXTRA_VARS)"\
|
||||
'--flush-cache[clear the fact cache]'\
|
||||
'--force-handlers[run handlers even if a task fails]'\
|
||||
"(-f --forks)"{-f,--forks}"[FORKS number of parallel processes to use (default=5)]:forks:(5)"\
|
||||
"(-h --help)"{-h,--help}"[help message]"\
|
||||
"(-i --inventory-file)"{-i,--inventory-file}"[INVENTORY specify inventory host file]:inventory file:_files"\
|
||||
"(-l --limit)"{-l,--limit}"[SUBSET further limit selected hosts to an additional pattern]:subset pattern:->pattern"\
|
||||
'--list-hosts[outputs a list of matching hosts. Does not execute anything else]'\
|
||||
'--list-tags[list all available tags]'\
|
||||
'--list-tasks[list all tasks that would be executed]'\
|
||||
"(-M --module-path)"{-M,--module-path}"[MODULE_PATH specify path to module library (default=None)]:module path:_files -/"\
|
||||
'--new-vault-password-file[new vault password file for rekey]:new vault password file:_files'\
|
||||
'--output[output file name for encrypt or decrypt; use - for stdout]:output file:_files'\
|
||||
'--private-key[PRIVATE_KEY_FILE use this file to authenticate the connection]:private key file:_files'\
|
||||
'--scp-extra-args[specify extra arguments to pass to scp only]'\
|
||||
'--sftp-extra-args[specify extra arguments to pass to sftp only]'\
|
||||
"--skip-tags[SKIP_TAGS only run plays and tasks whose tags do not match these values]:skip tags:(SKIP_TAGS)"\
|
||||
'--ssh-common-args[specify common arguments to pass to sftp/scp/ssh]'\
|
||||
'--ssh-extra-args[specify extra arguments to pass to ssh only]'\
|
||||
"--start-at-task[START_AT start the playbook at the task matching this name]:name:(TASK_NAME)"\
|
||||
'--step[one-step-at-a-time: confirm each task before running]'\
|
||||
"(-S --su)"{-S,--su}"[run operations with su (deprecated, use become)]"\
|
||||
"(-R --su-user)"{-R,--su-user}"[SU_USER run operations with su as this user (default=root) (deprecated, use become)]:su user:(root)"\
|
||||
"(-s --sudo)"{-s,--sudo}"[run operations with sudo (nopasswd) (deprecated, use become)]"\
|
||||
"(-U --sudo-user)"{-U,--sudo-user}"[SUDO_USER desired sudo user (default=root) (deprecated, use become)]:su user:(root)"\
|
||||
'--syntax-check[perform a syntax check on the playbook, but do not execute it]'\
|
||||
"(-t --tags)"{-t,--tags}"[TAGS only run plays and tasks gagged with these values]:task tags:(TAGS)"\
|
||||
"(-T --timeout)"{-T,--timeout}"[TIMEOUT override the SSH timeout (s) (default=10)]:ssh timeout:(10)"\
|
||||
"(-u --user)"{-u,--user}"[REMOTE_USER connect as this user (default=${USER})]:connect as user:(${USER})"\
|
||||
"--vault-password-file[VAULT_PASSWORD_FILE vault password file]:vault password file:_files"\
|
||||
"(-v --verbose)"{-v,--verbose}"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]"\
|
||||
"--version[show program's version number and exit]"\
|
||||
|
||||
case $state in
|
||||
pattern)
|
||||
_arguments '*:feature:__host_list'
|
||||
_arguments '*:feature:__group_list'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_ansible-playbook "$@"
|
||||
|
||||
# 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,6 +1,6 @@
|
|||
#compdef archlinux-java
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -43,7 +43,7 @@ _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 'Downloads to delete' java_versions
|
||||
_describe -t output 'Java environments' java_versions
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#compdef atach
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -69,3 +69,10 @@ 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
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#compdef homestead
|
||||
#compdef augmatch
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,26 +28,39 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for homestead (http://laravel.com/docs/homestead).
|
||||
# Completion script for augmatch 1.14.1 (https://augeas.net/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * loranger (https://github.com/loranger)
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_homestead_get_command_list () {
|
||||
homestead --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }'
|
||||
_augmatch_lens() {
|
||||
local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//'))
|
||||
_values lenses $lenses
|
||||
}
|
||||
|
||||
_homestead () {
|
||||
if [ -f homestead ]; then
|
||||
compadd `_homestead_get_command_list`
|
||||
fi
|
||||
}
|
||||
_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'
|
||||
|
||||
compdef _homestead php homestead
|
||||
compdef _homestead homestead
|
||||
# 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,6 +1,6 @@
|
|||
#compdef artisan
|
||||
#compdef augparse
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,36 +28,29 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for artisan (http://laravel.com/docs/artisan).
|
||||
# Completion script for augparse 1.14.1 (https://augeas.net/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * loranger (https://github.com/loranger)
|
||||
# * Yohan Tambè (https://github.com/Cronos87)
|
||||
# * 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'
|
||||
|
||||
_artisan_get_command_list () {
|
||||
IFS=" "
|
||||
php artisan --no-ansi | \
|
||||
sed "1,/Available commands/d" | \
|
||||
awk '/ [a-z]+/ { print $1 }' | \
|
||||
sed -E 's/^[ ]+//g' | \
|
||||
sed -E 's/[:]+/\\:/g' | \
|
||||
sed -E 's/[ ]{2,}/\:/g'
|
||||
}
|
||||
|
||||
_artisan () {
|
||||
if [ -f artisan ]; then
|
||||
local -a commands
|
||||
IFS=$'\n'
|
||||
commands=(`_artisan_get_command_list`)
|
||||
_describe 'commands' commands
|
||||
fi
|
||||
}
|
||||
|
||||
compdef _artisan php artisan
|
||||
compdef _artisan artisan
|
||||
# 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,6 +1,6 @@
|
|||
#compdef console
|
||||
#compdef augprint
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,37 +28,34 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for symfony console (https://github.com/symfony/Console).
|
||||
# Completion script for augprint 1.14.1 (https://augeas.net/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * loranger (https://github.com/loranger)
|
||||
# * Yohan Tambè (https://github.com/Cronos87)
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_find_console () {
|
||||
echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)"
|
||||
_augprint_lens() {
|
||||
local lenses=($(augtool --noload 'match /augeas/load/*/lens' | sed -e 's/.*@//'))
|
||||
_values lenses $lenses
|
||||
}
|
||||
|
||||
_console_get_command_list () {
|
||||
IFS=" "
|
||||
`_find_console` --no-ansi | \
|
||||
sed "1,/Available commands/d" | \
|
||||
awk '/ [a-z]+/ { print $0 }' | \
|
||||
sed -E 's/^[ ]+//g' | \
|
||||
sed -E 's/[:]+/\\:/g' | \
|
||||
sed -E 's/[ ]{2,}/\:/g'
|
||||
}
|
||||
_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'
|
||||
|
||||
_console () {
|
||||
local -a commands
|
||||
IFS=$'\n'
|
||||
commands=(`_console_get_command_list`)
|
||||
_describe 'commands' commands
|
||||
}
|
||||
|
||||
compdef _console php console
|
||||
compdef _console console
|
||||
# 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
|
||||
111
src/_bower
111
src/_bower
|
|
@ -1,6 +1,6 @@
|
|||
#compdef bower
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Bower (http://bower.io).
|
||||
# Completion script for Bower (https://bower.io).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -39,45 +39,42 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" state line _packages _opts ret=1
|
||||
local curcontext="$curcontext" state line _opts ret=1
|
||||
|
||||
_arguments -C -A "-v" -A "--version" \
|
||||
_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]"
|
||||
_arguments \
|
||||
'(--force)--force[Makes various commands more forceful]' \
|
||||
'(--json)--json[Output consumable JSON]' \
|
||||
'(--log-level)--log-level[What level of logs to report]' \
|
||||
'(--offline)--offline[Do not hit the network]' \
|
||||
'(--quiet)--quiet[Only output important information]' \
|
||||
'(--silent)--silent[Do not output anything, besides errors]' \
|
||||
'(--verbose)--verbose[Makes output more verbose]' \
|
||||
'(--allow-root)--allow-root[Allows running commands as root]' \
|
||||
'(--version)--version[Output Bower version]' \
|
||||
'(--no-color)--no-color[Disable colors]'
|
||||
ret=0
|
||||
"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
|
||||
|
|
@ -98,54 +95,46 @@ case $state in
|
|||
'update' \
|
||||
'uninstall' \
|
||||
'unregister' \
|
||||
'version'
|
||||
ret=0
|
||||
'version' && ret=0
|
||||
;;
|
||||
(home|info|init|link|lookup|prune|register|search|unregister)
|
||||
_arguments \
|
||||
'(--help)--help[Show help message]'
|
||||
ret=0
|
||||
'--help[show help message]' && ret=0
|
||||
;;
|
||||
install)
|
||||
_arguments \
|
||||
'(--force-latest)--force-latest[Force latest version on conflict]' \
|
||||
'(--help)--help[Show help message]' \
|
||||
'(--production)--production[Do not install project devDependencies]' \
|
||||
'(--save)--save[Save installed packages into the project''s bower.json dependencies]' \
|
||||
'(--save-dev)--save-dev[Save installed packages into the project''s bower.json devDependencies]'
|
||||
ret=0
|
||||
'--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)--help[Show help message]' \
|
||||
'(--paths)--paths[Generate a simple JSON source mapping]' \
|
||||
'(--relative)--relative[Make paths relative to the directory config property, which defaults to bower_components]'
|
||||
ret=0
|
||||
'--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)--help[Show help message]' \
|
||||
'(-t --token)'{-t,--token}'[Pass GitHub auth token (will not prompt for username/password)]'
|
||||
ret=0
|
||||
'--help[show help message]' \
|
||||
'(-t --token)'{-t,--token}'[Pass GitHub auth token (will not prompt for username/password)]' && ret=0
|
||||
;;
|
||||
uninstall)
|
||||
_arguments \
|
||||
'(--help)--help[Show help message]' \
|
||||
'(--save)--save[Save installed packages into th projects''s bower.json dependencies]' \
|
||||
'(--save-dev)--save-dev[Save installed packages into th projects''s bower.json devDependencies]'
|
||||
ret=0
|
||||
'--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[Force latest version on conflict]' \
|
||||
'(--help)--help[Show help message]' \
|
||||
'(--production)--production[Do not install project devDependencies]'
|
||||
ret=0
|
||||
'--force-latest[force latest version on conflict]' \
|
||||
'--help[show help message]' \
|
||||
"--production[don't install project devDependencies]" && ret=0
|
||||
;;
|
||||
version)
|
||||
_arguments \
|
||||
'(--message)--message[Custom git commit and tag message]'
|
||||
ret=0
|
||||
'--message[custom git commit and tag message]' && ret=0
|
||||
;;
|
||||
exec)
|
||||
_normal && ret=0
|
||||
|
|
@ -154,7 +143,7 @@ case $state in
|
|||
_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 'options' $_opts && ret=0
|
||||
_values 'option' $_opts && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
512
src/_bundle
512
src/_bundle
|
|
@ -1,6 +1,6 @@
|
|||
#compdef bundle
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,97 +28,451 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Bundler (http://gembundler.com).
|
||||
# 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 curcontext="$curcontext" state line _gems _opts ret=1
|
||||
local ret=1
|
||||
|
||||
_arguments -C -A "-v" -A "--version" \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args' && ret=0
|
||||
_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
|
||||
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]" \
|
||||
"platform[Displays platform compatibility information]" \
|
||||
"outdated[Show all of the outdated gems in the current bundle]"
|
||||
ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
help)
|
||||
_values 'commands' 'install' 'update' 'package' 'exec' 'config' 'check' 'list' 'show' 'console' 'open' 'viz' 'init' 'gem' 'help' 'platform' 'outdated' && ret=0
|
||||
;;
|
||||
install)
|
||||
_policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')
|
||||
_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' \
|
||||
'(--with)--with=-[include gems that are part of the specified named group]:groups' \
|
||||
'(--clean)--clean[remove any gems not present in the current Gemfile]' \
|
||||
'(--full-index)--full-index[download and cache the index file of all gems]' \
|
||||
'(--jobs)--jobs=-[install gems parallely]:number' \
|
||||
'(--force)--force[force download every gem]' \
|
||||
'(--no-cache)--no-cache[do not update the cache in vendor/cache with newly installed gems]' \
|
||||
'(--no-prune)--no-prune[do not remove stale gem from cache after installation]' \
|
||||
'(--retry)--retry=-[number of times to retry failed network or git requests]:number' \
|
||||
'(--sheband)--shebang=-[specify ruby executable to execute scripts]:ruby' \
|
||||
'(--standalone)--standalone=-[create standalone bundles]:groups' \
|
||||
"(--trust-policy)--trust-policy=-[apply the Rubygems security policy]:arg:($_policies)"
|
||||
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
|
||||
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
|
||||
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
|
||||
|
|
|
|||
66
src/_cap
66
src/_cap
|
|
@ -1,6 +1,6 @@
|
|||
#compdef cap
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,13 +28,14 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Capistrano (http://capify.org).
|
||||
# Completion script for Capistrano 3.19.2 (https://capistranorb.com/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Bruno Michel (https://github.com/nono)
|
||||
# * Shohei Yoshida (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -42,32 +43,45 @@
|
|||
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
|
||||
'--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
|
||||
;;
|
||||
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
|
||||
|
|
|
|||
72
src/_cask
72
src/_cask
|
|
@ -1,6 +1,6 @@
|
|||
#compdef cask
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for cask (http://cask.readthedocs.org)
|
||||
# Completion script for cask (https://cask.readthedocs.io)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -41,16 +41,32 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
function _cask() {
|
||||
local ret=1 state
|
||||
_arguments \
|
||||
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
|
||||
'*:: :->subcmds' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
subcommand)
|
||||
subcommands=(
|
||||
(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"
|
||||
|
|
@ -71,15 +87,33 @@ function _cask() {
|
|||
"upgrade:upgrade Cask itself and its dependencies"
|
||||
"version:print program version"
|
||||
)
|
||||
_describe -t subcommands 'cask subcommands' subcommands && ret=0
|
||||
esac
|
||||
|
||||
case "$words[1]" in
|
||||
init)
|
||||
_arguments \
|
||||
'(--dev)--dev[Run in dev mode]' && ret=0 ;;
|
||||
exec)
|
||||
_generic
|
||||
_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
|
||||
|
||||
|
|
@ -87,3 +121,11 @@ function _cask() {
|
|||
}
|
||||
|
||||
_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,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
|
||||
77
src/_chattr
77
src/_chattr
|
|
@ -1,77 +0,0 @@
|
|||
#compdef chattr
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 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 chattr a tool to change file attributes on a Linux second extended file system. (http://e2fsprogs.sourceforge.net/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Jindřich Pilař (https://github.com/JindrichPilar)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_chattr() {
|
||||
|
||||
_arguments -C \
|
||||
"-R[Recursively change attributes of directories and their contents.]" \
|
||||
"-V[Be verbose with chattr's output and print the program version.]" \
|
||||
"-f[Suppress most error messages.]" \
|
||||
"-v[Set the file's version/generation number.]:version:" \
|
||||
"(-A)+A[Disable atime updates]" \
|
||||
"(+A)-A[Enable atime updates]" \
|
||||
"(-a)+a[Enable append only - file cannot be overridden]" \
|
||||
"(+a)-a[Disable append only - file can be overridden]" \
|
||||
"(-c)+c[Enable automatic compression]" \
|
||||
"(+c)-c[Disable automatic compression]" \
|
||||
"(-D)+D[Enable synchronous directory updates]" \
|
||||
"(+D)-D[Disable synchronous directory updates]" \
|
||||
"(-d)+d[Forbid backing file up with dump program]" \
|
||||
"(+d)-d[Allow backing file up with dump program]" \
|
||||
"(-i)+i[Mark as immutable]" \
|
||||
"(+i)-i[Unmark as immutable]" \
|
||||
"(-j)+j[Enable ext3 journaling]" \
|
||||
"(+j)-j[Disable ext3 journaling]" \
|
||||
"(-s)+s[Enable secure deletion - zero all blocks on delete]" \
|
||||
"(+s)-s[Disable secure deletion - do not zero all blocks on delete]" \
|
||||
"(-S)+S[Enable synchronous updates]" \
|
||||
"(+S)-S[Disable synchronous updates]" \
|
||||
"(-T)+T[Set top of hierarchy - direct subdirectories are allocated independently]" \
|
||||
"(+T)-T[Unset top of hierarchy]" \
|
||||
"(-t)+t[Disable tail merging]" \
|
||||
"(+t)-t[Enable tail merging]" \
|
||||
"(-u)+u[Mark as undeletable - enable undeletion]" \
|
||||
"(+u)-u[Unmark as undeletable - disable undeletion]" \
|
||||
'*:files:_files' \
|
||||
}
|
||||
|
||||
_chattr
|
||||
|
||||
|
|
@ -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
|
||||
73
src/_cheat
73
src/_cheat
|
|
@ -1,73 +0,0 @@
|
|||
#compdef cheat
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 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 Cheat an interactive cheatsheets on the command-line. (https://github.com/chrisallenlane/cheat/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Jindřich Pilař (https://github.com/JindrichPilar)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local cheats
|
||||
|
||||
_cheat_load_cheats() {
|
||||
cheats=("${(f)$(cheat -l | cut -d' ' -f1)}")
|
||||
}
|
||||
|
||||
|
||||
_cheat() {
|
||||
|
||||
|
||||
_arguments -C -s -S -n \
|
||||
'(- 1 *)'{-d,--directories}'[List directories on CHEATPATH]: :->full' \
|
||||
'(- 1 *)'{-e,--edit}'[Edit cheatsheet]:cheat:->cheats' \
|
||||
'(- 1 *)'{-l,--list}'[List cheatsheets]: :->full' \
|
||||
'(- 1 *)'{-s,--search}'[Search cheatsheets for <keyword>]: :->full' \
|
||||
'(- 1 *)'{-v,--version}'[display version and copyright information]: :->full' \
|
||||
|
||||
case "$state" in
|
||||
(full)
|
||||
;;
|
||||
(cheats)
|
||||
_cheat_load_cheats
|
||||
_describe -t cheats 'cheats' cheats
|
||||
;;
|
||||
(*)
|
||||
_cheat_load_cheats
|
||||
_describe -t cheats 'cheats' cheats
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_cheat
|
||||
|
||||
|
|
@ -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,6 +1,6 @@
|
|||
#compdef choc
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for choc (http://chocolatapp.com)
|
||||
# Completion script for choc (https://chocolatapp.com/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
|
|||
|
|
@ -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
|
||||
594
src/_cmake
594
src/_cmake
|
|
@ -1,6 +1,6 @@
|
|||
#compdef cmake
|
||||
#compdef cmake -value-,CMAKE_GENERATOR,-default-
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,14 +28,15 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for CMake (http://www.cmake.org).
|
||||
# Completion script for CMake 4.3.0 (https://cmake.org).
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Scott M. Kroll <skroll@gmail.com> (initial version)
|
||||
# * Paul Seyfert <pseyfert@mathphys.fsk.uni-heidelberg.de> (handling of --build)
|
||||
# * Paul Seyfert <pseyfert.mathphys@gmail.com> (handling of --build and updates)
|
||||
# * Norbert Lange <nolange79@gmail.com> (presets, command mode, updates)
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
# Notes
|
||||
|
|
@ -50,37 +51,90 @@
|
|||
#
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
local context state line curcontext="$curcontext" cmake_args
|
||||
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'
|
||||
|
||||
local cmake_build_options;cmake_build_options=(
|
||||
'-C[Pre-load a script to populate the cache]:script:_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'
|
||||
'(-Wno-dev -Wdev)-Wno-dev[Suppress/Enable developer warnings]'
|
||||
'(-Wno-dev -Wdev)-Wdev[Suppress/Enable developer warnings]'
|
||||
'(-Wno-deprecated -Wdeprecated)-Wno-deprecated[Suppress/Enable deprecation warnings]'
|
||||
'(-Wno-deprecated -Wdeprecated)-Wdeprecated[Suppress/Enable deprecation warnings]'
|
||||
'(-Wno-error=dev -Werror=dev)-Wno-error=dev[Make developer warnings (not) errors]'
|
||||
'(-Wno-error=dev -Werror=dev)-Werror=dev[Make developer warnings (not) errors]'
|
||||
'(-Wno-error=deprecated -Werror=deprecated)-Werror=deprecated[Make deprecated macro and function warnings (not) errors]'
|
||||
'(-Wno-error=deprecated -Werror=deprecated)-Wno-error=deprecated[Make deprecated macro and function warnings (not) errors]'
|
||||
'--warn-uninitialized[Warn about uninitialized values.]'
|
||||
'--warn-unused-vars[Warn about unused variables.]'
|
||||
'--no-warn-unused-cli[Dont warn about command line options.]'
|
||||
'-i[Run in wizard mode]'
|
||||
'-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]"'
|
||||
'--trace[Put cmake in trace mode]'
|
||||
'--find-package[Run in pkg-config like mode.]'
|
||||
':cmake project:_files -/'
|
||||
# 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]
|
||||
|
|
@ -90,84 +144,112 @@ _cmake_generator_options() {
|
|||
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 -a targets
|
||||
if [ -f $1/Makefile ]
|
||||
then
|
||||
# `make help` doesn't work for Makefiles in general, but for cmake generated makefiles it does.
|
||||
i=1
|
||||
for target in $(make help | \grep -e "\.\.\." | sed "s/\.\.\. //" | sed "s/ (the default.*//") ; do
|
||||
targets[$i]=$target
|
||||
(( i = $i + 1 ))
|
||||
done
|
||||
elif [ -f $1/build.ninja ]
|
||||
then
|
||||
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
|
||||
i=1
|
||||
for target in $(ninja -C $1 -t targets all 2&>/dev/null | awk -F: '{print $1}') ; do
|
||||
targets[$i]="$target"
|
||||
(( i++ ))
|
||||
done
|
||||
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;build_extras=(
|
||||
local build_extras=(
|
||||
'--[Native build tool options]'
|
||||
'--target[specify build target]'
|
||||
'--clean-first[build target clean first]'
|
||||
'--config[For multi-configuration tools]'
|
||||
'--use-stderr')
|
||||
'--parallel[maximum number of build processes]'
|
||||
'--use-stderr'
|
||||
)
|
||||
local -a undescribed_build_extras
|
||||
i=1
|
||||
local i=1
|
||||
for be in $build_extras ; do
|
||||
undescribed_build_extras[$i]=$(echo $be | sed "s/\[.*//")
|
||||
(( i++ ))
|
||||
done
|
||||
inbuild=false
|
||||
nativemode=false
|
||||
|
||||
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
|
||||
inbuild=true
|
||||
buildat=$i
|
||||
if [[ $words[$i] == --build ]]; then
|
||||
in_build=true
|
||||
build_at=$i
|
||||
(( difference = $CURRENT - $i ))
|
||||
elif [[ $words[$i] == -- ]] ; then
|
||||
nativemode=true
|
||||
elif [[ $words[$i] == -- ]]; then
|
||||
dash_dash_position=$i
|
||||
fi
|
||||
done
|
||||
|
||||
# check if build mode has been left
|
||||
outofbuild=false
|
||||
for ((i = (($CURRENT - 1)); i > (($buildat + 1)); i--)); do
|
||||
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
|
||||
outofbuild=true
|
||||
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 [ "$nativemode" = true ] ; then
|
||||
_cmake_generator_options $words[(($buildat + 1))] && return 0
|
||||
|
||||
if (( $dash_dash_position > 0 )) ; then
|
||||
_cmake_generator_options $words[(($build_at + 1))] $dash_dash_position && return 0
|
||||
fi
|
||||
if [ "$inbuild" = false ] ; then
|
||||
_arguments -C -s \
|
||||
|
||||
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 [ $difference -eq 1 ] ; then
|
||||
# directly after --build comes the build directory
|
||||
_alternative ':current directory:(.)' 'directory::_directories' && return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --target ]] ; then
|
||||
# after --build <dir> --target, suggest targets
|
||||
_cmake_targets $words[(($buildat + 1))] && return 0
|
||||
_cmake_targets $words[(($build_at + 1))] && return 0
|
||||
elif [[ $words[(($CURRENT - 1))] == --config ]] ; then
|
||||
# after --build <dir> --config, no idea
|
||||
return 0
|
||||
elif [ "$outofbuild" = true ] ; then
|
||||
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
|
||||
|
|
@ -176,74 +258,115 @@ _cmake_on_build() {
|
|||
fi
|
||||
}
|
||||
|
||||
local cmake_help_actions;cmake_help_actions=(
|
||||
'(- 1)--help-command[Print help for a single command and exit]:command-name:_cmake_command_names'
|
||||
'(- 1)--help-command-list[List available listfile commands and exit]'
|
||||
'(- 1)--help-commands[Print help for all commands and exit]'
|
||||
'(- 1)--help-compatcommands[Print help for compatibility commands]'
|
||||
'(- 1)--help-module[Print help for compatibility commands]:module-name:_cmake_module_names'
|
||||
'(- 1)--help-module-list[Print help for a single module and exit]'
|
||||
'(- 1)--help-modules[Print help for all modules and exit]'
|
||||
'(- 1)--help-property[List available properties and exit]:property-name:_cmake_property_names'
|
||||
'(- 1)--help-property-list[List available properties and exit]'
|
||||
'(- 1)--help-properties[Print help for all properties and exit]'
|
||||
'(- 1)--help-variable[Print help for a single variable and exit]:variable-name:_cmake_variable_names'
|
||||
'(- 1)--help-variable-list[List documented variables and exit]'
|
||||
'(- 1)--help-variables[Print help for all variables and exit]'
|
||||
'(- 1)--copyright[Print the CMake copyright and exit]'
|
||||
'(- 1)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]'
|
||||
'(- 1)--help-full[Print full help and exit]'
|
||||
'(- 1)--help-html[Print full help in HTML format]'
|
||||
'(- 1)--help-man[Print full help as a UNIX man page and exit]'
|
||||
'(- 1)'{--version,-version}'[Print full help as a UNIX man page and exit]'
|
||||
)
|
||||
_cmake_help() {
|
||||
_arguments -C -s - help "$cmake_help_actions[@]"
|
||||
_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
|
||||
}
|
||||
|
||||
# -------------------
|
||||
# _cmake_command_names
|
||||
# -------------------
|
||||
(( $+functions[_cmake_command_names] )) ||
|
||||
_cmake_command_names() {
|
||||
local command_names; command_names=(${(f)"$($service --help-command-list 2> /dev/null)"})
|
||||
_values 'command name' ${command_names[@]:1} && return 0
|
||||
}
|
||||
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; command="$@[1]"
|
||||
local desc; desc="$@[2]"
|
||||
local list_names; list_names=(${(f)"$($service $command 2> /dev/null | sed -e 's/\[/\\\[/' -e 's/\]/\\\]/')"})
|
||||
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*})
|
||||
|
||||
_values ${desc} ${list_names[@]:1} && return 0
|
||||
}
|
||||
if [[ ${opts[(i)brakremove]} -le ${#opts} ]]; then
|
||||
list_names=(${^list_names//\[/\\\[})
|
||||
list_names=(${^list_names//\]/\\\]})
|
||||
fi
|
||||
|
||||
# ------------------
|
||||
# _cmake_module_names
|
||||
# ------------------
|
||||
(( $+functions[_cmake_module_names] )) ||
|
||||
_cmake_module_names() {
|
||||
_cmake_list_names '--help-module-list' 'module name' && return 0
|
||||
}
|
||||
|
||||
# --------------------
|
||||
# _cmake_property_names
|
||||
# --------------------
|
||||
(( $+functions[_cmake_property_names] )) ||
|
||||
_cmake_property_names() {
|
||||
_cmake_list_names '--help-property-list' 'property name' && return 0
|
||||
}
|
||||
|
||||
# ---------------------
|
||||
# _cmake_variable_names
|
||||
# ---------------------
|
||||
(( $+functions[_cmake_variable_names] )) ||
|
||||
_cmake_variable_names() {
|
||||
_cmake_list_names '--help-variable-list' 'variable name' && return 0
|
||||
_values ${desc} ${list_names[@]:-1} && return 0
|
||||
}
|
||||
|
||||
# ----------------------
|
||||
|
|
@ -263,7 +386,7 @@ _cmake_define_property() {
|
|||
# ----------------------------
|
||||
(( $+functions[_cmake_define_property_names] )) ||
|
||||
_cmake_define_property_names() {
|
||||
local alternatives; alternatives=(
|
||||
local alternatives=(
|
||||
'common-property-names:common property name:_cmake_define_common_property_names -qS='
|
||||
)
|
||||
local -A cmake_langs
|
||||
|
|
@ -283,14 +406,19 @@ _cmake_define_property_names() {
|
|||
# ---------------------------------
|
||||
(( $+functions[_cmake_define_lang_property_names] )) ||
|
||||
_cmake_define_lang_property_names() {
|
||||
local cmake_lang="$@[-2]" cmake_lang_desc="$@[-1]"
|
||||
local properties; properties=(
|
||||
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 Relase 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
|
||||
|
|
@ -301,16 +429,21 @@ _cmake_define_lang_property_names() {
|
|||
# -----------------------------------
|
||||
(( $+functions[_cmake_define_common_property_names] )) ||
|
||||
_cmake_define_common_property_names() {
|
||||
local properties; properties=(
|
||||
'CMAKE_MODULE_PATH:Search path for cmake modules'
|
||||
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'
|
||||
'CMAKE_TOOLCHAIN_FILE:Absolute or relative path to a cmake script which sets up toolchain related variables'
|
||||
'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 $@
|
||||
_describe -t 'common-property-names' 'common property name' properties "$@"
|
||||
}
|
||||
|
||||
# ----------------------------
|
||||
|
|
@ -319,51 +452,75 @@ _cmake_define_common_property_names() {
|
|||
(( $+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' _cmake_build_types && 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_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_*_FLAGS(|_?*)) _message -e compiler-flags 'compiler flags' && ret=0;;
|
||||
(*) _files && ret=0;;
|
||||
(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_build_types
|
||||
# ------------------
|
||||
(( $+functions[_cmake_build_types] )) ||
|
||||
_cmake_build_types() {
|
||||
local build_types; build_types=(
|
||||
'Debug'
|
||||
'Release'
|
||||
'RelWithDebInfo'
|
||||
'MinSizeRel'
|
||||
)
|
||||
_values 'build type' ${build_types[@]}
|
||||
}
|
||||
|
||||
# -----------------
|
||||
# _cmake_generators
|
||||
# -----------------
|
||||
(( $+functions[_cmake_generators] )) ||
|
||||
_cmake_generators() {
|
||||
local generators; generators=(
|
||||
'Unix Makefiles'
|
||||
'Ninja'
|
||||
'CodeBlocks - Ninja'
|
||||
'CodeBlocks - Unix Makefiles'
|
||||
'Eclipse CDT4 - Ninja'
|
||||
'Eclipse CDT4 - Unix Makefiles'
|
||||
'KDevelop3'
|
||||
'KDevelop3 - Unix Makefiles'
|
||||
'Sublime Text 2 - Ninja'
|
||||
'Sublime Text 2 - Unix Makefiles'
|
||||
local -a generators=(
|
||||
${(f)"$(cmake --help | awk '/^Generators/{flag=1} flag && /^[* ] [^ ]/ {sub(/^[* ] /, ""); sub(/=.*$/, ""); sub(/\[arch\]/, ""); sub(/ *$/, ""); print}')"}
|
||||
)
|
||||
|
||||
_describe -t generators 'generator' generators
|
||||
|
|
@ -377,51 +534,108 @@ _cmake_toolchain_files() {
|
|||
_files -g '*\.cmake*'
|
||||
}
|
||||
|
||||
# ---------------
|
||||
# _cmake_booleans
|
||||
# ---------------
|
||||
(( $+functions[_cmake_booleans] )) ||
|
||||
_cmake_booleans() {
|
||||
local booleans; booleans=(
|
||||
'YES'
|
||||
'NO'
|
||||
)
|
||||
_describe -t booleans 'boolean' 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
|
||||
}
|
||||
|
||||
local cmake_command_actions;cmake_command_actions=(
|
||||
'-E[CMake command mode]:*:command'
|
||||
)
|
||||
_cmake_command() {
|
||||
_arguments -C -s - command "$cmake_command_actions[@]"
|
||||
# ---------------
|
||||
# _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
|
||||
}
|
||||
|
||||
local cmake_suggest_build;cmake_suggest_build=(
|
||||
'--build[build]'
|
||||
(( $+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'
|
||||
)
|
||||
|
||||
if [ $CURRENT -eq 2 ] ; then
|
||||
_arguments -C -s \
|
||||
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 \
|
||||
"$cmake_command_actions[@]" \
|
||||
'-E[CMake command mode]:command:_cmake_commands' \
|
||||
- build_opts \
|
||||
"$cmake_build_options[@]" \
|
||||
- build_cmds \
|
||||
"$cmake_suggest_build[@]" && return 0
|
||||
elif [[ $words[2] = --help* ]] ; then
|
||||
_cmake_help
|
||||
elif [[ $words[2] != -E ]] ; then
|
||||
"$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
|
||||
_cmake_command
|
||||
_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
|
||||
|
|
|
|||
45
src/_coffee
45
src/_coffee
|
|
@ -1,6 +1,6 @@
|
|||
#compdef coffee
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Coffee.js v0.6.11 (http://coffeejs.org)
|
||||
# Completion script for Coffee.js v2.7.0 (https://coffeescript.org/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -39,34 +39,29 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line ret=1 version opts first second third
|
||||
local curcontext="$curcontext" state line ret=1
|
||||
typeset -A opt_args
|
||||
version=(${(f)"$(_call_program version $words[1] --version)"})
|
||||
version=${${(z)${version[1]}}[3]}
|
||||
first=$(echo $version|cut -d '.' -f 1)
|
||||
second=$(echo $version|cut -d '.' -f 2)
|
||||
third=$(echo $version|cut -d '.' -f 3)
|
||||
if (( $first < 2 )) && (( $second < 7 )) && (( $third < 3 ));then
|
||||
opts+=('(-l --lint)'{-l,--lint}'[pipe the compiled JavaScript through JavaScript Lint]'
|
||||
'(-r --require)'{-r,--require}'[require a library before executing your script]:library')
|
||||
fi
|
||||
|
||||
|
||||
_arguments -C \
|
||||
'(- *)'{-h,--help}'[display this help message]' \
|
||||
'(- *)'{-v,--version}'[display the version number]' \
|
||||
$opts \
|
||||
_arguments -s -S \
|
||||
'--ast[generate an abstract syntax tree of nodes]' \
|
||||
'(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \
|
||||
'(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
|
||||
'(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
|
||||
'(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]:Destination JS file:_files -g "*.js"' \
|
||||
'(--nodejs)--nodejs[pass options directly to the "node" binary]' \
|
||||
'(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
|
||||
'(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]:Output Directory:_files -/' \
|
||||
'(-n -t -p)'{-n,--nodes}'[print out the parse tree that the parser produces]' \
|
||||
'(-n -t -p)'{-p,--print}'[print out the compiled JavaScript]' \
|
||||
'(-n -t -p)'{-t,--tokens}'[print out the tokens that the lexer/rewriter produce]' \
|
||||
'(-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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,76 +0,0 @@
|
|||
#compdef composer
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 composer (https://getcomposer.org/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Daniel Gomes (me@danielcsgomes.com)
|
||||
# * Valerii Hiora (https://github.com/vhbit)
|
||||
# * loranger (https://github.com/loranger)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext=$curcontext state line
|
||||
declare -A opt_args
|
||||
|
||||
_composer_get_command_list () {
|
||||
composer --no-ansi | sed "1,/Available commands/d" | awk '/ [a-z]+/ { print $1 }'
|
||||
}
|
||||
|
||||
_composer_get_required_list () {
|
||||
composer show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }'
|
||||
}
|
||||
|
||||
|
||||
_composer () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments \
|
||||
'1: :->command'\
|
||||
'*: :->args'
|
||||
if [ -f composer.json ]; then
|
||||
case $state in
|
||||
command)
|
||||
compadd `_composer_get_command_list`
|
||||
;;
|
||||
*)
|
||||
compadd `_composer_get_required_list`
|
||||
;;
|
||||
esac
|
||||
else
|
||||
compadd create-project init search selfupdate show
|
||||
fi
|
||||
}
|
||||
|
||||
compdef _composer composer
|
||||
|
|
@ -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
|
||||
47
src/_dad
47
src/_dad
|
|
@ -1,6 +1,6 @@
|
|||
#compdef dad
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -39,30 +39,37 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
_dad() {
|
||||
local -a commands
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
|
||||
commands=(
|
||||
"start:Start aria2c daemon"
|
||||
"stop:Stop aria2c daemon"
|
||||
)
|
||||
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' \
|
||||
_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
|
||||
case "$state" in
|
||||
(cmds)
|
||||
_describe -t commands 'commands' commands
|
||||
;;
|
||||
(*)
|
||||
;;
|
||||
esac
|
||||
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
|
||||
47
src/_dget
47
src/_dget
|
|
@ -1,6 +1,6 @@
|
|||
#compdef dget
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,34 +28,37 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for dget
|
||||
# Completion script for dget 2.25.19
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Kris Shannon <k.shannon@amaze.com.au>
|
||||
# * Shohei YOSHIDA <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_dget() {
|
||||
local context state line expl
|
||||
local -A opt_args
|
||||
_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"'
|
||||
|
||||
_arguments -A "-*" \
|
||||
'(--no-conf -h --help)'{-h,--help}'[Show help message]' \
|
||||
'(--no-conf -V --version)'{-v,--version}'[Print license, copyright, and version information and exit]' \
|
||||
'(--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 -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \
|
||||
'(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \
|
||||
'(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \
|
||||
'(--no-conf --insecure)--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 urls:_urls'
|
||||
}
|
||||
|
||||
_dget "$@"
|
||||
# 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
|
||||
|
|
|
|||
91
src/_dhcpcd
91
src/_dhcpcd
|
|
@ -1,34 +1,9 @@
|
|||
#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.
|
||||
# Completion script for dhcpcd 9.4.1 (http://roy.marples.name/projects/dhcpcd/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -38,36 +13,42 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_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]:lease 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]'
|
||||
'(-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
|
||||
|
|
|
|||
84
src/_diana
84
src/_diana
|
|
@ -1,6 +1,6 @@
|
|||
#compdef diana
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -79,72 +79,66 @@ _diana_command_arguments() {
|
|||
(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() {
|
||||
local -a commands
|
||||
_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."
|
||||
)
|
||||
|
||||
commands=(
|
||||
"list:Output the list of active downloads."
|
||||
"paused:Output the list of paused downloads."
|
||||
"stopped:Output the list of stopped downloads."
|
||||
"info:Output informations 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."
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
'1:cmd:->cmds' \
|
||||
'*:: :->args' \
|
||||
|
||||
case "$state" in
|
||||
(cmds)
|
||||
_describe -t commands 'commands' commands
|
||||
;;
|
||||
(*)
|
||||
_diana_command_arguments
|
||||
;;
|
||||
esac
|
||||
_describe -t commands 'commands' commands
|
||||
}
|
||||
|
||||
_diana
|
||||
_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
|
||||
|
|
@ -0,0 +1,634 @@
|
|||
#compdef diskutil
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 diskutil command macOS 26
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_diskutil() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
local curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
_arguments \
|
||||
'1: :_diskutil_subcommands' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case "$state" in
|
||||
(args)
|
||||
case $words[1] in
|
||||
(list)
|
||||
_arguments \
|
||||
'-plist[output plist instead of normal user-readable output]' \
|
||||
'1:: :(internal external)' \
|
||||
'2:: :(physical virtual)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(info)
|
||||
_arguments \
|
||||
'-plist[output plist instead of normal user-readable output]' \
|
||||
'-all[output all disks]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(listFilesystems)
|
||||
_arguments \
|
||||
'-plist[output plist instead of normal user-readable output]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(unmount|unmountDisk|eject|disableJournal|disableJournal)
|
||||
_alternative 'force: :(force)' 'device: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(mount)
|
||||
_arguments \
|
||||
'-mountOptions[mount options]:option' \
|
||||
'-mountPoint[mount point]:path:_files -/' \
|
||||
'*:: :_diskutil_mount_args' \
|
||||
&& ret=0
|
||||
;;
|
||||
(moveJournal)
|
||||
_alternative 'internal: :(internal)' 'device: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(eraseDisk)
|
||||
_arguments \
|
||||
'-noEFI[do not create EFI partition]' \
|
||||
'1:format:_diskutil_file_systems' \
|
||||
'2:name' \
|
||||
'*:: :_diskutil_erasedisk_args' \
|
||||
&& ret=0
|
||||
;;
|
||||
(eraseVolume)
|
||||
_arguments \
|
||||
'1:format:_diskutil_file_systems' \
|
||||
'2:name' \
|
||||
'*:: :_diskutil_erasedisk_args' \
|
||||
&& ret=0
|
||||
;;
|
||||
(zeroDisk)
|
||||
_alternative 'force: :(force)' 'short: :(short)' 'device: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(secureErase)
|
||||
_arguments \
|
||||
'1:format:_diskutil_secure_erase_args' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(partitionDisk)
|
||||
_arguments \
|
||||
'-noEFI[do not create EFI partition on the target disk]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(resizeVolume)
|
||||
_arguments \
|
||||
'-plist[emit a property list instead of user-formatted output]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(APFS)
|
||||
_diskutil_APFS && ret=0
|
||||
;;
|
||||
(appleRAID)
|
||||
_diskutil_appleRAID && ret=0
|
||||
;;
|
||||
(coreStorage)
|
||||
_diskutil_corestorage && ret=0
|
||||
;;
|
||||
(image)
|
||||
_diskutil_image && ret=0
|
||||
;;
|
||||
(*)
|
||||
_arguments \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_subcommands] )) ||
|
||||
_diskutil_subcommands() {
|
||||
local -a commands=(
|
||||
"list:List disks"
|
||||
"info:Get detailed information about a specific whole disk or partition"
|
||||
"activity:Continuously display system-wide disk manipulation activity"
|
||||
"listFilesystems:Show the file system personalities available for formatting"
|
||||
"unmount:Unmount a single volume"
|
||||
"unmountDisk:Given a disk containing a partition map, unmount all of its volumes"
|
||||
"eject:Eject a disk"
|
||||
"mount:Mount a single volume"
|
||||
"mountDisk:Mount all mountable and UI-browsable volumes on the give partition map"
|
||||
"rename:Rename a volume"
|
||||
"enableJournal:Enable journaling on an HFS+ volume"
|
||||
"disableJournal:Disable journaling on an HFS+ volume"
|
||||
"moveJournal:Create a 512MB Apple_Journal partiton"
|
||||
"enableOwnership:Enable ownership a volume"
|
||||
"disableOwnership:Disable ownership of a volume"
|
||||
"verifyVolume:Verify the file system data structures of a volume"
|
||||
"repairVolume:Repair the file system data structures of a volume"
|
||||
"verifyDisk:Verify the partition map layout of a whole disk intended for booting or data use"
|
||||
"repairDisk:Repair the partition map layout of a whole disk intended for booting or data use"
|
||||
"eraseDisk:Erase an existing disk"
|
||||
"eraseVolume:Write out a new empty file system volume"
|
||||
"reformat:Erase an existing volume by writing out a new empty file system"
|
||||
"eraseOptical:Erase optical media"
|
||||
"zeroDisk:Erase a device, writing zeros to the media"
|
||||
"randomDisk:Erase a whole disk, writing random data to the media"
|
||||
"secureErase:Erase, using a secure method"
|
||||
"partitionDisk:Partition a disk, removing all volumes"
|
||||
"resizeVolume:Non-destructively resize a volume"
|
||||
"splitPartition:Destructively split a volume into multiple partitions"
|
||||
"mergePartitions:Merge two or more partitions on a disk"
|
||||
"addPartition:Create a new partition following an existing partition"
|
||||
"APFS:Apple APFS is a system of virtual volumes"
|
||||
"appleRAID:create, manipulate, destroy AppleRAID volumes"
|
||||
"coreStorage:gather information/remove CoreStorage volumes"
|
||||
"image:manipulate DiskImages framework with StorageKit framework"
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_mount_args] )) ||
|
||||
_diskutil_mount_args() {
|
||||
local ret=1
|
||||
|
||||
local -a attributes=(
|
||||
'readonly[the file system is mounted read only]'
|
||||
'nobrowse[the file system is mounted with a recommendation to prevent display]'
|
||||
)
|
||||
|
||||
_alternative \
|
||||
'attributes: :_values -w attributes $attributes' \
|
||||
'device: :_files' && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_erasedisk_args] )) ||
|
||||
_diskutil_erasedisk_args() {
|
||||
local ret=1
|
||||
|
||||
_alternative \
|
||||
'type: :(APM MBR GPT)' \
|
||||
'device: :_files' && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_secure_erase_args] )) ||
|
||||
_diskutil_secure_erase_args() {
|
||||
local ret=1
|
||||
|
||||
local -a levels=(
|
||||
'0[Single-pass zero fill erase]'
|
||||
'1[Single-pass random fill erase]'
|
||||
'2[Seven-pass erase]'
|
||||
'3[Gutmann algorithm 35-pass erase]'
|
||||
'4[Three-pass erase, consisting of two random fills plus a final zero fill]'
|
||||
)
|
||||
|
||||
_alternative \
|
||||
'freespace: :(freespace)' \
|
||||
'level: :_values level $levels' && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_file_systems] )) ||
|
||||
_diskutil_file_systems() {
|
||||
local file_systems=(
|
||||
'APFSX:Case-sensitive APFS'
|
||||
'APFS:APFS'
|
||||
'ExFAT:ExFat'
|
||||
'FREE:Free Space'
|
||||
'MS-DOS:FAT'
|
||||
'FAT32:FAT32'
|
||||
'HFS+:MacOS Extended HFS+'
|
||||
'HFSX:Case-sensitive Mac OS Extended HFS+'
|
||||
'JHFSX:Case-sensitive and journaled Mac OS Extended HFS+'
|
||||
'JHFS+:Journaled Mac OS Extended HFS+'
|
||||
)
|
||||
|
||||
_describe -t file_systems 'file_system' file_systems "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_APFS] )) ||
|
||||
_diskutil_APFS() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :_diskutil_APFS_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(list|resizeContainer|listCryptoUsers|listSnapshots)
|
||||
_arguments \
|
||||
'-plist[emit a property list instead of user-formatted output]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(convert)
|
||||
_arguments \
|
||||
'-dryrun[all calculations, checks, some data moving is performed but your disk is left as valid HFS]' \
|
||||
'-prebootSource[staging directory of macOS boot items]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(deleteContainer)
|
||||
_arguments \
|
||||
'-force[Activate an alternate last-resort mode]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(addVolume)
|
||||
_arguments \
|
||||
'-passprompt[will be prompted interactively for a passphrase]' \
|
||||
'-passphrase[passphrase]:passphrase' \
|
||||
'-stdinpassphrase[read passphrase from standard input]' \
|
||||
'-passphraseHint[passphrase hint]:hint' \
|
||||
'-reserve[guarantee a minimum amount of space for your volume]:reserve' \
|
||||
"-quota[limit your volume's file usage to a maximum amount]:quota" \
|
||||
'-role[meta-data flags from APFS Volume Roles]:roles' \
|
||||
'-groupWith[become a member of the same APFS Volume Group]' \
|
||||
'-sibling[sibling group device]:group_device' \
|
||||
'-nomount[leave volume unmounted]' \
|
||||
'-mountpoint[mountpoint path]:path:_files' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(eraseVolume)
|
||||
_arguments \
|
||||
'-passprompt[will be prompted interactively for a passphrase]' \
|
||||
'-passphrase[passphrase]:passphrase' \
|
||||
'-stdinpassphrase[read passphrase from standard input]' \
|
||||
'-passphraseHint[passphrase hint]:hint' \
|
||||
'-role[meta-data flags from APFS Volume Roles]:roles' \
|
||||
'-groupWith[become a member of the same APFS Volume Group]' \
|
||||
'-sibling[sibling group device]:group_device' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(unlockVolume)
|
||||
_arguments \
|
||||
'-user[cryptographic user]:user' \
|
||||
'-recoverykeychain[key chain file]:path:_files' \
|
||||
'-passphrase[passphrase]:passphrase' \
|
||||
'-stdinpassphrase[read passphrase from standard input]' \
|
||||
'-nomount[leave volume unmounted]' \
|
||||
'-mountpoint[mountpoint path]:path:_files' \
|
||||
'-systemreadwrite[mount read/write]' \
|
||||
'-verify[test passphrase correctness without affecting the locked or unlocked state]' \
|
||||
'-plist[emit a property list instead of user-formatted output]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(changePassphrase)
|
||||
_arguments \
|
||||
'-user[cryptographic user]:user' \
|
||||
'-oldPassphrase[old passphrase]:old_passphrase' \
|
||||
'-oldStdinpassphrase[read old passphrase from standard input]' \
|
||||
'-newPassphrase[new passphrase]:new_passphrase' \
|
||||
'-newStdinpassphrase[read new passphrase from standard input]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(setPassphraseHint)
|
||||
_arguments \
|
||||
'-user[cryptographic user]:user' \
|
||||
'-hint[hint message]:hint' \
|
||||
'-clear[clear any existing hint]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(encryptVolume)
|
||||
_arguments \
|
||||
'-user[cryptographic user]:user' \
|
||||
'-passphrase[passphrase]:passphrase' \
|
||||
'-stdinpassphrase[read passphrase from standard input]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(decryptVolume)
|
||||
_arguments \
|
||||
'-user[cryptographic user]:user' \
|
||||
'-recoverykeychain[key chain file]:path:_files' \
|
||||
'-passphrase[passphrase]:passphrase' \
|
||||
'-stdinpassphrase[read passphrase from standard input]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(deleteSnapshot)
|
||||
_arguments \
|
||||
'-user[cryptographic user]:user' \
|
||||
'-xid[transaction ID]:xid' \
|
||||
'-name[snapshort name]:name' \
|
||||
'-wait[wait for removing snapshot]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(updatePreboot)
|
||||
_arguments \
|
||||
'-od[open directory path]:dir:_files -/' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_APFS_subcommands] )) ||
|
||||
_diskutil_APFS_subcommands() {
|
||||
local -a commands=(
|
||||
'list:Display APFS objects as a tree'
|
||||
'convert:Convert an HFS volume to an APFS Container with a single APFS Volume'
|
||||
'create:Create an empty APFS Container and add one APFS Volume with the given name'
|
||||
'createContainer:Create an empty APFS Container'
|
||||
'deleteContainer:Destroy an existing APFS Container'
|
||||
'resizeContainer:Resize an existing APFS Container'
|
||||
'addVolume:Add a new APFS Volume to an existing APFS Container'
|
||||
'deleteVolume:Remove the given APFS Volume from its APFS Container'
|
||||
'deleteVolumeGroup:Remove all APFS Volumes from the APFS Container'
|
||||
'eraseVolume:Erase the contents of an existing APFS Volume'
|
||||
'changeVolumeRole:Change the role metadata flags of an existing APFS Volume'
|
||||
'unlockVolume:Unlock the mount an encrypted and locked APFS Volume or verify a passphrase'
|
||||
'lockVolume:Unmount and lock an encrypted unlocked APFS Volume'
|
||||
'listCryptoUsers:Show all cryptographic users and special-purpose users'
|
||||
'changePassphrase:Change the passphrase of the user associated with the given APFS Volume'
|
||||
'setPassphraseHint:Set an arbitrary hint string to aid recall of a passphrase'
|
||||
'encryptVolume:Start encryption of a currently-unencrypted APFS Volume'
|
||||
'decryptVolume:Start decryption of a currently-encrypted APFS Volume'
|
||||
'listSnapshots:Show all APFS Snapshots associated with the given APFS Volume'
|
||||
'deleteSnapshot:Remove the given APFS Snapshot from its APFS Volume'
|
||||
'listGroups:Display the relationships among APFS Volumes which are defined by APFS Volume Groups'
|
||||
'defragment:Manage automatic background defragmentation at the APFS Container or Volume level'
|
||||
"updatePreboot:Update the target volume's associated Preboot Volume"
|
||||
'syncPatchUsers:Perform a specific repair of APFS cryptographic user lock records'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_appleRAID] )) ||
|
||||
_diskutil_appleRAID() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :_diskutil_appleRAID_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(list)
|
||||
_arguments \
|
||||
'-plist[emit a property list instead of user-formatted output]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(create)
|
||||
_arguments \
|
||||
'1:command:(mirror stripe concat)' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(add)
|
||||
_arguments \
|
||||
'1:type:(member spare)' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(enable)
|
||||
_arguments \
|
||||
'1:command:(mirror concat)' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(update)
|
||||
_arguments \
|
||||
'1:key:(AutoRebuild SetTimeout)' \
|
||||
'2:value' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_appleRAID_subcommands] )) ||
|
||||
_diskutil_appleRAID_subcommands() {
|
||||
local -a commands=(
|
||||
'list:Display AppleRAID volumes with current status and associated member disks'
|
||||
'create:Create a new RAID set consisting of multiple disks and/or RAID sets'
|
||||
'delete:Destroy an existing RAID set'
|
||||
'repairMirror:Repair a degraded mirror'
|
||||
'add:Add a new member or hot spare to an existing RAID set'
|
||||
'remove:Remove a member or spare from an existing RAID set'
|
||||
'enable:Convert a non-RAID disk partition into an RAID set'
|
||||
'update:Update the key-value parameters of an existing RAID set'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_corestorage] )) ||
|
||||
_diskutil_corestorage() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :_diskutil_corestorage_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(list|info)
|
||||
_arguments \
|
||||
'-plist[emit property list instead of the formatted tree output]' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(unlockVolume)
|
||||
_arguments \
|
||||
'-nomount[not mount automatically]' \
|
||||
'-stdinpassphrase[read password from standard input]' \
|
||||
'-passphrase[passphrase]:passphrase' \
|
||||
'-recoverykeychain[a path to keychain file]:file:_files' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_corestorage_subcommands] )) ||
|
||||
_diskutil_corestorage_subcommands() {
|
||||
local -a commands=(
|
||||
'list:Display a tree view of the CoreStorage world'
|
||||
'info:Display properties of the CoreStorage object'
|
||||
'delete:Delete a CoreStorage logical volume group'
|
||||
'unlockVolume:Unlock a logical volume and file system'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_image] )) ||
|
||||
_diskutil_image() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'--stdinpassphrase[read the passphrase from stdin]' \
|
||||
'--verbose[enable verbose output]' \
|
||||
'--plist[produce output in a plist format]' \
|
||||
'1: :_diskutil_image_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(attach)
|
||||
_arguments \
|
||||
'--readOnly[disk image is attached read-only]' \
|
||||
'--nobrowse[hide the mounted volume in the disk image from GUI applications]' \
|
||||
'--mountPoint[path to mount the image]:mount_point:_files -/' \
|
||||
'--mountOptions[comma separated mount options]:option' \
|
||||
'--mountPolicy[mount policy]:policy:(noMount autoMount forceMount)' \
|
||||
'--noMount[skip any mount attempts and only attach the disk image]' \
|
||||
'*--shadow[shadow file path]:file:_files' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(info)
|
||||
_arguments \
|
||||
'--extra[additional information will be retrieved for some image types]' \
|
||||
&& ret=0
|
||||
;;
|
||||
(create)
|
||||
_diskutil_image_create && ret=0
|
||||
;;
|
||||
(resize)
|
||||
_arguments \
|
||||
'(-s --size)'{-s,--size}'[new size of the disk image]:size' \
|
||||
'--image-only[only resize the disk image and adjust a secondary GPT table to the new size]' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_image_subcommands] )) ||
|
||||
_diskutil_image_subcommands() {
|
||||
local -a commands=(
|
||||
'attach:Attach a disk image as a device'
|
||||
'info:Print out information includes about a disk image'
|
||||
'chpass:Change the passphrase of a given encrypted image'
|
||||
'create:Create a disk image'
|
||||
'resize:Resizes an existing disk image represented by given URL'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_image_create] )) ||
|
||||
_diskutil_image_create() {
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'1: :_diskutil_image_create_subcommands' \
|
||||
'*:: :->arg' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(arg)
|
||||
case $words[1] in
|
||||
(blank)
|
||||
_arguments \
|
||||
'--format[disk format]:format:(RAW ASIF USDB)' \
|
||||
'--size[disk size]:size' \
|
||||
'--volumeName[volume name]:name' \
|
||||
'-fs[create a file system in the specified format]:format:(APFS ExFAT MS-DOS)' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(from)
|
||||
_arguments \
|
||||
'--format[disk format]:format:(RAW UDRO UDZO ULFO ULMO ASIF UDSB)' \
|
||||
'--shadow[path to the shadow file]:path:_files' \
|
||||
'*:: :_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_diskutil_image_create_subcommands] )) ||
|
||||
_diskutil_image_create_subcommands() {
|
||||
local -a commands=(
|
||||
'blank:create a blank disk image'
|
||||
'from:create a disk image from source'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
_diskutil "$@"
|
||||
|
||||
# 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 distro-info ubuntu-distro-info debian-distro-info
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2025 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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 for distro-info
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei YOSHIDA (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[display help message and exit]' \
|
||||
'--date=[date for calculating the version]:date' \
|
||||
'(-a --all)'{-a,--all}'[list all known versions]' \
|
||||
'(-y --days)'{-y,--days=}'[display number of days until specified version reaches the specified milestone]:milestone:(created release eol eol-server)' \
|
||||
'(-d --devel)'{-d,--devel}'[latest development version]' \
|
||||
'--series=[series to calculate the version for]:series' \
|
||||
'(-s --stable)'{-s,--stable}'[latest stable version]' \
|
||||
'--supported[list of all supported version, including development releases]' \
|
||||
'--unsupported[list of all unsupported stable versions]' \
|
||||
'(-c --codename)'{-c,--codename}'[print the codename(default)]' \
|
||||
'(-r --release)'{-r,--release}'[print the release version]' \
|
||||
'(-f --fullname)'{-f,--fullname}'[print the full name]'
|
||||
|
||||
# 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,54 @@
|
|||
#compdef do-release-upgrade
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 do-release-upgrade 25.10.7
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[Show help message and exit]' \
|
||||
'(- *)'{-v,--version}'[Show version and exit]' \
|
||||
'(-d --devel-release)'{-d,--devel-release}'[Upgrade to the development release]' \
|
||||
'--data-dir=[Directory that contains the data files]:dir:_files -/' \
|
||||
'(-p --proposed)'{-p,--proposed}'[Try upgrading to the latest release using the upgrade from \$distro-proposed]' \
|
||||
'(-f --frontend)'{-f,--frontend}'[Run the specified frontend]:frontend' \
|
||||
'(- *)--check-dist-upgrade-only[Check only if a new distribution release is available]' \
|
||||
'--allow-third-party[Try the upgrade with third party mirrors and repositories]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Quiet mode]'
|
||||
|
||||
# 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
|
||||
71
src/_docpad
71
src/_docpad
|
|
@ -1,6 +1,6 @@
|
|||
#compdef docpad
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,51 +28,58 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for docpad (https://github.com/bevry/docpad).
|
||||
# Completion script for docpad v6.38.2 (https://github.com/bevry/docpad).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Changwoo Park (https://github.com/pismute)
|
||||
# * Shohei Yoshida (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line ret=1
|
||||
_docpad_subcommands() {
|
||||
local -a commands=(
|
||||
"run:run docpad on your project"
|
||||
"init:initialize your project"
|
||||
"generate:(re)generates your project"
|
||||
"render:render the file at <path> and output its results to stdout"
|
||||
"watch:watches your project for changes, and (re)generates whenever a change is made"
|
||||
"clean:ensure everything is cleaned correctly (will remove your out directory)"
|
||||
"update:update your local DocPad and plugin installations to their latest compatible version"
|
||||
"upgrade:update your local DocPad and plugin installations to their latest compatible version"
|
||||
"install:install plugins"
|
||||
"uninstall:uninstall a plugin"
|
||||
"info:display the information about your docpad instance"
|
||||
)
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'run: run [options], does everything - skeleton, generate, watch, server'
|
||||
'server: server [options], creates a server for your generated project'
|
||||
'skeleton: skeleton [options], will create a new project in your cwd based off an existing skeleton'
|
||||
'render: render [path], render the file at <path> and output its results to stdout:path:_files'
|
||||
'generate: (re)generates your project'
|
||||
'watch: watches your project for changes, and (re)generates whenever a change is made'
|
||||
'install: ensure everything is installed correctly'
|
||||
'clean: ensure everything is cleaned correctly'
|
||||
'info: display the information about your docpad instance'
|
||||
'help: output the help'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
||||
_arguments -C \
|
||||
'(-h,--help)'{-h,--help}'[output usage information]'\
|
||||
'(-V,--version)'{-V,--version}'[output the version number]'\
|
||||
'(-o,--out)'{-o,--out}'[where to output the rendered directory or files]:path:_files'\
|
||||
'(-c,--config)'{-c,--config}'[a custom configuration file to load in]:path:_files'\
|
||||
'(-e,--env)'{-e,--env}'[the environment name to use for this instance, multiple names can be separated with a comma]'\
|
||||
'(-d,--debug)'{-d,--debug}'+[the level of debug messages you would like to display, if specified defaults to 7, otherwise 6]:number'\
|
||||
'(-f,--force)'{-f,--force}'[force a re-install of all modules]'\
|
||||
'1: :->cmds'\
|
||||
'*: :_files'&& ret=0
|
||||
_docpad() {
|
||||
local ret=1
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
_describe -t commands 'docpad command' _1st_arguments && ret=0
|
||||
;;
|
||||
_arguments \
|
||||
'--outpath[a custom directory to place the rendered project]: :_files -/' \
|
||||
'--config[a custom configuration file to load in]: :_files' \
|
||||
'--env[the environment name to use for this instance, multiple names can be separated with a comma]' \
|
||||
'--log[the rfc log level to display]:level' \
|
||||
'(-v --verbose)'{-v,--verbose}'[set log level to 7]' \
|
||||
'(-d --debug)'{-d,--debug}'[output a log file]' \
|
||||
'--global[whether or not we should just fire global installation of docpad]' \
|
||||
'(--color --colour)'{--color,--colour}'[use color terminal output(default: true)]' \
|
||||
'--silent[do not write anything that is not essential]' \
|
||||
'--progress[output the progress as it occurs(default: true)]' \
|
||||
'--version[show version]' \
|
||||
'(- *)'{-h,--help}'[output usage information]'\
|
||||
'1: :_docpad_subcommands'\
|
||||
'*:: :_files' && ret=0
|
||||
|
||||
esac
|
||||
return ret
|
||||
}
|
||||
|
||||
return ret
|
||||
_docpad "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
191
src/_drush
191
src/_drush
|
|
@ -1,191 +0,0 @@
|
|||
#compdef drush
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2014 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 Drush (http://drush.ws).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Vasily Kraev (https://github.com/vasilykraev)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_drush() {
|
||||
local curcontext='$curcontext' state line cmds ret=1
|
||||
integer NORMARG
|
||||
typeset -A opt_args
|
||||
|
||||
global_args=('--debug' '--verbose' '--yes' '--no' '--simulate' '--root=' '--uri=')
|
||||
|
||||
_arguments -C \
|
||||
'(--*)'{--version,--version}'[Show drush version.]' \
|
||||
'(- *)'{-d,--debug}'[Display even more information, including internal messages.]' \
|
||||
'(- *)'{-v,--verbose}'[Display extra information about the command.]' \
|
||||
'(- *)'{-y,--yes}'[Assume "yes" as answer to all prompts.]' \
|
||||
'(- *)'{-n,--no}'[Assume "no" as answer to all prompts.]' \
|
||||
'(- *)'{-s,--simulate}'[Simulate all relevant actions (dont actually change the system).]' \
|
||||
'(- *)'{-r,--root=}'[Drupal root directory to use (default: current directory).]' \
|
||||
'(- *)'{-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]' \
|
||||
'1: :->cmds' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
_values 'drush command' \
|
||||
'(archive-dump)'{archive-dump,ard,arb}'[Backup your code, files, and database into a single file.]' \
|
||||
'(archive-restore)'{archive-restore,arr}'[Expand a site archive into a Drupal web site.]' \
|
||||
'(cache-clear)'{cache-clear,cc}'[Clear a specific cache, or all drupal caches.]' \
|
||||
'(core-status)'{core-status,status,st}'[Provides a birds-eye view of the current Drupal installation, if any.]' \
|
||||
'(core-cron)'{core-cron,cron}'[Run all cron hooks in all active modules for specified site.]' \
|
||||
'(core-execute)'{core-execute,exec}'[Execute a shell command. Usually used with a site alias.]' \
|
||||
'(drupal-directory)'{drupal-directory,dd}'[Return the filesystem path for modules/themes and other key folders.]' \
|
||||
'help[Print this help message.]' \
|
||||
'image-flush[Flush all derived images for a given style.]' \
|
||||
'(site-alias)'{site-alias,sa}'[Print an alias record.]' \
|
||||
'(site-install)'{site-install,si}'[Install Drupal along with modules/themes/configuration using the specified install profile.]' \
|
||||
'test-clean[Clean temporary tables and files.]' \
|
||||
'test-run[Run tests. Note that you must use the --uri option.]' \
|
||||
'(updatedb)'{updatedb,updb}'[Apply any database updates required (as with running update.php).]' \
|
||||
'(variable-delete)'{variable-delete,vdel}'[Delete a variable.]' \
|
||||
'(variable-get)'{variable-get,vget}'[Get a list of some or all site variables and values.]' \
|
||||
'(variable-set)'{variable-set,vset}'[Set a variable.]' \
|
||||
'(pm-list)'{pm-list,pml}'[Show a list of available extensions (modules and themes).]' \
|
||||
'(pm-disable)'{pm-disable,dis}'[Disable one or more extensions (modules or themes). Disable dependant extensions as well.]' \
|
||||
'(pm-download)'{pm-download,dl}'[Download projects from drupal.org or other sources.]' \
|
||||
'(pm-enable)'{pm-enable,en}'[Enable one or more extensions (modules or themes). Enable dependant extensions as well.]' \
|
||||
'pm-uninstall[Uninstall one or more modules.]' \
|
||||
'pm-update[Update Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb).]' \
|
||||
'(sql-cli)'{sql-cli,sqlc}'[Open a SQL command-line interface using Drupals credentials.]' \
|
||||
'sql-drop[Drop all tables in a given database.]' \
|
||||
'sql-dump[Exports the Drupal DB as SQL using mysqldump or equivalent.]' \
|
||||
'(sql-query)'{sql-query,sqlq}'[Execute a query against the site database.]' \
|
||||
'sql-sync[Copy and import source database to target database. Transfers via rsync.]' \
|
||||
'(user-login)'{user-login,uli}'[Display a one time login link for the given user account (defaults to uid 1).]' \
|
||||
'(user-password)'{user-password,upwd}'[(Re)Set the password for the user account with the specified name.]' \
|
||||
'(devel-reinstall)'{devel-reinstall,dre}'[Disable, Uninstall, and Install a list of projects. (devel)]' \
|
||||
'(devel-token)'{devel-token,token}'[List available tokens (devel)]' \
|
||||
'(generate-content)'{generate-content,genc}'[Create content. (devel_generate)]' \
|
||||
'(generate-menus)'{generate-menus,genm}'[Create menus and menu items. (devel_generate)]' \
|
||||
'(generate-terms)'{generate-terms,gent}'[Create terms in specified vocabulary. (devel_generate)]' \
|
||||
'(generate-users)'{generate-users,genu}'[Create users. (devel_generate)]' \
|
||||
'(generate-vocabs)'{generate-vocabs,genv}'[Create vocabularies. (devel_generate)]' \
|
||||
'(features-diff)'{features-diff,fd}'[Show the difference between the default and overridden state of a feature.]' \
|
||||
'(features-export)'{features-export,fe}'[Export a feature from your site into a module.]' \
|
||||
'(features-list)'{features-list,fl}'[List all the available features for your site.]' \
|
||||
'(features-revert)'{features-revert,fr}'[Revert a feature module on your site.]' \
|
||||
'(features-revert-all)'{features-revert-all,fra}'[Revert all enabled feature module on your site.]' \
|
||||
'(features-update)'{features-update,fu}'[Update a feature module on your site.]' \
|
||||
'(features-update-all)'{features-update-all,fua}'[Update all feature modules on your site.]' \
|
||||
&& ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
(archive-dump|ard)
|
||||
_arguments \
|
||||
'(--description)--description=[Filter out extensions that are provided by drupal core.]' \
|
||||
'(--destination)--destination=[The full path and filename in which the archive should be stored. If omitted, it will be saved to the drush-backups directory.]' \
|
||||
'(--no-core)--no-core[Exclude Drupal core, so the backup only contains the site specific stuff.]' \
|
||||
'(--pipe)--pipe[Only print the destination of the archive. Useful for scripts that dont pass --destination.]' \
|
||||
'(--tar-options)--tar-options=[Options passed thru to the tar command.]' \
|
||||
&& ret=0
|
||||
compadd -a global_args
|
||||
;;
|
||||
(archive-restore|arr)
|
||||
_arguments \
|
||||
'(--db-prefix)--db-prefix[An optional table prefix to use during restore.]' \
|
||||
'(--db-su)--db-su[Account to use when creating the new database. Optional.]' \
|
||||
'(--db-su-pw)--db-su-pw[Password for the "db-su" account. Optional.]' \
|
||||
'(--db-url)--db-url=[A Drupal 6 style database URL indicating the target for database restore. If not provided, the archived settings.php is used. ]' \
|
||||
'(--destination)--destination[Specify where the Drupal site should be expanded, including the docroot. Defaults to the current working directory.]' \
|
||||
'(--overwrite)--overwrite[Allow drush to overwrite any files in the destination.]' \
|
||||
&& ret=0
|
||||
compadd -a global_args
|
||||
;;
|
||||
(user-password|upwd)
|
||||
_arguments \
|
||||
'--password=:Set the password for the username someuser.' \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_values 'commands' 'arb' 'archive-dump' 'archive-restore' 'ard' 'arr' 'cache-clear' 'cc' 'core-cron' 'core-execute' 'core-status' 'cron' 'dd' 'devel-reinstall' 'devel-token' 'dis' 'dl' 'dre' 'drupal-directory' 'en' 'exec' 'fd' 'fe' 'features-diff' 'features-export' 'features-list' 'features-revert' 'features-revert-all' 'features-update' 'features-update-all' 'fl' 'fr' 'fra' 'fu' 'fua' 'genc' 'generate-content' 'generate-menus' 'generate-terms' 'generate-users' 'generate-vocabs' 'genm' 'gent' 'genu' 'genv' 'help' 'image-flush' 'pm-disable' 'pm-download' 'pm-enable' 'pm-list' 'pm-uninstall' 'pm-update' 'pml' 'sa' 'si' 'site-alias' 'site-install' 'sql-cli' 'sql-drop' 'sql-dump' 'sql-query' 'sql-sync' 'sqlc' 'sqlq' 'st' 'status' 'test-clean' 'test-run' 'token' 'uli' 'updatedb' 'updb' 'upwd' 'user-login' 'user-password' 'variable-delete' 'variable-get' 'variable-set' 'vdel' 'vget' 'vset'
|
||||
;;
|
||||
(cc)
|
||||
_values 'options' 'all' 'drush' 'theme-registry' 'menu' 'css-js' 'block'
|
||||
;;
|
||||
(pm-list|pml)
|
||||
_arguments \
|
||||
'(--core)--core[Filter out extensions that are not in drupal core.]' \
|
||||
'(--no-core)--no-core[Filter out extensions that are provided by drupal core.]' \
|
||||
'(--pipe)--pipe[Returns a whitespace delimited list of the names of the resulting extensions.]' \
|
||||
'(--status)--status=-[Filter by extension status. Choices: enabled, disabled and/or "not installed".]:status:(enabled disabled)' \
|
||||
'(--type)--type=-[Filter by extensions ension type. Choices: module, theme.]:type:(module theme)' \
|
||||
&& ret=0
|
||||
;;
|
||||
(pm-disable|dis)
|
||||
_modules=( $(drush pml --status=enabled --pipe) )
|
||||
if [[ $_modules != "" ]]; then
|
||||
_values 'enabled modules' $_modules
|
||||
fi
|
||||
;;
|
||||
(pm-enable|en)
|
||||
_arguments -C \
|
||||
'--resolve-dependencies[Attempt to download any missing dependencies. At the moment, only works when the module name is the same as the project name.]' \
|
||||
'--skip[Skip automatic downloading of libraries (c.f. devel).]' && ret=0
|
||||
_modules=( $(drush pml --status="disabled,not installed" --pipe) )
|
||||
if [[ $_modules != "" ]]; then
|
||||
_values -s 'not yet enabled modules' $_modules && ret=0
|
||||
fi
|
||||
;;
|
||||
(*)
|
||||
_values 'Global options' \
|
||||
{-d,--debug}'[Display even more information, including internal messages.]' \
|
||||
{-v,--verbose}'[Display extra information about the command.]' \
|
||||
{-y,--yes}'[Assume "yes" as answer to all prompts.]' \
|
||||
{-n,--no}'[Assume "no" as answer to all prompts.]' \
|
||||
{-s,--simulate}'[Simulate all relevant actions (dont actually change the system).]' \
|
||||
{-r,--root=}'[Drupal root directory to use (default: current directory).]' \
|
||||
{-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_drush '$@'
|
||||
|
||||
# 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,60 @@
|
|||
#compdef ecdsautil
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for ecdsaultils v0.4.0 (https://github.com/freifunk-gluon/ecdsautils)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Robinhuett <https://github.com/Robinhuett>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_ecdsautil_args() {
|
||||
case $words[1] in
|
||||
(sign)
|
||||
_arguments '1:somefile:_files'
|
||||
;;
|
||||
(verify)
|
||||
_arguments \
|
||||
'-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' \
|
||||
'-n[signaturecount]:signaturecount:""' ':file:_files'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_ecdsautil() {
|
||||
local -a commands=(
|
||||
"help:Show help"
|
||||
"generate-key:generate a new secret on stdout"
|
||||
"show-key:output public key of secret read from stdin"
|
||||
"sign:sign file"
|
||||
"verify:verify signature of file"
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
'1:cmd:->cmds' \
|
||||
'*:: :->args'
|
||||
|
||||
case "$state" in
|
||||
(cmds)
|
||||
_describe -t commands 'commands' commands
|
||||
;;
|
||||
(*)
|
||||
_ecdsautil_args
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_ecdsautil "$@"
|
||||
|
||||
# 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,99 @@
|
|||
#compdef elixir elixirc iex
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 elixir 1.19.5 (https://elixir-lang.org/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
if [[ $service == "iex" ]]; then
|
||||
_arguments \
|
||||
'--dbg[Set the backend for Kernel.dbg/2]:backend:(pry)' \
|
||||
'--dot-iex[Evaluate file, line by line to set up IEx environment]:file:_files' \
|
||||
'--remsh[Connect to a node using a remote shell]:name' \
|
||||
'*::file_or_data:_files -g "*.exs"'
|
||||
else
|
||||
local -a elixir_options=(
|
||||
\*{-e,--eval}'[Evaluate the given command]:command'
|
||||
'(- *)'{-h,--help}'[Print help message]'
|
||||
'*-r[Require the given files or patterns]:file_or_pattern:_files'
|
||||
'-S[Find and execute the given script in $PATH]:file:_files'
|
||||
'*-pr[Require the given files or patterns in parallel]:file_or_pattern:_files'
|
||||
'*-pa[Prepend the given path to Erlang code path]:path:_files -/'
|
||||
'*-pz[Append the given path to Erlang code path]:path:_files -/'
|
||||
'(- *)'{-v,--version}'[Print Erlang/OTP and Elixir versions]'
|
||||
'(--color --no-color)--color[Enable ANSI coloring]'
|
||||
'(--color --no-color)--no-color[Disable ANSI coloring]'
|
||||
'*--erl[Switch to be passed down to Erlang]:switch'
|
||||
'--logger-otp-reports[Enable or disable OTP reporting]:bool:(true false)'
|
||||
'--logger-sasl-reports[Enable or disable SASL reporting]:bool:(true false)'
|
||||
'--no-halt[Do not halt the Erlang VM after execution]'
|
||||
'(- *)--short-version[Print Elixir version]'
|
||||
'--cookie[Set a cookie for this distributed node]:cookie'
|
||||
'--hidden[Make a hidden node]'
|
||||
'--name[Make and assign a name to the distributed node]:name'
|
||||
'*--rpc-eval[Evaluate the given command on the given remote node]:node_command'
|
||||
'--sname[Make and assign a short name to the distributed node]'
|
||||
'--boot[Use the given FILE.boot to start the system]:file:_files'
|
||||
'*--boot-var[Make $VAR available as VALUE to FILE.boot]:var_value'
|
||||
'*--erl-config[Load configuration in FILE.config written in Erlang]:file:_files'
|
||||
'--pipe-to[Start the Erlang VM as a named PIPEDIR and LOGDIR]:pipe_and_log:_files -/'
|
||||
'--vm-wargs[Pass the contents in file as arguments to the VM]:file:_files'
|
||||
)
|
||||
|
||||
case $service in
|
||||
(elixir)
|
||||
_arguments $elixir_options[@]
|
||||
;;
|
||||
(elixirc)
|
||||
_arguments \
|
||||
$elixir_options[@] \
|
||||
'-o[The directory to output compiled files]:dir:_files -/' \
|
||||
'(- *)'{-v,--version}'[Print Elixir version and exit]' \
|
||||
'--ignore-module-conflict[Do not emit warnings if a module was previously defined]' \
|
||||
'--no-debug-info[Do not attach debug info to compiled modules]' \
|
||||
'--no-docs[Do not attach documentation to compiled modules]' \
|
||||
'--profile[Profile to compile modules]:type:(time)' \
|
||||
'--verbose[Print compilation status]' \
|
||||
'--warnings-as-errors[Treat warnings as errors and return non-zero exit status]' \
|
||||
'*::file:_files -g "*.ex"'
|
||||
;;
|
||||
esac
|
||||
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,131 @@
|
|||
#compdef emacs emacsclient
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2022 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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 emacs 31. (https://www.gnu.org/software/emacs/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei YOSHIDA (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
case $service in
|
||||
(emacs)
|
||||
_arguments -s \
|
||||
'--batch[do not do interactive display, implies -q]' \
|
||||
'--chdir[change to directory]:dir:_files -/' \
|
||||
'(--daemon --bg-daemon --fg-daemon)'{--daemon,--bg-daemon=-}'[start a named server in the background]::name' \
|
||||
'(--daemon --bg-daemon --fg-daemon)--fg-daemon=-[start a named server in the foreground]::name' \
|
||||
'--debug-init[enable Emacs Lisp debugger for init file]' \
|
||||
'(-d --display)'{-d,--display}'[use X server DISPLAY]:display:_x_display' \
|
||||
'--module-assertions[assert behavior of dynamic modules]' \
|
||||
'--dump-file[read dumped state from FILE]:file:_files' \
|
||||
'(- *)--fingerprint[output fingerprint and exit]' \
|
||||
'--seccomp=[read Seccomp BPF filter from FILE]: :_files' \
|
||||
'--no-build-details[do not add build details such as time stamps]' \
|
||||
'--no-desktop[do not load a saved desktop]' \
|
||||
'(-q --no-init-file)'{-q,--no-init-file}'[loader neither ~/.emacs nor default.el]' \
|
||||
'(-nl --no-loadup)'{-nl,--no-loadup}'[do not load loadup.el]' \
|
||||
'--no-site-file[do not load site-start.el]' \
|
||||
'--no-x-resources[do not load X resources]' \
|
||||
'(-nsl --no-site-lisp)'{-nsl,--no-site-lisp}'[do not add site-lisp directories to load-path]' \
|
||||
'--no-splash[do not display a splash screen on startup]' \
|
||||
'(-nw --no-window-system)'{-nw,--no-window-system}'[do not communicate with X, ignoring $DISPLAY]' \
|
||||
'--init-directory=[use DIR when looking for the Emacs init files]:dir:_files -/' \
|
||||
'(-Q --quick)'{-Q,--quick}'[equivalent to -q --no-site-file --no-site-lisp --no-splash --no-x-resources]' \
|
||||
'--script[run FILE as an Emacs Lisp script]:file:_files' \
|
||||
'-x[same as -Q --script]' \
|
||||
'(-t --terminal)'{-t,--terminal}'[use DEVICE for terminal IO]: :_files' \
|
||||
'(-u --user)'{-u,--user}"[load user's init file instead of your own]" \
|
||||
\*{-L,--directory}'[prepend DIR to load-path(with :DIR, append DIR)]: :_files -/' \
|
||||
{--eval,--execute}'[evaluate Emacs Lisp expression EXPR]:expr' \
|
||||
\*{--file,--find-file,--visit}'[visit FILE]: :_files' \
|
||||
\*{-f,--funcall}'[call Emacs Lisp function FUNC with no arguments]:func' \
|
||||
'--insert[insert contents of FILE into current buffer]:file:_files' \
|
||||
'--kill[exit without asking for confirmation]' \
|
||||
\*{-l,--load}'[load Emacs Lisp FILE using the load function]: :_files' \
|
||||
'(-bg --background-color)'{-bg,--background-color}'[window background color]:color' \
|
||||
'(-D --basic-display)'{-D,--basic-display}'[disable many display features]' \
|
||||
'(-bd --border-color)'{-bd,--border-color}'[main border color]:color' \
|
||||
'(-bw --border-width)'{-bw,--border-width}'[width of main border]' \
|
||||
'--color=-[override color mode for character terminals]:: :(auto never always ansi8)' \
|
||||
'(-cr --cursor-color)'{-cr,--cursor-color}'[color of the Emacs cursor indicating point]:color' \
|
||||
'(-fn --font)'{-fn,--font}'[default font, must be fixed-width]:font' \
|
||||
'(-fg --foreground)'{-fg,--foreground}'[window foreground color]:color' \
|
||||
'(-fh --fullheight)'{-fh,--fullheight}'[make the first frame high as the screen]' \
|
||||
'(-fs --fullscreen)'{-fs,--fullscreen}'[make the first frame fullscreen]' \
|
||||
'(-fw --fullwidth)'{-fw,--fullwidth}'[make the first frame wide as the screen]' \
|
||||
'(-mm --maximized)'{-mm,--maximized}'[make the first frame maximized]' \
|
||||
'(-g --geometry)'{-g,--geometry}'[window geometry]:geometry' \
|
||||
'(-nbi --no-bitmap-icon)'{-nbi,--no-bitmap-icon}'[do not use picture of gnu for Emacs icon]' \
|
||||
'--iconic[start Emacs in iconified state]' \
|
||||
'(-ib --internal-border)'{-ib,--internal-border}'[width between text and main border]:width' \
|
||||
'(-lsp --line-spacing)'{-lsp,--line-spacing}'[additional space to put between lines]' \
|
||||
'(-ms --mouse-color)'{-ms,--mouse-color}'[mouse cursor color in Emacs window]:color' \
|
||||
'(-T --name --title)'{-T,--name,--title}'[title for initial Emacs frame]:title' \
|
||||
'(-nbc --no-blinking-cursor)'{-nbc,--no-blinking-cursor}'[disable blinking cursor]' \
|
||||
'(-r -rv --reverse-video)'{-r,-rv,--reverse-video}'[switch foreground and background]' \
|
||||
'(-vb --vertical-scroll-bars)'{-vb,--vertical-scroll-bars}'[enable vertical scroll bars]' \
|
||||
'--xrm[set additional X resources]:resource' \
|
||||
'--parent-id[set parent window]:xid' \
|
||||
'(- *)--help[display help and exit]' \
|
||||
'(- *)--version[output version information and exit]' \
|
||||
'*:: :_files'
|
||||
;;
|
||||
(emacsclient)
|
||||
_arguments -s -n : \
|
||||
'(- *)'{-V,--version}'[Print version information and exit]' \
|
||||
'(- *)'{-H,--help}'[Print this usage information message and exit]' \
|
||||
'(-nw -t --tty --no-window-system)'{-nw,-t,--tty,--no-window-system}'[Open a new Emacs frame on the current terminal]' \
|
||||
'(-c --create-frame)'{-c,--create-frame}'[Create a new frame instead of trying to use the current Emacs frame]' \
|
||||
'(-r --reuse-frame)'{-r,--reuse-frame}'[Create a new frame if none exists, otherwise use the current Emacs frame]' \
|
||||
'(-F --frame-parameters)'{-F,--frame-parameters=}'[Set the parameters of a new frame]:alist' \
|
||||
'(-e --eval)'{-e,--eval}'[Evaluate as Emacs Lisp expressions]' \
|
||||
'(-n --no-wait)'{-n,--no-wait}'[Returns immediately without waiting for finish]' \
|
||||
'(-w --timeout)'{-w,--timeout=}'[Seconds to wait before timing out]:seconds' \
|
||||
'(-q --quiet)'{-q,--quiet}"[Don't display messages on success]" \
|
||||
'(-u --suppress-output)'{-u,--suppress-output}"[Don't display return values from the server]" \
|
||||
'(-d --display)'{-d,--display=}'[Tell the server to display the files on the given display]:display:_x_display' \
|
||||
'--parent-id=[Open in parent window ID, via XEmbed]' \
|
||||
'(-s --socket-name)'{-s,--socket-name=}'[Set filename of the UNIX socket for communication]: :_files' \
|
||||
'(-f --server-file)'{-f,--server-file=}'[Set filename of the TCP authentication file]: :_files' \
|
||||
'(-a --alternate-editor)'{-a,--alternate-editor=}'[Editor to fallback to if the server is not running if EDITOR is the empty string]:editor:_files' \
|
||||
'(-T --tramp)'{-T,--tramp=}'[PREFIX to prepend to filenames sent by emacsclient for locating files remotely via Tramp]:prefix' \
|
||||
'*:: :_files'
|
||||
;;
|
||||
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
|
||||
383
src/_emulator
383
src/_emulator
|
|
@ -1,35 +1,10 @@
|
|||
#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).
|
||||
# Completion script for emulator (Android Emulator) 35.3.11.0
|
||||
# (https://developer.android.com/studio/run/emulator-command).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -39,96 +14,274 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_emulator() {
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
local ret=1
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line curcontext="$curcontext"
|
||||
local -a option_names=(
|
||||
list-avds sysdir system vendor writable-system delay-adb datadir
|
||||
kernel ramdisk image initdata data encryption-key logcat-output
|
||||
partition-size cache cache-size no-cache nocache sdcard
|
||||
quit-after-boot qemu-top-dir monitor-adb snapstorage
|
||||
no-snapstorage snapshot no-snapshot no-snapshot-save
|
||||
no-snapshot-load force-snapshot-load qcow2-for-userdata
|
||||
snapshot-list no-snapshot-update-time wipe-data avd avd-arch
|
||||
skindir skin no-skin noskin memory ui-only id cores accel no-accel
|
||||
ranchu engine netspeed netdelay netfast code-profile show-kernel
|
||||
shell no-jni nojni dalvik-vm-checkjni logcat log-nofilter
|
||||
log-detailed no-audio noaudio audio radio port ports
|
||||
modem-simulator-port onion onion-alpha onion-rotation dpi-device
|
||||
scale wifi-client-port wifi-server-port http-proxy timezone
|
||||
change-language change-country change-locale dns-server net-tap
|
||||
net-socket net-tap-script-up net-tap-script-down cpu-delay
|
||||
no-boot-anim no-window qt-hide-window no-sim lowram version
|
||||
no-passive-gps gnss-file-path gnss-grpc-port virtio-console
|
||||
read-only is-restart report-console gps shell-serial tcpdump
|
||||
bootchart charmap studio-params prop shared-net-id nand-limits gpu
|
||||
use-host-vulkan vsync-rate camera-back camera-front webcam-list
|
||||
virtualscene-poster screen selinux unix-pipe fixed-scale
|
||||
wait-for-debugger skip-adb-auth metrics-to-console
|
||||
metrics-collection metrics-to-file no-metrics detect-image-hang
|
||||
feature icc-profile sim-access-rules-file phone-number acpi-config
|
||||
fuchsia window-size allow-host-audio restart-when-stalled
|
||||
perf-stat share-vid grpc grpc-tls-key grpc-tls-cer grpc-tls-ca
|
||||
grpc-use-token grpc-use-jwt grpc-allowlist idle-grpc-timeout
|
||||
waterfall grpc-ui packet-streamer-endpoint netsim-args
|
||||
multidisplay google-maps-key no-location-ui use-keycode-forwarding
|
||||
record-session legacy-fake-camera camera-hq-edge no-direct-adb
|
||||
check-snapshot-loadable no-hidpi-scaling no-mouse-reposition
|
||||
guest-angle usb-passthrough append-userspace-opt save-path
|
||||
no-nested-warnings wifi-tap wifi-tap-script-up
|
||||
wifi-tap-script-down wifi-socket vmnet-bridged vmnet-shared
|
||||
vmnet-start-address ting mnet_end_address vmnet-end-address
|
||||
vmnet-subnet-mask vmnet-isolated wifi-user-mode-options
|
||||
network-user-mode-options adb-path hotplug-multi-display xts
|
||||
wifi-mac-address no-ethernet android-serialno
|
||||
)
|
||||
|
||||
# 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'
|
||||
local -a help_flags=()
|
||||
for name in $option_names[@]
|
||||
do
|
||||
help_flags+=("(- *)-help-${name}[print -${name} help message]")
|
||||
done
|
||||
|
||||
# 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 -logcat: use completer from _adb
|
||||
# TODO Complete options with device values
|
||||
# TODO Complete -prop
|
||||
_arguments -C \
|
||||
'-list-avds[list available AVDs]' \
|
||||
'-sysdir[search for system disk images in the directory]: :_files -/' \
|
||||
'-vendor[read initial vendor image]: :_files' \
|
||||
"-writable-system[make system image writable after 'adb remount']" \
|
||||
'-delay-adb[delay adb communication till boot completes]' \
|
||||
'-datadir[write user data into the directory]: :_files -/' \
|
||||
'-kernel[use specific emulated kernel]: :_files' \
|
||||
'(-system -image)'{-system,-image}'[read initial system image from the file]: :_files -g "*.img"' \
|
||||
'-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"' \
|
||||
'-encryption-key[read initial encryption key image]: :_files' \
|
||||
'-logcat-output[output file of logcat]: :_files' \
|
||||
'-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"' \
|
||||
'-quit-after-boot[quit emulator after guest boots completely]' \
|
||||
'-qemu-top-dir[use the emulator in the specified dir]: :_files -/' \
|
||||
'-monitor-adb[monitor the adb messages between guest and host]:verbose_level' \
|
||||
'(-no-snapstorage)-snapstorage[file that contains all state snapshots]: :_files -g "*.img"' \
|
||||
'(-snapstorage)-no-snapstorage[do not mount a snapshot storage file]' \
|
||||
"-snapshot[name of snapshot within storage file for auto-start and auto-save]: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]' \
|
||||
'-force-snapshot-load[force starting from snapshot]' \
|
||||
'-qcow2-for-userdata[use qcow2 for userdata]' \
|
||||
'-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:($(_emulator_list_avds))' \
|
||||
'-avd-arch[use a specific target architecture]:target' \
|
||||
'-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)' \
|
||||
'-ui-only[run only the UI feature requested]:feature' \
|
||||
'-id[assign an ID to this virtual device]:id' \
|
||||
'-cores[Set number of CPU cores to emulator]:number' \
|
||||
'(-no-accel)-accel[Configure emulation acceleration]:mode' \
|
||||
"(-accel)-no-accel[Same as '-accel off']" \
|
||||
'-ranchu[use new emulator backend instead of the classic one]' \
|
||||
'-engine[select engine]:engine:(auto classic qemu2)' \
|
||||
'-netspeed[maximum network download/upload speeds]:speed' \
|
||||
'-netdelay[network latency emulation]:delay' \
|
||||
'-netfast[disable network shaping]' \
|
||||
'-code-profile[enable code profiling]:profile' \
|
||||
'-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' \
|
||||
'-logcat-nofilter[disable the duplicate log filter]' \
|
||||
'-log-detailed[enable detailed logging info]' \
|
||||
'(-audio -noaudio -no-audio)'{-noaudio,-no-audio}'[disable audio support]' \
|
||||
'(-noaudio -no-audio)-audio[use specific audio backend]:audio backend' \
|
||||
'-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' \
|
||||
'-modem-simulator-port[TCP port to use for android modem simulator]: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:(0 1 2 3)' \
|
||||
'-dpi-device[specify device'\''s resolution in dpi (default 165)]:dpi' \
|
||||
'-scale[scale emulator window]:scale' \
|
||||
'-wifi-client-port[connect to other emulator for WiFi forwarding]:port' \
|
||||
'-wifi-server-port[listen to other emulator for WiFi forwarding]:port' \
|
||||
'-http-proxy[make TCP connections through a HTTP/HTTPS proxy]:proxy' \
|
||||
"-timezone[use this timezone instead of the host's default]:timezone" \
|
||||
'-change-language[use this language instead of the current one]:language' \
|
||||
'-change-country[use this country instead of the current one]:country' \
|
||||
'-change-locale[use this locale instead of the current one]' \
|
||||
'-dns-server[use this DNS server(s) in the emulated system]:DNS servers' \
|
||||
'-net-tap[use this TAP interface for network]:interface' \
|
||||
'-net-socket[use Socket interface for network]:option' \
|
||||
'-net-tap-script-up[script to run when the TAP interface goes up]: :_files' \
|
||||
'-net-tap-script-down[script to run when the TAP interface goes down]: :_files' \
|
||||
'-cpu-delay[throttle CPU emulation]:CPU delay' \
|
||||
'-no-boot-anim[disable animation for faster boot]' \
|
||||
'-no-window[disable graphical window display]' \
|
||||
'-qt-hide-window[start QT window but hide window display]' \
|
||||
'-no-sim[device has no SIM card]' \
|
||||
'-lowram[device is a low ram device]' \
|
||||
'(- : *)-version[display emulator version number]' \
|
||||
'-no-passive-gps[disable passive gps updates]' \
|
||||
'-gnss-file-path[use the specified filepath to read gnss data]: :_files' \
|
||||
'-gnss-grpc-port[use the specified port number to start grpc service]:port' \
|
||||
'-virtio-console[using virtio console as console]' \
|
||||
'-read-only[allow running multiple instances of emulators on the same AVD]' \
|
||||
'-is-restart[specify that this emulator was a restart and to wait out given PID]: :_pids' \
|
||||
'-report-console[report console port to remote socket]: :_socket' \
|
||||
'-gps[redirect NMEA GPS to character device]:device' \
|
||||
'-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' \
|
||||
'-gpu[set hardware OpenGLES emulation mode]:mode' \
|
||||
'-use-host-vulkan[use host for vulkan emulation regardless of "gpu" mode]' \
|
||||
'-vsync-rate[set the vsync rate]:rate' \
|
||||
'-camera-back[set emulation mode for a camera facing back]:mode' \
|
||||
'-camera-front[set emulation mode for a camera facing front]:mode' \
|
||||
'-webcam-list[list web cameras available for emulation]' \
|
||||
'*-virtualscene-poster[load a png or jpeg image as a poster in the virtual scene]' \
|
||||
'-screen[set emulated screen mode]:mode' \
|
||||
'-selinux[set SELinux mode]:mode:(disabled permissive)' \
|
||||
'-unix-pipe[add path to the list of allowed Unix pipes]:file:_files' \
|
||||
'-fixed-scale[use fixed 1:1 scale for the initial emulator window]' \
|
||||
'-wait-for-debugger[pause an launch and wait for a debugger process to attach before resuming]' \
|
||||
'-skip-adb-auth[skip adb authentication dialogue]' \
|
||||
'-metrics-to-console[enable usage metrics and print the messages to stdout]' \
|
||||
'-metrics-collection[enable usage metrics and send them to google play]' \
|
||||
'-metrics-to-file[enable usage metrics and write the messages into specified file]: :_files' \
|
||||
'-no-metrics[disable metrics collection]' \
|
||||
'-detect-image-hang[enable the detection of system image hangs]' \
|
||||
'*-feature[force-enable or disable the features]:name' \
|
||||
'-icc-profile[use icc profile from specified file]: :_files' \
|
||||
'-sim-access-rules-file[use SIM access rules from specified file]: :_files' \
|
||||
'-phone-number[set the phone number of the emulated device]:phone_number' \
|
||||
'-acpi-config[specify acpi device properties]: :_files' \
|
||||
'-fuchsia[run Fuchsia image]' \
|
||||
'-window-size[set window size for when bypassing android-specific setup]:size' \
|
||||
'-allow-host-audio[allow sending of audio from audio input devices]' \
|
||||
'-restart-when-stalled[allow restarting guest when it is stalled]' \
|
||||
'-perf-stat[run pediodic perf stat reporter in the background and output to specified file]: :_files' \
|
||||
'-share-vid[share current video state in shared memory region]' \
|
||||
'-grpc[TCP ports used for the gRPC bridge]' \
|
||||
'-grpc-tls-key[file with the private key used to enable gRPC TLS]: :_files' \
|
||||
'-grpc-tls-cer[file with the public X509 certificate used to enable gRPC TLS]: :_files' \
|
||||
'-grpc-tls-ca[file with the Certificate Authorities used to validate client certificates]: :_files' \
|
||||
'-grpc-use-token[use the emulator console token for gRPC authentication]' \
|
||||
'-grpc-use-jwt[use a signed JWT token for gRPC authentication]' \
|
||||
'-grpc-allowlist[use a custom allow list for gRPC authentication]: :_files' \
|
||||
'-idle-grpc-timeout[terminate the emulrator if there is no gRPC activity within the given second]:seconds' \
|
||||
'-waterfall[mode in which to run waterfall]:mode' \
|
||||
'-grpc-ui[use the experimental gRPC ui]' \
|
||||
'-packet-streamer-endpoint[use the provided packet streamer endpoint when present]:uri:_urls' \
|
||||
'-netsim-args[additional netsim arguments]' \
|
||||
'-google-maps-key[API key to use with the Google Maps GUI]:api_key' \
|
||||
'-no-location-ui[disable the location UI in the extended window]' \
|
||||
'-use-keycode-forwarding[use keycode forwarding instead of host charmap translation]' \
|
||||
'-record-session[screen record the emulator session]' \
|
||||
'-legacy-fake-camera[use legacy camera HAL for the emulated fake camera]' \
|
||||
'-camera-hq-edge[enable high qualify edge processing for emulated camera]' \
|
||||
'-no-direct-adb[use external adb executable for internal communication]' \
|
||||
'-check-snapshot-loadable[check if a snapshot is loadable]' \
|
||||
'-no-hidpi-scaling[disable HiDPI scaling of guest display on macOS devices]' \
|
||||
'-no-mouse-reposition[do not reposition the mouse to emulator window center]' \
|
||||
'-guest-angle[enable guest ANGLE as system driver]' \
|
||||
'-usb-passthrough[host USB device Passthrough]:param' \
|
||||
'*-append-userspace-opt[append a property which is passed to the userspace]:param' \
|
||||
'-save-path[override save path for screenshot and bug report]: :_files' \
|
||||
'-no-nested-warnings[disable warning dialog when emulator is running in nested virtualization]' \
|
||||
'-wifi-tap[use this TAP interface for Virtio Wi-Fi]: :_files' \
|
||||
'-wifi-tap-script-up[script to run when the TAP interface goes up]: :_files' \
|
||||
'-wifi-tap-script-down[script to run when the TAP interface goes down]: :_files' \
|
||||
'-wifi-socket[use Socket interface for Virtio Wi-Fi]: :_socket' \
|
||||
'-vmnet-bridged[enable vmnet framework in shared mode]: :_files' \
|
||||
'-vmnet-shared[enable vmnet framework in shared mode]' \
|
||||
'-vmnet-start-address[starting IPv4 address to assing using DHCP]:v4_addr' \
|
||||
'-vmnet-end-address[ending IPv4 address to assing using DHCP]:v4_addr' \
|
||||
'-vmnet-subnet-mask[IPv4 netmask to assing using DHCP]:v4_addr' \
|
||||
'-vmnet-isolated[enable isolation for the interface]' \
|
||||
'-wifi-user-mode-options[override default user mode networking option for wifi network]:options' \
|
||||
'-network-user-mode-options[override default user mode networking option for both radio and wifi network]:options' \
|
||||
'-adb-path[use adb binary from specified path]: :_files' \
|
||||
'-hotplug-multi-display[use the HAL hotplug display to implement multiDisplay]' \
|
||||
'-xts[use android64-xts CPU profile instead of the default one]' \
|
||||
'-wifi-mac-address[override the mac address of the wlan0 interface in AVD]:mac_address' \
|
||||
'-no-ethernet[disable virtual Ethernet interface en0]' \
|
||||
'-android-serialno[set customized android serial number]:serial_no' \
|
||||
'-qemu[pass arguments to qemu]:arguments' \
|
||||
"-verbose[same as '-debug-init']" \
|
||||
'*'{-debug,-debug-,-debug-no-}'[enable/disable specific debug messages]:tag' \
|
||||
'(- : *)-help[display help information]' \
|
||||
'(- : *)-help-disk-images[about disk images]' \
|
||||
'(- : *)-help-debug-tags[debug tags for -debug <tags>]' \
|
||||
'(- : *)-help-char-devices[character <device> specification]' \
|
||||
'(- : *)-help-environment[environment variables]' \
|
||||
'(- : *)-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_flags[@] \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
(cmds)
|
||||
local -a avds=($(_emulator_list_avds))
|
||||
for ((i=1; i<=${#avds[@]}; i++)); do
|
||||
avds[i]="@${avds[i]}"
|
||||
done
|
||||
_values 'avds' "${avds[@]}"
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_emulator_list_avds() {
|
||||
local -a _avds=($HOME/.android/avd/*.ini(N.:t:r))
|
||||
echo "${_avds[@]}"
|
||||
}
|
||||
|
||||
_emulator "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
12
src/_envdir
12
src/_envdir
|
|
@ -39,11 +39,19 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
args=(
|
||||
'(-h --help)'{-h+,--help}'[show this help message and exit]'
|
||||
local -a args=(
|
||||
'(-h --help)'{-h+,--help}'[show help message and exit]'
|
||||
'(-)'--version'[display version information and exit]'
|
||||
'(-)1:directory: _path_files -/'
|
||||
'(-)2:command: _command_names -e'
|
||||
'*::arguments: _precommand'
|
||||
)
|
||||
_arguments -S $args
|
||||
|
||||
# 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,6 +1,6 @@
|
|||
#compdef exportfs
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -37,15 +37,22 @@
|
|||
# * Timofey Titovets <nefelim4ag@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
_exportfs() {
|
||||
_values -w 'option' \
|
||||
'(-i)-a[Export or unexport all directories]' \
|
||||
'(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \
|
||||
'(-i)-r[Reexport all directories]' \
|
||||
'(-i)-u[Unexport one or more directories]' \
|
||||
'-f[flush everything out of export table]' \
|
||||
'-o[option1,option2.. Specify a list of export options]' \
|
||||
'-s[Display the current export list suitable for /etc/exports]' \
|
||||
'-v[Be verbose]'
|
||||
}
|
||||
_exportfs "$@"
|
||||
|
||||
_arguments \
|
||||
'(-d --debug)'{-d,--debug}'[Turn on debugging]:kind:(all auth call general parse)' \
|
||||
'(-i)-a[Export or unexport all directories]' \
|
||||
'(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \
|
||||
'-o[Specify a list of export options in the same manner as in exports]:option' \
|
||||
'(-i)-r[Reexport all directories]' \
|
||||
'(-i)-u[Unexport one or more directories]' \
|
||||
"-f[Flush everything out of kernel's export table]" \
|
||||
'-v[Be verbose]' \
|
||||
'-s[Display the current export list suitable for /etc/exports]'
|
||||
|
||||
# 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
|
||||
|
|
|
|||
97
src/_fab
97
src/_fab
|
|
@ -1,6 +1,6 @@
|
|||
#compdef fab
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users
|
||||
# Copyright (c) 2015 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -28,9 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for Fabric (http://fabfile.org)
|
||||
#
|
||||
# Source: https://github.com/vhbit/fabric-zsh-autocomplete
|
||||
# Completion script for Fabric v3.2.2 (https://www.fabfile.org/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -40,65 +38,42 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
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
|
||||
_fab_tasks() {
|
||||
local -a tasks=(${(f)"$(fab --list 2>/dev/null| awk '/^ /{first=$1;$1="";print first ":" substr($0, 2) }')"})
|
||||
if (( $#tasks > 0)); then
|
||||
_describe -t 'task' tasks tasks
|
||||
fi
|
||||
}
|
||||
|
||||
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'']: :' \
|
||||
'(--ssh-config-path=)--ssh-config-path=[ssh config path]: :_files' \
|
||||
'(--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
|
||||
_arguments \
|
||||
'--complete[Print tab-completion candidates for given parse remainder]' \
|
||||
"--hide=[Set default value of run()'s 'hide' kwarg]:str" \
|
||||
'(- *)--list-agent-keys[Display ssh-agent key list, and exit]' \
|
||||
'--no-dedupe[Disable task deduplication]' \
|
||||
'--print-completion-script=[Print the tab-completion script for your preferred shell]:shell:(bash zsh fish)' \
|
||||
'--prompt-for-login-password[Request an upfront SSH-auth password prompt]' \
|
||||
'--prompt-for-passphrase[Request an upfront SSH key passphrase prompt]' \
|
||||
'--prompt-for-sudo-password[Prompt user at start of session for the sudo.password config value]' \
|
||||
'--write-pyc[Enable creation of .pyc files]' \
|
||||
'(-c --collection)'{-c,--collection=}'[Specify collection name to load]:name' \
|
||||
'(-d --debug)'{-d,--debug}'[Enable debug output]' \
|
||||
'(-D --list-depth)'{-D,--list-depth=}'[When listing tasks, only show the first INT levels]:level' \
|
||||
'(-e --echo)'{-e,--echo}'[Echo executed commands before running]' \
|
||||
'(-f --config)'{-f,--config=}'[Runtime configuration file to use]:file:_files' \
|
||||
'(-F --list-format)'{-F,--list-format=}'[Change the display format used when listing tasks]:format:(flat nested json)' \
|
||||
'(- *)'{-h,--help=-}'[Show core or per-task help and exit]::task:_fab_tasks' \
|
||||
'(-H --hosts)'{-H,--hosts=}'[Comma-separated host name(s) to execute tasks against]:host' \
|
||||
\*{-i,--identity=}'[Path to runtime SSH identity (key) file]:file:_files' \
|
||||
'(-l --list)'{-l,--list=-}'[List available tasks, optionally limited to a namespace]::namespace' \
|
||||
'(-p --pty)'{-p,--pty}'[Use a pty when executing shell commands]' \
|
||||
'(-r --search-root)'{-r,--search-root=}'[Change root directory used for finding task modules]:dir:_files -/' \
|
||||
'(-R --dry)'{-R,--dry}'[Echo commands instead of running]' \
|
||||
'(-S --ssh-config)'{-S,--ssh-config=}'[Path to runtime SSH config file]:file:_files' \
|
||||
'(-t --connect-timeout)'{-t,--connect-timeout=}'[Specifies default connection timeout, in seconds]:seconds' \
|
||||
'(-T --command-timeout)'{-T,--command-timeout=}'[Specify a global command execution timeout, in seconds]:seconds' \
|
||||
'(- *)'{-V,--version}'[Show version and exit]' \
|
||||
'(-w --warn-only)'{-w,--warn-only}'[Warn, instead of failing, when shell commands fail]' \
|
||||
'*::task:_fab_tasks'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
|
|
@ -0,0 +1,346 @@
|
|||
#compdef fail2ban-client
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2020 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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 fail2ban-client (https://www.fail2ban.org/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Felix Neumärker <xdch47@posteo.de>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_fail2ban_client() {
|
||||
integer NORMARG
|
||||
_arguments -A "-*" -n \
|
||||
'-c[configuration directory]:dir:_files -/' \
|
||||
'-s[socket path]:file:_files' \
|
||||
'-p[pidfile path]:file:_files' \
|
||||
'--loglevel[logging level]:level:(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG)' \
|
||||
'--logtarget[logging target]:target:(stdout stderr syslog sysout)' \
|
||||
'--syslogsocket[syslog socket path]:file:_files' \
|
||||
'-d[dump configuration]' \
|
||||
'(--dp --dump-pretty)'{--dp,--dump-pretty}'[dump the configuration using more human readable representation]' \
|
||||
'(-t --test)'{-t,--test}'[test configuration]' \
|
||||
'-i[interactive mode]' \
|
||||
'-v[increase verbosity]' \
|
||||
'-q[decrease verbosity]' \
|
||||
'-x[force execution of the server (remove socket file)]' \
|
||||
'-b[start server in background]' \
|
||||
'-f[start server in foreground]' \
|
||||
'--str2sec[convert time abbreviation format to seconds]:_message str2sec' \
|
||||
'(-h --help)'{-h,--help}'[display help message]' \
|
||||
'(-V --version)'{-V,--version}'[print the version]' \
|
||||
'1:fail2ban command:_fail2ban_client_commands' \
|
||||
'*:fail2ban command argument:_fail2ban_client_command_arguments'
|
||||
}
|
||||
|
||||
_fail2ban_client_commands() {
|
||||
local cmds=(
|
||||
'unban:unbans all IP addresses'
|
||||
'set:set property'
|
||||
'get:get property'
|
||||
'status:gets the current status of the server'
|
||||
'reload:reloads the configuration/jails'
|
||||
'restart:restarts the server'
|
||||
'start:starts the server and the jails'
|
||||
'stop:stops all jails and terminate the server'
|
||||
'ping:tests if the server is alive'
|
||||
'flushlogs:flushes the logtarget if a file and reopens it'
|
||||
'help:return this output'
|
||||
'version:return the server version'
|
||||
)
|
||||
|
||||
_describe -V "fail2ban commands" cmds
|
||||
}
|
||||
|
||||
_fail2ban_client_command_arguments() {
|
||||
local f2barg="$words[$NORMARG]"
|
||||
case "$f2barg" in
|
||||
(unban)
|
||||
local jail
|
||||
if (( $words[(I)(--all)] == 0 )); then
|
||||
for jail in $(_fail2ban_client_print_jails); do
|
||||
_fail2ban_client_jails "$jail"
|
||||
done
|
||||
local unban_opts=(--all)
|
||||
_describe -o "unban options" unban_opts
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
;;
|
||||
(set|get)
|
||||
if (( $NORMARG + 1 == $CURRENT )); then
|
||||
_fail2ban_client_jails
|
||||
_fail2ban_client_settings
|
||||
else
|
||||
_fail2ban_client_jail_${f2barg}
|
||||
fi
|
||||
;;
|
||||
(status)
|
||||
if (( $NORMARG + 1 == $CURRENT )); then
|
||||
_fail2ban_client_jails
|
||||
elif (( $NORMARG + 2 == $CURRENT )); then
|
||||
_values "flavor" basic cymru
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_fail2ban_client_jail_set() {
|
||||
if (( $NORMARG + 2 == $CURRENT )); then
|
||||
case $words[$NORMARG+1] in
|
||||
(loglevel)
|
||||
local loglevel=(CRITICAL ERROR WARNING NOTICE INFO DEBUG TRACEDEBUG HEAVYDEBUG)
|
||||
_describe -V "loglevel" loglevel
|
||||
;;
|
||||
(logtarget)
|
||||
local logtarget=(STDOUT STDERR SYSLOG)
|
||||
_describe -V "logtarget" logtarget
|
||||
_files
|
||||
;;
|
||||
(syslogsocket)
|
||||
local syslogsocket=(auto)
|
||||
_describe -V "logtarget" syslogsocket
|
||||
_files
|
||||
;;
|
||||
(dbfile)
|
||||
_files
|
||||
;;
|
||||
(dbpurgeage)
|
||||
_message "sets the max age in <SECONDS> that history of bans will be kept"
|
||||
;;
|
||||
(*)
|
||||
local jailsettings=(
|
||||
unbanip banip action addaction addfailregex addignoreip
|
||||
addignoreregex addjournalmatch addlogpath bantime
|
||||
datepattern delaction delfailregex delignoreip
|
||||
delignorerexgex deljournalmatch dellogpath findtime idle
|
||||
ignorecache ignorecommand ignoreself logencoding maxlines
|
||||
maxretry usedns
|
||||
)
|
||||
_describe -t "f2b_jail_setting" -V "jail setting" jailsettings
|
||||
;;
|
||||
esac
|
||||
else
|
||||
local jail="$words[$NORMARG+1]"
|
||||
|
||||
if (( $NORMARG + 3 == $CURRENT )) ; then
|
||||
case $words[$NORMARG+2] in
|
||||
unbanip)
|
||||
_fail2ban_client_ips "$jail"
|
||||
;;
|
||||
delfailregex)
|
||||
_fail2ban_client_regexs fail "$jail"
|
||||
;;
|
||||
delignorerexgex)
|
||||
_fail2ban_client_regexs ignore "$jail"
|
||||
;;
|
||||
dellogpath)
|
||||
local filelist=("${(@f)$(LANG=C fail2ban-client status $jail 2> /dev/null | sed -n -e 's/^.*File list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
|
||||
|
||||
if [[ -n "${filelist[@]}" ]] ; then
|
||||
_describe -t "f2b_filelist" -V "filelist of jail $1" filelist
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
;;
|
||||
idle)
|
||||
_values 'fail2ban idle' on off
|
||||
;;
|
||||
ignoreself)
|
||||
_values 'fail2ban ignoreself' true false
|
||||
;;
|
||||
delignoreip)
|
||||
local ignoreips=("${(@f)$(fail2ban-client get "$jail" ignoreip 2> /dev/null | sed -e 's/^[|`]-\s\+//p')}")
|
||||
if [[ -n "${ignoreips[@]}" ]] ; then
|
||||
_describe -t "f2b_ignoreip" -V "fail2ban ignored ips" ignoreips
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
;;
|
||||
delaction|action)
|
||||
_fail2ban_client_actions "$jail"
|
||||
;;
|
||||
addlogpath)
|
||||
_files
|
||||
;;
|
||||
*)
|
||||
_message "No completion for ${words[NORMARG+2]}"
|
||||
;;
|
||||
esac
|
||||
elif (( $NORMARG + 4 == $CURRENT )) ; then
|
||||
case $words[$NORMARG+2] in
|
||||
action)
|
||||
_fail2ban_client_actionproperties "$jail" $words[$NORMARG+3]
|
||||
;;
|
||||
addaction)
|
||||
_files
|
||||
;;
|
||||
*)
|
||||
_nothing
|
||||
;;
|
||||
esac
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
_fail2ban_client_jail_get() {
|
||||
if (( $NORMARG + 2 == $CURRENT )) ; then
|
||||
case $words[$NORMARG+1] in
|
||||
(loglevel|logtarget|syslogsocket|dbfile|dbpurgeage)
|
||||
_nothing
|
||||
;;
|
||||
*)
|
||||
# jail
|
||||
local jailprops=(
|
||||
logpath
|
||||
logencoding
|
||||
journalmatch
|
||||
ignoreself
|
||||
ignoreip
|
||||
ignorecommand
|
||||
failregex
|
||||
ignoreregex
|
||||
findtime
|
||||
bantime
|
||||
datepattern
|
||||
usedns
|
||||
maxretry
|
||||
maxlines
|
||||
actions
|
||||
action
|
||||
actionproperties
|
||||
actionmethods
|
||||
)
|
||||
_describe -t "f2b_jail_props" -V "jail properties" jailprops
|
||||
;;
|
||||
esac
|
||||
else
|
||||
local jail="$words[$NORMARG+1]"
|
||||
|
||||
if (( $NORMARG + 3 == $CURRENT )); then
|
||||
case $words[$NORMARG+2] in
|
||||
(action|actionproperties|actionmethods)
|
||||
_fail2ban_client_actions "$jail"
|
||||
;;
|
||||
*)
|
||||
_nothing
|
||||
;;
|
||||
esac
|
||||
elif (( $NORMARG + 4 == $CURRENT )); then
|
||||
case $words[$NORMARG+2] in
|
||||
(action|actionproperties|actionmethods)
|
||||
_fail2ban_client_actionproperties "$jail" $words[$NORMARG+3]
|
||||
;;
|
||||
*)
|
||||
_nothing
|
||||
;;
|
||||
esac
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
_fail2ban_client_settings() {
|
||||
local setargs=(loglevel logtarget syslogsocket dbfile dbpurgeage)
|
||||
_describe -t "f2b_settings" -V "fail2ban-client settings" setargs
|
||||
}
|
||||
|
||||
_fail2ban_client_regexs() {
|
||||
local regex=("${(@f)$(fail2ban-client get $2 ${1}regex 2> /dev/null | sed -n -e 's/[|`]- \[\([0-9]\+\)\]:\s\+/\1:/p')}")
|
||||
if [[ -n "${regex[@]}" ]] ; then
|
||||
_describe -t "f2b_regex" -V "jail $2 ${1}regex" regex
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
}
|
||||
|
||||
_fail2ban_client_actions() {
|
||||
local jailactions=("${(@f)$(fail2ban-client get $1 actions 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}")
|
||||
|
||||
if [[ -n "${jailactions[@]}" ]] ; then
|
||||
_describe -t "f2b_jail_actions" -V "jail actions" jailactions
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
}
|
||||
|
||||
_fail2ban_client_jails() {
|
||||
local jails=($(_fail2ban_client_print_jails))
|
||||
_describe -V "jails" jails
|
||||
}
|
||||
|
||||
_fail2ban_client_ips() {
|
||||
local ips=("${(@f)$(LANG=C fail2ban-client status $1 2> /dev/null | sed -n -e 's/^.*Banned IP list:\s\+//' -e 'T' -e 's/\s\+/\'$'\n/g' -e 'p')}")
|
||||
if [[ -n "${ips[@]}" ]]; then
|
||||
_describe -t "f2b_jail_$1" -V "banned ips of jail $1" ips
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
}
|
||||
|
||||
_fail2ban_client_actionproperties() {
|
||||
local default_actionproperties=(
|
||||
actionstart
|
||||
actionstop
|
||||
actioncheck
|
||||
actionban
|
||||
actionunban
|
||||
timeout
|
||||
)
|
||||
local all_actionproperties=("${(@f)$(fail2ban-client get $1 actionproperties $2 2>/dev/null | sed -e '1d' -e 's/,\s\+/\'$'\n/g')}")
|
||||
local add_actionproperties=("${(@)all_actionproperties:|default_actionproperties}")
|
||||
|
||||
_describe -t "f2b_actions_defprops" -V "default action properties" default_actionproperties
|
||||
|
||||
if [[ -n "${add_actionproperties[@]}" ]] ; then
|
||||
_describe -t "f2b_actions_remprops" -V "additional action properties" add_actionproperties
|
||||
else
|
||||
_nothing
|
||||
fi
|
||||
}
|
||||
|
||||
_fail2ban_client_print_jails() {
|
||||
LANG=C fail2ban-client status 2> /dev/null | sed -n -e 's/.*Jail list:\s\+//' -e 'T' -e 's/,\s\+/\'$'\n/g' -e 'p'
|
||||
}
|
||||
|
||||
_fail2ban_client "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: set et sw=2 ts=2 ft=zsh:
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
#compdef fail2ban-regex
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for fail2ban-regex (https://www.fail2ban.org/).
|
||||
# Environment:
|
||||
# Linux 6.14.10-arch1-1 x86_64 GNU/Linux
|
||||
# zsh 5.9 (x86_64-pc-linux-gnu)
|
||||
# fail2ban 1.1.0-7
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Jesse Ayala <jesserayala95@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
integer NORMARG
|
||||
|
||||
_arguments -A "-*" -n \
|
||||
'--version[show program''s version number]' \
|
||||
'(-h --help)'{-h,--help}'[display the help message]' \
|
||||
'(-c --config)'{-c,--config=}'[set alternate config directory]:directory:_files -/' \
|
||||
'(-d --datepattern)'{-d,--datepattern=}'[set custom pattern used to match date/times]:DATEPATTERN' \
|
||||
'(--timezone= --TZ=)'{--timezone=,--TZ=}'[set time-zone used by convert time format]:TIMEZONE' \
|
||||
'(-e --encoding)'{-e,--encoding=}'[use different encoding from system locale]:ENCODING' \
|
||||
'(-r --raw)'{-r,--raw}'[raw hosts,don''t resolve dns]' \
|
||||
'--usedns=[DNS specified replacement of tags <HOST> in regexp]::((yes\:matches all form of hosts no\:IP addresses only))' \
|
||||
'(-L --maxlines)'{-L,--maxlines}'[maxlines for multi-line regex]:MAXLINES' \
|
||||
'(-m --journalmatch=)'{-m,--journalmatch=}'[journalctl style matches overriding filter file; "systemd-journal" only]:JOURNALMATCH' \
|
||||
'(-l --log-level)'{-l,--log-level}'[log level for the Fail2Ban logger to use]:LOG_LEVEL' \
|
||||
'-V[get version in machine-readable short format]' \
|
||||
'--verbosity=[set numerical level of verbosity]:(0 1 2 3 4)' \
|
||||
'(--verbose-date --VD)'{--verbose-date,--VD}'[verbose date patterns/regex in output]' \
|
||||
'(-D --debuggex)'{-D,--debuggex}'[produce debuggex.com urls for debugging there]' \
|
||||
'--no-check-all[disable check for all regexes]' \
|
||||
'(-o --out)'{-o,--out}'[set token to print failure information only (row, id, ip, msg, host, ip4, ip6, dns, matches, ...)]:out' \
|
||||
'--print-no-missed[do not print any missed lines]' \
|
||||
'--print-no-ignored[do not print any ignored lines]' \
|
||||
'--print-all-matched[print all matched lines]' \
|
||||
'--print-all-missed[print all missed lines, no matter how many]' \
|
||||
'--print-all-ignored[print all ignored lines, no matter how many]' \
|
||||
'(-t --log-traceback)'{-t,--log-traceback}'[enrich log-messages with compressed tracebacks]' \
|
||||
'--full-traceback[enrich log-messages with full, uncompressed tracebacks]:' \
|
||||
'1:file:_files -g \*.log' \
|
||||
'2:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' \
|
||||
'3:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: set et sw=2 ts=2 ft=zsh:
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
#compdef fallocate
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 fallocate, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
|
||||
# - preallocate or deallocate space to a file
|
||||
# https://man7.org/linux/man-pages/man1/fallocate.1.html
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
# * Aditi Sharma (https://github.com/Aditi76117)
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range -n --keep-size)'{-c,--collapse-range}'[Removes a byte range from a file without leaving a hole]' \
|
||||
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range -n --keep-size)'{-d,--dig-holes}'[Detect and dig holes]' \
|
||||
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range -n --keep-size)'{-p,--punch-hole}'[Deallocates space in the byte range starting at offset and continuing for length bytes]' \
|
||||
'(-c --collapse-range -d --dig-holes -p --punch-hole -z --zero-range )'{-z,--zero-range}'[Zeroes space in the byte range starting at offset and continuing for length bytes]' \
|
||||
'(-c --collapse-range -d --dig-holes -p --punch-hole -n --keep-size)'{-n,--keep-size}'[Do not modify the apparent length of the file]' \
|
||||
'(-i --insert-range)'{-i,--insert-range}'[Insert a hole of length bytes from offset]' \
|
||||
'(-l --length)'{-l+,--length}'[Specifies the length of the range, in bytes]:bytes' \
|
||||
'(-o --offset)'{-o+,--offset}'[Specifies the beginning offset of the range, in bytes]:offset' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Enable verbose mode]' \
|
||||
'(-x --posix)'{-x,--posix}'[Enable POSIX operation mode]' \
|
||||
'(- *)'{-h,--help}'[Display help text and exit]' \
|
||||
'(- *)'{-V,--version}'[Print version and exit]' \
|
||||
'*:filename:_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,62 @@
|
|||
#compdef ffind
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2017 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 ffind (https://github.com/jaimebuelta/ffind).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Sergei Eremenko (https://github.com/SmartFinn)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments -C \
|
||||
'(-h --help)'{-h,--help}'[show help message and exit]' \
|
||||
'--version[show version number and exit]' \
|
||||
'-p[match whole path, not only name of files]' \
|
||||
'--nocolor[do not display color]' \
|
||||
'--nosymlinks[do not follow symlinks]' \
|
||||
'--hidden[do not ignore hidden directories]' \
|
||||
'-c[force case sensitive]' \
|
||||
'-i[force case insensitive]' \
|
||||
'--delete[delete files found]' \
|
||||
'--exec[execute the given command with the file found]:command:_command_names' \
|
||||
'--module[execute the given module with the file found]:module_name args:' \
|
||||
'--command[execute the given python program with the file found]:program:_files' \
|
||||
'--ignore-vcs[ignore version control system files and directories]' \
|
||||
'-f[experimental fuzzy search]' \
|
||||
'--return-results[for testing purposes only]' \
|
||||
'1:directory to search:_path_files -/' \
|
||||
'*:filepattern:'
|
||||
|
||||
# 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 fish
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 fish 4.6.0 (https://fishshell.com/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_fish_debug_categories() {
|
||||
local -a categories=(${(f)"$(fish --print-debug-categories | awk '{n=$1;$1="";printf("%s[%s]\n",n,substr($0,2)) }')"})
|
||||
_values -s ',' categories $categories
|
||||
}
|
||||
|
||||
_arguments -s \
|
||||
'(-c --command)'{-c,--command=}'[Evaluate the specified commands instead of reading from the commandline]:command' \
|
||||
'(-C --init-command)'{-C,--init-command=}'[Evaluate specified commands after reading the configuration]:command' \
|
||||
'(-d --debug)'{-d,--debug=}'[Enable debug output and specify a pattern for matching categories]:categories:_fish_debug_categories' \
|
||||
'(-i --interactive)'{-i,--interactive}'[The shell is interactive]' \
|
||||
'(-l --login)'{-l,--login}'[Act as if invoked as a login shell]' \
|
||||
'(-N --no-config)'{-N,--no-config}'[Do not read configuration files]' \
|
||||
'(-n --no-execute)'{-n,--no-execute}'[Do not execute any commands, only perform syntax checking]' \
|
||||
'(-p --profile)'{-p,--profile=}'[Output timing information on all executed commands to the specified file]:file:_files' \
|
||||
'--profile-startup=[Write timing for fish startup to specified file]:file:_files' \
|
||||
'(-P --private)'{-P,--private}'[Enable private mode]' \
|
||||
'--print-rusage-self[When fish exits, output stats from getrusage]' \
|
||||
'(- *)--print-debug-categories[Print all debug categories, and then exit]' \
|
||||
'(- *)'{-v,--version}'[Print version and exit]' \
|
||||
'(-f --features)'{-f,--features}'[Enable one or more comma-separated feature flags]:features' \
|
||||
'*:: :_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
|
||||
123
src/_fleetctl
123
src/_fleetctl
|
|
@ -1,123 +0,0 @@
|
|||
#compdef fleetctl
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2009-2015 Robby Russell and contributors (see
|
||||
# https://github.com/robbyrussell/oh-my-zsh/contributors)
|
||||
#
|
||||
# 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 fleetctl (https://github.com/coreos/fleet).
|
||||
#
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Remi Paulmier (https://github.com/shtouff)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# fleetctl zsh completion
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'cat:Output the contents of a submitted unit'
|
||||
'destroy:Destroy one or more units in the cluster'
|
||||
'fd-forward:Proxy stdin and stdout to a unix domain socket'
|
||||
'help:Show a list of commands or help for one command'
|
||||
'journal:Print the journal of a unit in the cluster to stdout'
|
||||
'list-machines:Enumerate the current hosts in the cluster'
|
||||
'list-unit-files:List the units that exist in the cluster.'
|
||||
'list-units:List the current state of units in the cluster'
|
||||
'load:Schedule one or more units in the cluster, first submitting them if necessary.'
|
||||
'ssh:Open interactive shell on a machine in the cluster'
|
||||
'start:Instruct systemd to start one or more units in the cluster, first submitting and loading if necessary.'
|
||||
'status:Output the status of one or more units in the cluster'
|
||||
'stop:Instruct systemd to stop one or more units in the cluster.'
|
||||
'submit:Upload one or more units to the cluster without starting them'
|
||||
'unload:Unschedule one or more units in the cluster.'
|
||||
'version:Print the version and exit'
|
||||
)
|
||||
|
||||
__task_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a tasks
|
||||
|
||||
tasks=(cat destroy fd-forward help journal list-machines list-unit-files \
|
||||
list-units load ssh start status stop submit unload version)
|
||||
|
||||
_wanted tasks expl 'help' compadd $tasks
|
||||
}
|
||||
|
||||
__unit_list ()
|
||||
{
|
||||
_wanted application expl 'command' compadd $(command fleetctl list-units | \
|
||||
tail -n +2 | awk '{print $1}')
|
||||
}
|
||||
|
||||
local expl
|
||||
|
||||
local curcontext="$curcontext" state line
|
||||
local -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'
|
||||
;;
|
||||
|
||||
(destroy|journal|start|status|stop|unload|cat)
|
||||
_arguments '*:feature:__unit_list'
|
||||
;;
|
||||
|
||||
(load|submit)
|
||||
_arguments '*:file:_files -g *.service'
|
||||
;;
|
||||
|
||||
(ssh)
|
||||
_arguments '*:host:_hosts'
|
||||
;;
|
||||
|
||||
(*)
|
||||
_arguments '*:file:_files'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
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
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,179 @@
|
|||
#compdef fwupdmgr
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for fwupdmgr 1.8.12 (https://github.com/hughsie/fwupd).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
# * Shohei Yoshida (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_fwupdmgr() {
|
||||
local context state state_descr line
|
||||
typeset -A opt_args
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[display help information]' \
|
||||
'(- : *)--version[display version information]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[show extra debugging information]' \
|
||||
'--offline[schedule installation for next reboot when possible]' \
|
||||
'--allow-reinstall[allow re-installing existing firmware versions]' \
|
||||
'--allow-older[allow downgrading firmware versions]' \
|
||||
'--allow-branch-switch[allow switching firmware branch]' \
|
||||
'--force[override warnings and force the action]' \
|
||||
'(-y --assume-yes)'{-y,--assume-yes}'[answer yes to all questions]' \
|
||||
'--sign[sign the uploaded data with the client certificate]' \
|
||||
'--no-unreported-check[do not check for unreported history]' \
|
||||
'--no-metadata-check[do not check for old metadata]' \
|
||||
'--no-reboot-check[do not check for reboot after update]' \
|
||||
'--no-safety-check[do not perform device safety checks]' \
|
||||
'--no-device-prompt[do not prompt for devices]' \
|
||||
'--no-history[do not write to the history database]' \
|
||||
'--show-all[show all results]' \
|
||||
'--disable-ssl-strict[ignore SSL strict checks when downloading files]' \
|
||||
'--ipfs[only use IPFS when downloading files]' \
|
||||
'--filter[filter with a set of device flags using a ~ prefix to exclude]:filter' \
|
||||
'--json[output in JSON format]' \
|
||||
'--no-authenticate[do not prompt for authentication]' \
|
||||
'(-): :->command' \
|
||||
'(-)*:: :->arguments' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_fwupdmgr_commands
|
||||
;;
|
||||
(arguments)
|
||||
case $words[1] in
|
||||
(activate|downgrade|emulation-tag|emulation-untag|get-releases|get-updates|reinstall|update|verify|verify-update)
|
||||
_arguments \
|
||||
'1::device_id or GUID:_fwupdmgr_device_ids' \
|
||||
&& ret=0
|
||||
;;
|
||||
(clear-results|get-results|unlock)
|
||||
_arguments \
|
||||
'1:device_id or GUID:_fwupdmgr_device_ids' \
|
||||
&& ret=0
|
||||
;;
|
||||
(device-emulate|device-test|emulation-load|emulation-save|get-details|set-approved-firmware)
|
||||
_arguments \
|
||||
'*::files:_files' \
|
||||
&& ret=0
|
||||
;;
|
||||
(disable-remote|modify-remote)
|
||||
_arguments \
|
||||
'1:remote ID:_fwupdmgr_remote_ids' \
|
||||
&& ret=0
|
||||
;;
|
||||
(install)
|
||||
_arguments \
|
||||
'1:device_id or GUID:_fwupdmgr_device_ids' \
|
||||
'2:version' \
|
||||
&& ret=0
|
||||
;;
|
||||
(local-install)
|
||||
_arguments \
|
||||
'1:file:_files' \
|
||||
'2:device_id or GUID:_fwupdmgr_device_ids' \
|
||||
&& ret=0
|
||||
;;
|
||||
(refresh)
|
||||
_arguments \
|
||||
'1:file or remote ID:_alternative "file\:file\:_files" "remotes\:remote ID\:_fwupdmgr_remote_ids"' \
|
||||
&& ret=0
|
||||
;;
|
||||
(switch-branch)
|
||||
_arguments \
|
||||
'1:device_id or GUID:_fwupdmgr_device_ids' \
|
||||
'2:branch' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_fwupdmgr_commands] )) ||
|
||||
_fwupdmgr_commands() {
|
||||
local -a commands=(
|
||||
'activate:activate devices'
|
||||
'block-firmware:blocks a specific firmware from being installed'
|
||||
'clear-results:clears the results from the last update'
|
||||
'device-emulate:emulate a device using a JSON manifest'
|
||||
'device-test:test a device using a JSON manifest'
|
||||
'disable-remote:disables a given remote'
|
||||
'downgrade:downgrades the firmware on a device'
|
||||
'emulation-load:load device emulation data'
|
||||
'emulation-save:save device emulation data'
|
||||
'emulation-tag:adds devices to watch for future emulation'
|
||||
'emulation-untag:removes devices to watch for future emulation'
|
||||
'enable-remote:enables a given remote'
|
||||
'get-approved-firmware:gets the list of approved firmware'
|
||||
'get-bios-settings:retrieve BIOS settings'
|
||||
'get-blocked-firmware:gets the list of blocked firmware'
|
||||
'get-details:gets details about a firmware file'
|
||||
'get-devices:get all devices that support firmware updates'
|
||||
'get-history:show history of firmware updates'
|
||||
'get-plugins:get all enabled plugins registered with the system'
|
||||
'get-releases:gets the releases for a device'
|
||||
'get-remotes:gets the configured remotes'
|
||||
'get-results:gets the results from the last update'
|
||||
'get-topology:get all devices according to the system topology'
|
||||
'get-updates:gets the list of updates for connected hardware'
|
||||
'inhibit:inhibit the system to prevent upgrades'
|
||||
'install:install a firmware file on this hardware'
|
||||
'local-install:install a firmware file on this hardware'
|
||||
'modify-config:modifies a daemon configuration value'
|
||||
'modify-remote:modifies a given remote'
|
||||
'quit:asks the daemon to quit'
|
||||
'refresh:refresh metadata from remote server'
|
||||
'security:gets the host security attributes'
|
||||
'report-history:share firmware history with the developers'
|
||||
'set-approved-firmware:sets the list of approved firmware'
|
||||
'set-bios-setting:sets one or more BIOS settings'
|
||||
'switch-branch:switch the firmware branch on device'
|
||||
'sync-bkc:sync firmware versions to the host best known configuration '
|
||||
'unblock-firmware:unblocks a specific firmware from being installed'
|
||||
'uninhibit:uninhibit the system to allow upgrades'
|
||||
'unlock:unlocks the device for firmware access'
|
||||
'update:updates all firmware to latest versions available'
|
||||
'verify:gets the cryptographic hash of the dumped firmware'
|
||||
'verify-update:update the stored metadata with current ROM contents'
|
||||
)
|
||||
_describe -t commands commands commands
|
||||
}
|
||||
|
||||
(( $+functions[_fwupdmgr_device_ids] )) ||
|
||||
_fwupdmgr_device_ids() {
|
||||
# TODO add device name as description
|
||||
local -a devices
|
||||
devices=($(_call_program devices fwupdmgr get-devices | awk '/Device ID/||/DeviceId/{print $NF}'))
|
||||
_describe -t devices 'device ID' devices
|
||||
}
|
||||
|
||||
(( $+functions[_fwupdmgr_remote_ids] )) ||
|
||||
_fwupdmgr_remote_ids() {
|
||||
# TODO add remote description
|
||||
local -a remotes
|
||||
remotes=($(_call_program remotes fwupdmgr get-remotes | awk '/Remote ID/{print $NF}'))
|
||||
_describe -t remotes 'remote ID' remotes
|
||||
}
|
||||
|
||||
_fwupdmgr "$@"
|
||||
|
||||
# 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
|
||||
11
src/_gas
11
src/_gas
|
|
@ -1,6 +1,6 @@
|
|||
#compdef gas
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -38,7 +38,7 @@ local curcontext="$curcontext" state line cmds ret=1
|
|||
|
||||
_arguments -C \
|
||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||
'(-h|--help)'{-h,--help}'[show help information]' \
|
||||
'(-h --help)'{-h,--help}'[show help information]' \
|
||||
'1: :->cmds' \
|
||||
'*: :->args' && ret=0
|
||||
|
||||
|
|
@ -67,3 +67,10 @@ 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
|
||||
|
|
|
|||
73
src/_geany
73
src/_geany
|
|
@ -1,73 +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>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_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'
|
||||
|
||||
# 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,307 @@
|
|||
#compdef gio
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 gio 2.86.3 (https://docs.gtk.org/gio/).
|
||||
#
|
||||
# Status: Basic (subcommands and common options).
|
||||
# Origin: Original script.
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Magniquick (https://github.com/Magniquick)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_gio() {
|
||||
local context state line
|
||||
typeset -A opt_args
|
||||
local ret=1
|
||||
|
||||
_arguments -C \
|
||||
'(- : *)'{-h,--help}'[show help information]' \
|
||||
'(- : *)--version[display version information]' \
|
||||
'1:command:->command' \
|
||||
'*::arg:->args' \
|
||||
&& ret=0
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_gio_commands
|
||||
;;
|
||||
(args)
|
||||
local subcmd=$words[1]
|
||||
if [[ $subcmd == gio ]]; then
|
||||
subcmd=$words[2]
|
||||
fi
|
||||
|
||||
case $subcmd in
|
||||
(help)
|
||||
_arguments \
|
||||
'1:command:_gio_commands' \
|
||||
&& ret=0
|
||||
;;
|
||||
(version)
|
||||
_arguments && ret=0
|
||||
;;
|
||||
(cat)
|
||||
_arguments \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(copy)
|
||||
_arguments \
|
||||
'(-T --no-target-directory)'{-T,--no-target-directory}'[no target directory]' \
|
||||
'(-p --progress)'{-p,--progress}'[show progress]' \
|
||||
'(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \
|
||||
'--preserve[preserve all attributes]' \
|
||||
'(-b --backup)'{-b,--backup}'[backup existing destination files]' \
|
||||
'(-P --no-dereference)'{-P,--no-dereference}'[never follow symbolic links]' \
|
||||
'--default-permissions[use default permissions for the destination]' \
|
||||
'--default-modified-time[use default file modification timestamps for the destination]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(info)
|
||||
_arguments \
|
||||
'(-w --query-writable)'{-w,--query-writable}'[list writable attributes]' \
|
||||
'(-f --filesystem)'{-f,--filesystem}'[get file system info]' \
|
||||
'(-a --attributes)'{-a,--attributes}'[attributes to get]:attributes' \
|
||||
'(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(launch)
|
||||
_arguments \
|
||||
'1:desktop file:_gio_desktop_files' \
|
||||
'*::file argument:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(list)
|
||||
_arguments \
|
||||
'(-a --attributes)'{-a,--attributes}'[attributes to get]:attributes' \
|
||||
'(-h --hidden)'{-h,--hidden}'[show hidden files]' \
|
||||
'(-l --long)'{-l,--long}'[use a long listing format]' \
|
||||
'(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \
|
||||
'(-d --print-display-names)'{-d,--print-display-names}'[print display names]' \
|
||||
'(-u --print-uris)'{-u,--print-uris}'[print full URIs]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(mime)
|
||||
_arguments \
|
||||
'1:mimetype:_gio_mime_types' \
|
||||
'2:handler' \
|
||||
&& ret=0
|
||||
;;
|
||||
(mkdir)
|
||||
_arguments \
|
||||
'(-p --parent)'{-p,--parent}'[create parent directories]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(monitor)
|
||||
_arguments \
|
||||
'(-d --dir)'{-d,--dir}'[monitor a directory]:location:_gio_location' \
|
||||
'(-f --file)'{-f,--file}'[monitor a file]:location:_gio_location' \
|
||||
'(-D --direct)'{-D,--direct}'[monitor a file directly]:location:_gio_location' \
|
||||
'(-s --silent)'{-s,--silent}'[monitor a file directly without reporting changes]:location:_gio_location' \
|
||||
'(-n --no-moves)'{-n,--no-moves}'[report moves and renames as simple deleted/created events]' \
|
||||
'(-m --mounts)'{-m,--mounts}'[watch for mount events]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(mount)
|
||||
_arguments \
|
||||
'(-m --mountable)'{-m,--mountable}'[mount as mountable]' \
|
||||
'(-d --device)'{-d,--device}'[mount volume with device file or identifier]:device' \
|
||||
'(-u --unmount)'{-u,--unmount}'[unmount]' \
|
||||
'(-e --eject)'{-e,--eject}'[eject]' \
|
||||
'(-t --stop)'{-t,--stop}'[stop drive with device file]:device' \
|
||||
'(-s --unmount-scheme)'{-s,--unmount-scheme}'[unmount all mounts with scheme]:scheme' \
|
||||
'(-f --force)'{-f,--force}'[ignore outstanding file operations when unmounting or ejecting]' \
|
||||
'(-a --anonymous)'{-a,--anonymous}'[use an anonymous user when authenticating]' \
|
||||
'(-l --list)'{-l,--list}'[list volumes, drives and mounts]' \
|
||||
'(-o --monitor)'{-o,--monitor}'[monitor volume, drive and mount events]' \
|
||||
'(-i --detail)'{-i,--detail}'[show extra information]' \
|
||||
'--tcrypt-pim[unlock VeraCrypt volume with PIM]:pim' \
|
||||
'--tcrypt-hidden[mount a TCRYPT hidden volume]' \
|
||||
'--tcrypt-system[mount a TCRYPT system volume]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(move)
|
||||
_arguments \
|
||||
'(-T --no-target-directory)'{-T,--no-target-directory}'[no target directory]' \
|
||||
'(-p --progress)'{-p,--progress}'[show progress]' \
|
||||
'(-i --interactive)'{-i,--interactive}'[prompt before overwrite]' \
|
||||
'(-b --backup)'{-b,--backup}'[backup existing destination files]' \
|
||||
'(-C --no-copy-fallback)'{-C,--no-copy-fallback}'[do not use copy and delete fallback]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(open)
|
||||
_arguments \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(rename)
|
||||
_arguments \
|
||||
'1:location:_gio_location' \
|
||||
'2:new name' \
|
||||
&& ret=0
|
||||
;;
|
||||
(remove)
|
||||
_arguments \
|
||||
'(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(save)
|
||||
_arguments \
|
||||
'(-b --backup)'{-b,--backup}'[backup existing destination files]' \
|
||||
'(-c --create)'{-c,--create}'[only create if not existing]' \
|
||||
'(-a --append)'{-a,--append}'[append to end of file]' \
|
||||
'(-p --private)'{-p,--private}'[restrict access to current user]' \
|
||||
'(-u --unlink)'{-u,--unlink}'[replace as if the destination did not exist]' \
|
||||
'(-v --print-etag)'{-v,--print-etag}'[print new etag at end]' \
|
||||
'(-e --etag)'{-e,--etag}'[etag of the file being overwritten]:etag' \
|
||||
'1:destination:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(set)
|
||||
_arguments \
|
||||
'(-t --type)'{-t,--type}'[type of the attribute]:type' \
|
||||
'(-n --nofollow-symlinks)'{-n,--nofollow-symlinks}'[do not follow symbolic links]' \
|
||||
'(-d --delete)'{-d,--delete}'[unset given attribute]' \
|
||||
'1:location:_gio_location' \
|
||||
'2:attribute' \
|
||||
'*::value' \
|
||||
&& ret=0
|
||||
;;
|
||||
(trash)
|
||||
_arguments \
|
||||
'(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' \
|
||||
'--empty[empty the trash]' \
|
||||
'--list[list files in the trash with their original locations]' \
|
||||
'--restore[restore a file from trash to its original location]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
(tree)
|
||||
_arguments \
|
||||
'(-h --hidden)'{-h,--hidden}'[show hidden files]' \
|
||||
'(-l --follow-symlinks)'{-l,--follow-symlinks}'[follow symbolic links, mounts and shortcuts]' \
|
||||
'*:location:_gio_location' \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
(( $+functions[_gio_commands] )) ||
|
||||
_gio_commands() {
|
||||
local -a commands=(
|
||||
'help:print help'
|
||||
'version:print version'
|
||||
'cat:concatenate files to standard output'
|
||||
'copy:copy one or more files'
|
||||
'info:show information about locations'
|
||||
'launch:launch an application from a desktop file'
|
||||
'list:list the contents of locations'
|
||||
'mime:get or set the handler for a mimetype'
|
||||
'mkdir:create directories'
|
||||
'monitor:monitor files and directories for changes'
|
||||
'mount:mount or unmount the locations'
|
||||
'move:move one or more files'
|
||||
'open:open files with the default application'
|
||||
'rename:rename a file'
|
||||
'remove:delete one or more files'
|
||||
'save:read from standard input and save'
|
||||
'set:set a file attribute'
|
||||
'trash:move or restore files to the trash'
|
||||
'tree:list the contents of locations in a tree'
|
||||
)
|
||||
|
||||
_describe -t commands 'gio commands' commands
|
||||
}
|
||||
|
||||
(( $+functions[_gio_location] )) ||
|
||||
_gio_location() {
|
||||
if (( $+functions[_urls] )); then
|
||||
_alternative \
|
||||
'files:files:_files' \
|
||||
'urls:URL:_urls'
|
||||
else
|
||||
_files
|
||||
fi
|
||||
}
|
||||
|
||||
(( $+functions[_gio_desktop_files] )) ||
|
||||
_gio_desktop_files() {
|
||||
local -a search_path data_dirs desktop_files
|
||||
data_dirs=(${(@s/:/)XDG_DATA_DIRS:-/usr/local/share:/usr/share})
|
||||
search_path=(
|
||||
"${XDG_DATA_HOME:-$HOME/.local/share}/applications"
|
||||
${data_dirs[@]/%/\/applications}
|
||||
)
|
||||
|
||||
desktop_files=()
|
||||
local dir
|
||||
for dir in $search_path; do
|
||||
[[ -d $dir ]] || continue
|
||||
desktop_files+=($dir/*.desktop(N))
|
||||
done
|
||||
|
||||
compadd -a -- desktop_files
|
||||
}
|
||||
|
||||
(( $+functions[_gio_mime_types] )) ||
|
||||
_gio_mime_types() {
|
||||
if (( $+functions[_mime_types] )); then
|
||||
_mime_types
|
||||
else
|
||||
_message 'mime type'
|
||||
fi
|
||||
}
|
||||
|
||||
_gio "$@"
|
||||
|
||||
# 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
|
||||
109
src/_gist
109
src/_gist
|
|
@ -1,6 +1,6 @@
|
|||
#compdef gist
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -35,32 +35,87 @@
|
|||
# -------
|
||||
#
|
||||
# * Akira Maeda <https://github.com/glidenote>
|
||||
# * Patrick Ziegler <https://github.com/patrick96>
|
||||
# * Shivam Mehta <https://github.com/maniac-en>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
|
||||
_gist() {
|
||||
local ret=1
|
||||
|
||||
_arguments \
|
||||
'(--login)--login[Authenticate gist on this computer.]' \
|
||||
'(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \
|
||||
'(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \
|
||||
'(-p --private --no-private)'{-p,--private}'[Makes your gist private.]' \
|
||||
'(--no-private -p --private)--no-private[Makes your gist no private.]' \
|
||||
'(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \
|
||||
'(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \
|
||||
'(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID:_gist_ids' \
|
||||
'(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \
|
||||
'(-e --embed)'{-e,--embed}'[Copy the embed code for the gist to the clipboard]' \
|
||||
'(-o --open --no-open)'{-o,--open}'[Open the resulting URL in a browser]' \
|
||||
'(--no-open -o --open)--no-open[No open the resulting URL in a browser]' \
|
||||
'--skip-empty[Skip gisting empty files]' \
|
||||
'(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \
|
||||
'(-R --raw)'{-R,--raw}'[Display raw URL of the new gist]' \
|
||||
'(-l --list)'{-l,--list}'[List all gists for user ]::user' \
|
||||
'--delete[Delete a gist]:id:_gist_ids' \
|
||||
'(- *)'{-h,--help}'[print options help]' \
|
||||
'(-v --version)'{-v,--version}'[print version]' \
|
||||
'(-r --read)'{-r,--read}'[Read a gist and print out the contents]:user gists:_gist_ids' \
|
||||
'*: :_files' && ret=0
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_gist_cache_policy() {
|
||||
# rebuild if cache is more than a day old
|
||||
local -a oldp
|
||||
oldp=( "$1"(m+1) )
|
||||
(( $#oldp ))
|
||||
}
|
||||
|
||||
_gist_ids() {
|
||||
local update_policy ret=1
|
||||
zstyle -s ":completion:${curcontext}:" cache-policy update_policy
|
||||
if [[ -z "$update_policy" ]]; then
|
||||
zstyle ":completion:${curcontext}:" cache-policy _gist_cache_policy
|
||||
fi
|
||||
|
||||
# stores the gists of the logged in user in the format ID[Description]
|
||||
local -a gist_list
|
||||
|
||||
# retrieve/Write gists from/to cache
|
||||
if _cache_invalid gist_cached_list || ! _retrieve_cache gist_cached_list; then
|
||||
if (( $+commands[ruby] )); then
|
||||
gist_list=(${(f)"$(gist -l | ruby -ne 'puts "#{$1}:#{$2}" if $_ =~ %r{/([^/ ]+)\s+(.+)}')"})
|
||||
elif (( $+commands[perl])); then
|
||||
gist_list=(${(f)"$(gist -l | perl -wln -e 'm{/([^/ ]+)\s+(.+)} and print qq($1:$2)')"})
|
||||
fi
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
_store_cache gist_cached_list gist_list
|
||||
else
|
||||
# some error occurred, the user is probably not logged in
|
||||
# set _gists to an empty string so that no completion is attempted
|
||||
gist_list=()
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $#gist_list ]]; then
|
||||
_describe -t gist_ids 'gist_ids' gist_list
|
||||
fi
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_gist "$@"
|
||||
|
||||
# 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
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
local curcontext="$curcontext" state line ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
'(--login)--login[Authenticate gist on this computer.]' \
|
||||
'(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \
|
||||
'(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \
|
||||
'(-p --private)'{-p,--private}'[Makes your gist private.]' \
|
||||
'(--no-private)'--no-private'[Makes your gist no private.]' \
|
||||
'(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \
|
||||
'(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \
|
||||
'(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID' \
|
||||
'(-a --anonymous)'{-a,--anonymous}'[Create an anonymous gist.]' \
|
||||
'(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \
|
||||
'(-e --embed)'{-e,--embed}'[Copy the embed code for the gist to the clipboard]' \
|
||||
'(-o --open)'{-o,--open}'[Open the resulting URL in a browser]' \
|
||||
'(--no-open)'--no-open'[No open the resulting URL in a browser]' \
|
||||
'(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \
|
||||
'(-h --help)'{-h,--help}'[print options help]' \
|
||||
'(-v --version)'{-v,--version}'[print version]' \
|
||||
'*: :_files' && ret=0
|
||||
|
||||
return ret
|
||||
|
|
|
|||
624
src/_git-flow
624
src/_git-flow
|
|
@ -1,4 +1,5 @@
|
|||
#compdef git-flow
|
||||
#description Git Flow branching model
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2010-2015 Justin Hileman
|
||||
#
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for git-flow (http://github.com/nvie/gitflow).
|
||||
# Completion script for git-flow (https://github.com/nvie/gitflow).
|
||||
#
|
||||
# Source: https://github.com/bobthecow/git-flow-completion
|
||||
#
|
||||
|
|
@ -39,398 +40,357 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_git-flow () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_git-flow ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
_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
|
||||
;;
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
(options)
|
||||
case $line[1] in
|
||||
(init)
|
||||
_arguments \
|
||||
-f'[Force setting of gitflow branches, even if already configured]' \
|
||||
-d'[Use default branch naming conventions and prefixes]'
|
||||
;;
|
||||
(version)
|
||||
;;
|
||||
(hotfix)
|
||||
__git-flow-hotfix
|
||||
;;
|
||||
(release)
|
||||
__git-flow-release
|
||||
;;
|
||||
(feature)
|
||||
__git-flow-feature
|
||||
;;
|
||||
(support)
|
||||
__git-flow-support
|
||||
;;
|
||||
|
||||
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.'
|
||||
'status:Shows some status.'
|
||||
)
|
||||
_describe -t commands 'git flow' subcommands
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(init)
|
||||
_arguments \
|
||||
-f'[Force setting of gitflow branches, even if already configured]' \
|
||||
-d'[Use default branch naming conventions and prefixes]'
|
||||
;;
|
||||
|
||||
(version)
|
||||
;;
|
||||
|
||||
(hotfix)
|
||||
__git-flow-hotfix
|
||||
;;
|
||||
|
||||
(release)
|
||||
__git-flow-release
|
||||
;;
|
||||
|
||||
(feature)
|
||||
__git-flow-feature
|
||||
;;
|
||||
|
||||
(support)
|
||||
__git-flow-support
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git-flow-release ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
__git-flow-release () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
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`)'
|
||||
'publish:Publish this release branch to origin.`)'
|
||||
'track:Track a release branch from origin.`)'
|
||||
)
|
||||
_describe -t commands 'git flow release' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
|
||||
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`)'
|
||||
'publish:Publish this release branch to origin.`)'
|
||||
'track:Track a release branch from origin.`)'
|
||||
)
|
||||
_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]'\
|
||||
-n'[Dont tag this release ]'\
|
||||
-p'[Push to $ORIGIN after performing finish]'\
|
||||
-k'[Keep branch after performing finish]'\
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
(publish)
|
||||
_arguments \
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
(track)
|
||||
_arguments \
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
|
||||
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
(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]'\
|
||||
-n'[Don'\''t tag this release]'\
|
||||
-p'[Push to $ORIGIN after performing finish]'\
|
||||
-k'[Keep branch after performing finish]'\
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
(publish)
|
||||
_arguments \
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
(track)
|
||||
_arguments \
|
||||
':version:__git_flow_version_list'
|
||||
;;
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git-flow-hotfix ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
__git-flow-hotfix () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
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`)'
|
||||
'publish:Publish this hotfix branch to origin`)'
|
||||
)
|
||||
_describe -t commands 'git flow hotfix' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
|
||||
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`)'
|
||||
'publish:Publish this hotfix branch to origin`)'
|
||||
)
|
||||
_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_flow_branch_names'
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(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'
|
||||
;;
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':hotfix:__git_flow_version_list'\
|
||||
':branch-name:__git_branch_names'
|
||||
;;
|
||||
(publish)
|
||||
_arguments \
|
||||
':hotfix:__git_flow_hotfix_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]'\
|
||||
':hotfix:__git_flow_hotfix_list'
|
||||
;;
|
||||
|
||||
(publish)
|
||||
_arguments \
|
||||
':hotfix:__git_flow_hotfix_list'
|
||||
;;
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git-flow-feature ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
__git-flow-feature () {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
_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:Publish this feature branch to origin.'
|
||||
'track:Track a feature branch from origin.'
|
||||
'diff:Show a diff of changes since this feature branched off.'
|
||||
'rebase:Rebase a feature branch on top of develop.'
|
||||
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:Publish this feature branch to origin.'
|
||||
'track:Track a feature branch from origin.'
|
||||
'diff:Show a diff of changes since this feature branched off.'
|
||||
'rebase:Rebase a feature branch on top of develop.'
|
||||
'checkout:Check out (switch to) the given feature branch.'
|
||||
'pull:Pull a feature branch from a remote peer.'
|
||||
)
|
||||
_describe -t commands 'git flow feature' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
'pull:Pull a feature branch from a remote peer.'
|
||||
)
|
||||
_describe -t commands 'git flow feature' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(options)
|
||||
case $line[1] in
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':feature:__git_flow_feature_list'\
|
||||
':branch-name:__git_flow_branch_names'
|
||||
;;
|
||||
|
||||
(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'[Finish branch by rebasing first]'\
|
||||
-k'[Keep branch after performing finish]'\
|
||||
-D'[Force delete feature branch after finish]'\
|
||||
':feature:__git_flow_feature_list'
|
||||
;;
|
||||
|
||||
(finish)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]' \
|
||||
-r'[Finish branch by rebasing first]'\
|
||||
-k'[Keep branch after performing finish]'\
|
||||
-D'[Force delete feature branch after finish]'\
|
||||
':feature:__git_flow_feature_list'
|
||||
;;
|
||||
(publish)
|
||||
_arguments \
|
||||
':feature:__git_flow_feature_list'\
|
||||
;;
|
||||
|
||||
(publish)
|
||||
_arguments \
|
||||
':feature:__git_flow_feature_list'\
|
||||
;;
|
||||
(track)
|
||||
_arguments \
|
||||
':feature:__git_flow_feature_list'\
|
||||
;;
|
||||
|
||||
(track)
|
||||
_arguments \
|
||||
':feature:__git_flow_feature_list'\
|
||||
;;
|
||||
(diff)
|
||||
_arguments \
|
||||
':branch:__git_flow_branch_names'\
|
||||
;;
|
||||
|
||||
(diff)
|
||||
_arguments \
|
||||
':branch:__git_branch_names'\
|
||||
;;
|
||||
(rebase)
|
||||
_arguments \
|
||||
-i'[Do an interactive rebase]' \
|
||||
':branch:__git_flow_branch_names'
|
||||
;;
|
||||
|
||||
(rebase)
|
||||
_arguments \
|
||||
-i'[Do an interactive rebase]' \
|
||||
':branch:__git_branch_names'
|
||||
;;
|
||||
(checkout)
|
||||
_arguments \
|
||||
':branch:__git_flow_feature_list'\
|
||||
;;
|
||||
|
||||
(checkout)
|
||||
_arguments \
|
||||
':branch:__git_flow_feature_list'\
|
||||
;;
|
||||
(pull)
|
||||
_arguments \
|
||||
':remote:__git_flow_remote'\
|
||||
':branch:__git_flow_branch_names'
|
||||
;;
|
||||
|
||||
(pull)
|
||||
_arguments \
|
||||
':remote:__git_remotes'\
|
||||
':branch:__git_branch_names'
|
||||
;;
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git-flow-support ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
__git-flow-support() {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new support branch.'
|
||||
'list:List all your support branches. (Alias to `git flow support`)'
|
||||
)
|
||||
_describe -t commands 'git flow support' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'start:Start a new support branch.'
|
||||
'list:List all your support branches. (Alias to `git flow support`)'
|
||||
)
|
||||
_describe -t commands 'git flow support' subcommands
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(options)
|
||||
case $line[1] in
|
||||
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':feature:__git_flow_support_list'\
|
||||
':branch-name:__git_branch_names'
|
||||
;;
|
||||
(start)
|
||||
_arguments \
|
||||
-F'[Fetch from origin before performing finish]'\
|
||||
':feature:__git_flow_support_list'\
|
||||
':branch-name:__git_flow_branch_names'
|
||||
;;
|
||||
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
*)
|
||||
_arguments \
|
||||
-v'[Verbose (more) output]'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__git_flow_version_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a versions
|
||||
__git_flow_version_list() {
|
||||
local expl
|
||||
local -a versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_flow_command_successful || return
|
||||
|
||||
versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted versions expl 'version' compadd $versions
|
||||
_wanted versions expl 'version' compadd $versions
|
||||
}
|
||||
|
||||
__git_flow_feature_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a features
|
||||
__git_flow_feature_list() {
|
||||
local expl
|
||||
local -a features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_flow_command_successful || return
|
||||
|
||||
features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted features expl 'feature' compadd $features
|
||||
_wanted features expl 'feature' compadd $features
|
||||
}
|
||||
|
||||
__git_remotes () {
|
||||
local expl gitdir remotes
|
||||
__git_flow_remote() {
|
||||
local expl gitdir remotes
|
||||
|
||||
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
|
||||
__git_command_successful || return
|
||||
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
|
||||
__git_flow_command_successful || return
|
||||
|
||||
remotes=(${${(f)"$(_call_program remotes git config --get-regexp '"^remote\..*\.url$"')"}//#(#b)remote.(*).url */$match[1]})
|
||||
__git_command_successful || return
|
||||
remotes=(${${(f)"$(_call_program remotes git config --get-regexp '"^remote\..*\.url$"')"}//#(#b)remote.(*).url */$match[1]})
|
||||
__git_flow_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
|
||||
# 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
|
||||
__git_flow_hotfix_list() {
|
||||
local expl
|
||||
local -a hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_flow_command_successful || return
|
||||
|
||||
hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted hotfixes expl 'hotfix' compadd $hotfixes
|
||||
_wanted hotfixes expl 'hotfix' compadd $hotfixes
|
||||
}
|
||||
|
||||
__git_flow_support_list ()
|
||||
{
|
||||
local expl
|
||||
declare -a support
|
||||
__git_flow_support_list() {
|
||||
local expl
|
||||
local -a support=(${${(f)"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_flow_command_successful || return
|
||||
|
||||
support=(${${(f)"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')"}})
|
||||
__git_command_successful || return
|
||||
|
||||
_wanted hotfixes expl 'support' compadd $support
|
||||
_wanted hotfixes expl 'support' compadd $support
|
||||
}
|
||||
|
||||
__git_flow_branch_names() {
|
||||
local expl
|
||||
local -a branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
|
||||
__git_flow_command_successful || return
|
||||
|
||||
__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
|
||||
_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_command_successful() {
|
||||
if (( ${#pipestatus:#0} > 0 )); then
|
||||
_message 'not a git repository'
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
_git-flow "$@"
|
||||
|
|
|
|||
225
src/_git-journal
225
src/_git-journal
|
|
@ -1,225 +0,0 @@
|
|||
#compdef git-journal
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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 git-journal:
|
||||
# https://github.com/saschagrunert/git-journal
|
||||
#
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Sascha Grunert <mail@saschagruenrt.de>
|
||||
# * Nico Wagner <nico@cryptopone.org>
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_git-journal() {
|
||||
typeset -A opt_args
|
||||
local ret=1
|
||||
|
||||
local context curcontext="$curcontext" state line
|
||||
_arguments -s -S -C \
|
||||
"-p+[Sets a custom working path.]" \
|
||||
"--path+[Sets a custom working path.]" \
|
||||
"-n+[The number of tags until the parser stops when a single revision is given.]" \
|
||||
"--tags-count+[The number of tags until the parser stops when a single revision is given.]" \
|
||||
"-e+[A pattern to exclude git tags from the processing.]" \
|
||||
"-t+[Use a custom output template.]" \
|
||||
"--template+[Use a custom output template.]" \
|
||||
"-o+[The output file for the changelog.]" \
|
||||
"--output+[The output file for the changelog.]" \
|
||||
"-a[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]" \
|
||||
"--all[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]" \
|
||||
"-g[Generate a fresh output template from a commit range.]" \
|
||||
"--generate[Generate a fresh output template from a commit range.]" \
|
||||
"-s[Print only the shortlog (summary) form.]" \
|
||||
"--short[Print only the shortlog (summary) form.]" \
|
||||
"-u[Skip entries without any relation to a git TAG.]" \
|
||||
"--skip-unreleased[Skip entries without any relation to a git TAG.]" \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
"1:: :_git-journal_commands" \
|
||||
"*:: :->git-journal" \
|
||||
&& ret=0
|
||||
case $state in
|
||||
(git-journal)
|
||||
curcontext="${curcontext%:*:*}:git-journal-command-$words[1]:"
|
||||
case $line[1] in
|
||||
(p)
|
||||
_arguments -s -S -C \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
"1:: :_git-journal_prepare_commands" \
|
||||
&& ret=0
|
||||
;;
|
||||
(prepare)
|
||||
_arguments -s -S -C \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
"1:: :_git-journal_prepare_commands" \
|
||||
&& ret=0
|
||||
;;
|
||||
(s)
|
||||
_arguments -s -S -C \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
&& ret=0
|
||||
;;
|
||||
(setup)
|
||||
_arguments -s -S -C \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
&& ret=0
|
||||
;;
|
||||
(v)
|
||||
_arguments -s -S -C \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
"1:: :_git-journal_verify_commands" \
|
||||
&& ret=0
|
||||
;;
|
||||
(verify)
|
||||
_arguments -s -S -C \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
"1:: :_git-journal_verify_commands" \
|
||||
&& ret=0
|
||||
;;
|
||||
(help)
|
||||
_arguments -s -S -C \
|
||||
"-h[Prints help information]" \
|
||||
"--help[Prints help information]" \
|
||||
"-V[Prints version information]" \
|
||||
"--version[Prints version information]" \
|
||||
&& ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
(( $+functions[_git-journal_commands] )) ||
|
||||
_git-journal_commands() {
|
||||
local commands; commands=(
|
||||
"prepare:Prepare a commit message before the user can edit it." \
|
||||
"p:Prepare a commit message before the user can edit it." \
|
||||
"setup:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory." \
|
||||
"s:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory." \
|
||||
"verify:Verify the specified commit message." \
|
||||
"v:Verify the specified commit message." \
|
||||
"help:Prints this message or the help of the given subcommand(s)" \
|
||||
"REVISION_RANGE:Specifies the revision range to be processed. If a single revision is specified, the output will stop at the first following git TAG." \
|
||||
)
|
||||
_describe -t commands 'git-journal commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_git-journal_help_commands] )) ||
|
||||
_git-journal_help_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'git-journal help commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_git-journal_p_commands] )) ||
|
||||
_git-journal_p_commands() {
|
||||
local commands; commands=(
|
||||
"MESSAGE:The path to the commit message which should be prepared." \
|
||||
"TYPE:The type of the commit. For example "message"." \
|
||||
)
|
||||
_describe -t commands 'git-journal p commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_p_commands] )) ||
|
||||
_p_commands() {
|
||||
local commands; commands=(
|
||||
"MESSAGE:The path to the commit message which should be prepared." \
|
||||
"TYPE:The type of the commit. For example "message"." \
|
||||
)
|
||||
_describe -t commands 'p commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_git-journal_prepare_commands] )) ||
|
||||
_git-journal_prepare_commands() {
|
||||
local commands; commands=(
|
||||
"MESSAGE:The path to the commit message which should be prepared." \
|
||||
"TYPE:The type of the commit. For example "message"." \
|
||||
)
|
||||
_describe -t commands 'git-journal prepare commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_git-journal_s_commands] )) ||
|
||||
_git-journal_s_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'git-journal s commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_s_commands] )) ||
|
||||
_s_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 's commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_git-journal_setup_commands] )) ||
|
||||
_git-journal_setup_commands() {
|
||||
local commands; commands=(
|
||||
|
||||
)
|
||||
_describe -t commands 'git-journal setup commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_git-journal_v_commands] )) ||
|
||||
_git-journal_v_commands() {
|
||||
local commands; commands=(
|
||||
"MESSAGE:The path to the commit message which should be prepared." \
|
||||
)
|
||||
_describe -t commands 'git-journal v commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_v_commands] )) ||
|
||||
_v_commands() {
|
||||
local commands; commands=(
|
||||
"MESSAGE:The path to the commit message which should be prepared." \
|
||||
)
|
||||
_describe -t commands 'v commands' commands "$@"
|
||||
}
|
||||
(( $+functions[_git-journal_verify_commands] )) ||
|
||||
_git-journal_verify_commands() {
|
||||
local commands; commands=(
|
||||
"MESSAGE:The path to the commit message which should be prepared." \
|
||||
)
|
||||
_describe -t commands 'git-journal verify commands' commands "$@"
|
||||
}
|
||||
|
||||
_git-journal "$@"
|
||||
|
|
@ -1,34 +1,9 @@
|
|||
#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).
|
||||
# Completion script for git-pulls 0.3.1 (https://github.com/schacon/git-pulls).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
#compdef git-revise
|
||||
#description update, split and rearrange commits
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for git-revise 0.7.0
|
||||
# (https://github.com/mystor/git-revise/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Hannu Hartikainen (https://github.com/dancek)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
__git-revise_commits() {
|
||||
local -a commits
|
||||
if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then
|
||||
commits=(${(f)"$(git log -20 --pretty=format:'%h:%d %s' | sed 's/: /:/')"})
|
||||
_describe -V 'commit' commits
|
||||
else
|
||||
_message 'not a git repository'
|
||||
fi
|
||||
}
|
||||
|
||||
__git-revise_branches() {
|
||||
local -a branches
|
||||
if git rev-parse --is-inside-work-tree 1>/dev/null 2>/dev/null; then
|
||||
branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"})
|
||||
_describe 'branch' branches
|
||||
else
|
||||
_message 'not a git repository'
|
||||
fi
|
||||
}
|
||||
|
||||
_git-revise() {
|
||||
local curcontext="$curcontext" ret=1
|
||||
|
||||
_arguments -s \
|
||||
'(- :)'{-h,--help}'[show help message and exit]' \
|
||||
'--root[revise starting at the root commit]' \
|
||||
'--ref=[reference to update]: :__git-revise_branches' \
|
||||
'--reauthor[reset the author of the targeted commit]' \
|
||||
'(- :)--version[show version number and exit]' \
|
||||
'(--edit -e)'{--edit,-e}'[edit commit message of targeted commit(s)]' \
|
||||
'(--no-autosquash)--autosquash[automatically apply fixup! and squash! commits to their targets]' \
|
||||
'(--autosquash)--no-autosquash[force disable revise.autoSquash behaviour]' \
|
||||
'(--all -a)--no-index[ignore the index while rewriting history]' \
|
||||
'(--no-index --all -a)'{--all,-a}'[stage all tracked files before running]' \
|
||||
'(--interactive -i --message -m --cut -c --patch -p)'{--patch,-p}'[interactively stage hunks before running]' \
|
||||
'(--interactive -i --message -m --cut -c --patch -p)'{--interactive,-i}'[interactively edit commit stack]' \
|
||||
'(--interactive -i --message -m --cut -c --patch -p)'{--message,-m}'[specify commit message on command line]:MESSAGE:()' \
|
||||
'(--interactive -i --message -m --cut -c --patch -p)'{--cut,-c}'[interactively cut a commit into two smaller commits]' \
|
||||
'(--gpg-sign -S --no-gpg-sign)'{--gpg-sign,-S}'[GPG sign commits]' \
|
||||
'(--gpg-sign -S --no-gpg-sign)--no-gpg-sign[do not GPG sign commits]' \
|
||||
'1: :__git-revise_commits' && ret=0
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
_git-revise "$@"
|
||||
|
||||
# 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
|
||||
11
src/_git-wtf
11
src/_git-wtf
|
|
@ -1,6 +1,6 @@
|
|||
#compdef git-wtf
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -36,9 +36,16 @@
|
|||
# -------
|
||||
#
|
||||
# * Mario Fernandez (https://github.com/sirech)
|
||||
# * Shohei YOSHIDA (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
__git_wtf_branches() {
|
||||
local -a branches
|
||||
branches=(${(f)"$(git for-each-ref --format='%(refname:short)' refs/heads/)"})
|
||||
_describe 'branch' branches
|
||||
}
|
||||
|
||||
_arguments -w -C -s \
|
||||
'(--long --short)'{-l,--long}'[include author info and date for each commit]' \
|
||||
'(--long --short)'{-s,--short}'[do not show commits]' \
|
||||
|
|
@ -47,7 +54,7 @@ _arguments -w -C -s \
|
|||
'(--key)'{-k,--key}'[show key]' \
|
||||
'(--relations)'{-r,--relations}'[show relation to features / integration branches]' \
|
||||
'(--dump-config)--dump-config[print out current configuration and exit]' \
|
||||
'*: :__git_branch_names'
|
||||
'*: :__git_wtf_branches'
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
110
src/_glances
110
src/_glances
|
|
@ -1,6 +1,6 @@
|
|||
#compdef glances
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,36 +28,102 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for glances (http://nicolargo.github.com/glances/).
|
||||
# Completion script for glances 4.3.3 (https://nicolargo.github.io/glances/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * loranger (https://github.com/loranger)
|
||||
# * Shohei Yoshida (https://github.com/syohex)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_glances() {
|
||||
|
||||
_arguments \
|
||||
"-b[Display network rate in Byte per second]" \
|
||||
"-B[Bind server to the given IP or host NAME]:host:_hosts" \
|
||||
"-c[Connect to a Glances server]:host:_hosts" \
|
||||
"-C[Path to the configuration file]:configuration path:_files -/" \
|
||||
"-d[Disable disk I/O module]" \
|
||||
"-e[Enable the sensors module (Linux-only)]" \
|
||||
"-f[Set the output folder (HTML) or file (CSV)]:output path:_files -/" \
|
||||
"-h[Display the syntax and exit]" \
|
||||
"-m[Disable mount module]" \
|
||||
"-n[Disable network module]" \
|
||||
"-o[Define additional output (available: HTML or CSV)]:output type:(HTML CSV)" \
|
||||
"-p[Define the client or server TCP port (default: 61209)]:port:_ports" \
|
||||
"-P[Client/server password]:password:" \
|
||||
"-s[Run Glances in server mode]" \
|
||||
"-t[Set the refresh time in seconds (default: 3)]:seconds:" \
|
||||
"-v[Display the version and exit]" \
|
||||
"-z[Do not use the bold color attribute]" \
|
||||
_arguments \
|
||||
'(- *)'{-h,--help}'[show help message and exit]' \
|
||||
'--print-completion[print shell completion script]:shell:(bash zsh tcsh)' \
|
||||
'(- *)'{-V,--version}"[show program's version number and exit]" \
|
||||
'(-d --debug)'{-d,--debug}'[enable debug mode]' \
|
||||
'(-C --config)'{-C,--config}'[path to the configuration file]: :_files' \
|
||||
'(--modules-list --module-list)'{--modules-list,--module-list}'[display modules list and exit]' \
|
||||
'(--disable-plugin --disable-plugins)'{--disable-plugin,--disable-plugins}'[disable plugin(comma separated list or all)]:plugin' \
|
||||
'(--enable-plugin --enable-plugins)'{--enable-plugin,--enable-plugins}'[enable plugin(comma separated list)]:plugin' \
|
||||
'--disable-process[disable process module]' \
|
||||
'--disable-webui[disable the Web Interface]' \
|
||||
'(--light --enable-light)'{--light,--enable-light}'[light mode for Curses UI]' \
|
||||
'(-0 --disable-irix)'{-0,--disable-irix}"[task's cpu usage will be divided by the total number of CPUs]" \
|
||||
'(-1 --percpu)'{-1,--percpu}'[start Glances in per CPU mode]' \
|
||||
'(-2 --disable-left-sidebar)'{-2,--disable-left-sidebar}'[disable network, disk I/O, FS and sensors modules]' \
|
||||
'(-3 --disable-quicklook)'{-3,--disable-quicklook}'[disable quick look module]' \
|
||||
'(-4 --full-quicklook)'{-4,--full-quicklook}'[disable all but quick look and load]' \
|
||||
'(-5 --disable-top)'{-5,--disable-top}'[disable top menu(QL, CPU, MEM, SWAP and LOAD)]' \
|
||||
'(-6 --menugpu)'{-6,--menugpu}'[start Glances in mean GPU mode]' \
|
||||
'--disable-history[disable stats history]' \
|
||||
'--disable-bold[disable bold mode in the terminal]' \
|
||||
'--disable-bg[disable background colors in the terminal]' \
|
||||
'--enable-irq[enable IRQ mode]' \
|
||||
'--enable-process-extended[enable extended stats on top process]' \
|
||||
'--disable-separator[disable separator in the UI]' \
|
||||
'--disable-cursor[disable cursor in the UI]' \
|
||||
'--sort-process[sort processes]: :(cpu_percent memory_percent username cpu_times io_counters name)' \
|
||||
'(--programs --program)'{--programs,--program}'[Accumulate processes by program]' \
|
||||
'--export[enable export module]:module' \
|
||||
'--export-csv-file[file path for CSV exporter]: :_files' \
|
||||
'--export-csv-overwrite[overwrite existing CSV file]' \
|
||||
'--export-json-file[file path for JSON exporter]: :_files' \
|
||||
'--export-graph-path[Folder for Graph exporter]: :_files -/' \
|
||||
'--export-process-filter[set the export process filter]:filters' \
|
||||
'(-c --client)'{-c,--client}'[connect to a Glances server]:host:_hosts' \
|
||||
'(-s --server)'{-s,--server}'[run Glances in server mode]' \
|
||||
'--browser[start the client browser]' \
|
||||
'--disable-autodiscover[disable autodiscover feature]' \
|
||||
'(-p --port)'{-p,--port}'[define the client/server TCP port]:port' \
|
||||
'(-B --bind)'{-B,--bind}'[bind server to the given IPv4/IPv6 address or hostname]:host:_hosts' \
|
||||
'--username[define a client/server username]' \
|
||||
'--password[define a client/server password]' \
|
||||
'-u[use the given client/server username]:user_name' \
|
||||
'--snmp-community[SNMP community]:community' \
|
||||
'--snmp-port[SNMP community]:port' \
|
||||
'--snmp-version[SNMP version]:version:(1 2c 3)' \
|
||||
'--snmp-user[SNMP user]:user' \
|
||||
'--snmp-auth[SNMP auth]:auth' \
|
||||
'--snmp-force[force SNMP mode]' \
|
||||
'(-t --time)'{-t,--time}'[set minimum refresh rate in seconds(default: 2 sec)]:seconds' \
|
||||
'(-w --webserver)'{-w,--webserver}'[run Glances in web server mode]' \
|
||||
'--cached-time[set the server cache time(default: 1 sec)]:seconds' \
|
||||
'--stop-after[stop Glances after n fresh]:times' \
|
||||
'--open-web-browser[try to open the Web UI in the default browser]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[do not display the curses interface]' \
|
||||
'(-f --process-filter)'{-f,--process-filter}'[set the process filter pattern]:regexp' \
|
||||
'--process-short-name[force short name for processes name]' \
|
||||
'--process-long-name[force long name for processes name]' \
|
||||
'--stdout[display stats to stdout one stat per line]:stats' \
|
||||
'--stdout-json[display stats to stdout, JSON format]:stats' \
|
||||
'--stdout-csv[display stats to CSV, JSON format]:stats' \
|
||||
'--issue[test all plugins and exit]' \
|
||||
'--trace-malloc[trace memory allocation and display it at the end of the process]' \
|
||||
'--memory-leak[test memory leak]' \
|
||||
'--api-doc[display fields descriptions]'\
|
||||
'--hide-kernel-threads[hide kernel threads in process list]' \
|
||||
'(-b --byte)'{-b,--byte}'[display network rate in byte per second]' \
|
||||
'--diskio-show-ramfs[show RAM Fs in the DiskIO plugin]' \
|
||||
'--diskio-iops[show IO per second in the DiskIO plugin]' \
|
||||
'--fahrenheit[display temperature in Fahrenheit]' \
|
||||
'--fs-free-space[display FS free space instead of used]' \
|
||||
'--sparkline[display sparklines instead of bar in the curses interface]' \
|
||||
'--disable-unicode[disable unicode characters in the curses interface]' \
|
||||
'--theme-white[optimize display colors for white background ]' \
|
||||
'--disable-check-update[disable online Glances version check]' \
|
||||
'--strftime[strftime format string for displaying current date in standalone mode]' \
|
||||
}
|
||||
|
||||
_glances "$@"
|
||||
_glances "$@"
|
||||
|
||||
# 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
|
||||
|
|
|
|||
554
src/_go
554
src/_go
|
|
@ -1,554 +0,0 @@
|
|||
#compdef go
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
|
||||
# Copyright (c) 2013-2015 Robby Russell and contributors (see
|
||||
# https://github.com/robbyrussell/oh-my-zsh/contributors)
|
||||
# Copyright (c) 2010-2014 Go authors
|
||||
#
|
||||
# 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 go 1.5 (http://golang.org).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Mikkel Oscar Lyderik <mikkeloscar@gmail.com>
|
||||
# * oh-my-zsh authors:
|
||||
# https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/golang/golang.plugin.zsh
|
||||
# * Go authors
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
typeset -A opt_args
|
||||
|
||||
_go() {
|
||||
local -a commands build_flags
|
||||
commands=(
|
||||
'build:compile packages and dependencies'
|
||||
'clean:remove object files'
|
||||
'doc:show documentation for package or symbol'
|
||||
'env:print Go environment information'
|
||||
'fix:run go tool fix on packages'
|
||||
'fmt:run gofmt on package sources'
|
||||
'generate:generate Go files by processing source'
|
||||
'get:download and install packages and dependencies'
|
||||
'install:compile and install packages and dependencies'
|
||||
'list:list packages'
|
||||
'run:compile and run Go program'
|
||||
'test:test packages'
|
||||
'tool:run specified go tool'
|
||||
'version:print Go version'
|
||||
'vet:run go tool vet on packages'
|
||||
'help:get more information about a command'
|
||||
)
|
||||
|
||||
_arguments \
|
||||
"1: :{_describe 'command' commands}" \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
args)
|
||||
build_flags=(
|
||||
'-a[force rebuilding of packages that are already up-to-date]'
|
||||
'-n[print the commands but do not run them]'
|
||||
'-p[number of builds that can be run in parallel]:number'
|
||||
'-race[enable data race detection]'
|
||||
'-v[print the names of packages as they are compiled]'
|
||||
'-work[print temporary work directory and keep it]'
|
||||
'-x[print the commands]'
|
||||
'-asmflags[arguments for each go tool asm invocation]:flags'
|
||||
'-buildmode[build mode to use]:mode'
|
||||
'-compiler[name of compiler to use]:name'
|
||||
'-gccgoflags[arguments for gccgo]:args'
|
||||
'-gcflags[arguments for each go tool compile invocation]:args'
|
||||
'-installsuffix[suffix to add to package directory]:suffix'
|
||||
'-ldflags[arguments to pass on each go tool link invocation.]:flags'
|
||||
'-linkshared[link against shared libraries]'
|
||||
'-pkgdir[install and load all packages from dir]:dir'
|
||||
'-tags[list of build tags to consider satisfied]:tags'
|
||||
'-toolexec[program to use to invoke toolchain programs]:args'
|
||||
)
|
||||
|
||||
__go_packages() {
|
||||
local gopaths
|
||||
declare -a gopaths
|
||||
gopaths=("${(s/:/)$(go env GOPATH)}")
|
||||
gopaths+=("$(go env GOROOT)")
|
||||
for p in $gopaths; do
|
||||
_path_files -W "$p/src" -/
|
||||
done
|
||||
}
|
||||
|
||||
case $words[1] in
|
||||
build)
|
||||
_arguments \
|
||||
'-o[force build to write to named output file]:file:_files' \
|
||||
'-i[installs the packages that are dependencies of the target]' \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
clean)
|
||||
_arguments \
|
||||
'-i[remove corresponding installed archive or binary]' \
|
||||
'-r[apply clean recursively on all dependencies]' \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
doc)
|
||||
_arguments \
|
||||
'-c[respect case when matching symbols]' \
|
||||
'-cmd[treat a command (package main) like a regular package]' \
|
||||
'-u[show docs for unexported and exported symbols and methods]'
|
||||
;;
|
||||
|
||||
fix)
|
||||
_arguments '*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
fmt)
|
||||
_arguments \
|
||||
'-n[prints commands that would be executed]' \
|
||||
'-x[prints commands as they are executed]' \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
generate)
|
||||
_arguments \
|
||||
'-run=[specifies a regular expression to select directives]:regex' \
|
||||
'-x[print the commands]' \
|
||||
'-n[print the commands but do not run them]' \
|
||||
'-v[print the names of packages as they are compiled]' \
|
||||
"*:args:{ _alternative ':importpaths:__go_packages' _files }"
|
||||
;;
|
||||
|
||||
get)
|
||||
_arguments \
|
||||
'-d[instructs get to stop after downloading the packages]' \
|
||||
'-f[force get -u not to verify that each package has been checked from vcs]' \
|
||||
'-fix[run the fix tool on the downloaded packages]' \
|
||||
'-insecure[permit fetching/resolving custom domains]' \
|
||||
'-t[also download the packages required to build tests]' \
|
||||
'-u[use the network to update the named packages]' \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
install)
|
||||
_arguments ${build_flags[@]} \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
list)
|
||||
_arguments \
|
||||
'-e[changes the handling of erroneous packages]' \
|
||||
'-f[specifies an alternate format for the list]:format' \
|
||||
'-json[causes package data to be printed in JSON format]' \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
run)
|
||||
_arguments \
|
||||
${build_flags[@]} \
|
||||
'-exec[invoke the binary using xprog]:xporg' \
|
||||
'*:file:_path_files -g "*.go"'
|
||||
;;
|
||||
|
||||
test)
|
||||
_arguments \
|
||||
"-c[compile but don't run test]" \
|
||||
'-i[install dependencies of the test]' \
|
||||
'-bench[run benchmarks matching the regular expression]:regexp' \
|
||||
'-benchmem[print memory allocation statistics for benchmarks]' \
|
||||
'-benchtime[run benchmarks for t rime]:t' \
|
||||
'-blockprofile[write a goroutine blocking profile to the specified file]:block' \
|
||||
'-blockprofilerate[control goroutine blocking profiles]:n' \
|
||||
'-count[run each test and benchmark n times]:n' \
|
||||
'-cover[enable coverage analysis]' \
|
||||
'-covermode[set the mode for coverage analysis]:mode:(set count atomic)' \
|
||||
'-coverpkg[apply coverage analysis in each test of listed packages]:list' \
|
||||
'-coverprofile[write a coverage profile to file]:cover' \
|
||||
'-cpu[specify a list of GOMAXPROCS values]:cpus' \
|
||||
'-cpuprofile[write a CPU profile to the specified file]:profile' \
|
||||
'-memprofile[write a memory profile to file]:mem' \
|
||||
'-memprofilerate[enable more precise memory profiles]:n' \
|
||||
'-outputdir[place output files from profiling in output dir]:dir' \
|
||||
'-parallel[allow parallel execution of test functions]:n' \
|
||||
'-run[run tests and examples matching the regular expression]:regexp' \
|
||||
'-short[tell long-running tests to shorten their run time]' \
|
||||
'-timeout[timeout long running tests]:t' \
|
||||
'-trace[write an execution trace to the specified file]:trace' \
|
||||
'-v[verbose output]' \
|
||||
${build_flags[@]} \
|
||||
'-exec[run test binary using xprog]:xprog' \
|
||||
'-o[compile test binary to named file]:file:_files' \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
|
||||
tool)
|
||||
local -a tools
|
||||
tools=($(go tool))
|
||||
|
||||
_arguments \
|
||||
'-n[print command that would be executed]' \
|
||||
"1: :{_describe 'tool' tools}" \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
args)
|
||||
case $words[1] in
|
||||
addr2line)
|
||||
_files
|
||||
;;
|
||||
|
||||
asm)
|
||||
_arguments \
|
||||
'-D[predefined symbol with optional simple value]:value' \
|
||||
'-I[include directory]:value' \
|
||||
'-S[print assembly and machine code]' \
|
||||
'-debug[dump instructions as they are parsed]' \
|
||||
'-dynlink[support references to Go symbols]' \
|
||||
'-o[output file]:string' \
|
||||
'-shared[generate code that can be linked into a shared lib]' \
|
||||
'-trimpath[remove prefix from recorded source file paths]:string'
|
||||
;;
|
||||
|
||||
callgraph)
|
||||
local -a algos graphs
|
||||
algos=(
|
||||
'static:static calls only'
|
||||
'cha:Class Hierarchy Analysis'
|
||||
'rta:Rapid Type Analysis'
|
||||
'pta:inclusion-based Points-To Analysis'
|
||||
)
|
||||
graphs=(
|
||||
'digraph:output in digraph format'
|
||||
'graphviz:output in AT&T GraphViz (.dot) format'
|
||||
)
|
||||
|
||||
_arguments \
|
||||
'-algo=[call-graph construction algorithm]:algos:{ _describe "algos" algos }' \
|
||||
"-test[include the package's tests in the analysis]" \
|
||||
'-format=[format in which each call graph edge is displayed]:graphs:{ _describe "graphs" graphs }'
|
||||
;;
|
||||
|
||||
cgo)
|
||||
_arguments \
|
||||
'-debug-define[print relevant #defines]' \
|
||||
'-debug-gcc[print gcc invocations]' \
|
||||
'-dynimport[if non-empty, print dynamic import data]:string' \
|
||||
'-dynlinker[record dynamic linker information]' \
|
||||
'-dynout[write -dynimport output to file]:file' \
|
||||
'-dynpackage[set Go package for -dynimport output]:string' \
|
||||
'-exportheader[where to write export header]:string' \
|
||||
'-gccgo[generate files for use with gccgo]' \
|
||||
'-gccgopkgpath[-fgo-pkgpath option used with gccgo]:string' \
|
||||
'-gccgoprefix[-fgo-prefix option used with gccgo]:string' \
|
||||
'-godefs[write Go definitions for C file to stdout]' \
|
||||
'-import_runtime_cgo[import runtime/cgo in generated code]' \
|
||||
'-import_syscall[import syscall in generated code]' \
|
||||
'-importpath[import path of package being built]:path' \
|
||||
'-objdir[object directory]:dir'
|
||||
;;
|
||||
|
||||
compile)
|
||||
_arguments \
|
||||
'-%[debug non-static initializers]' \
|
||||
'-+[compiling runtime]' \
|
||||
"-A[for bootstrapping, allow 'any' type]" \
|
||||
'-B[disable bounds checking]' \
|
||||
'-D[set relative path for local imports]:path' \
|
||||
'-E[debug symbol export]' \
|
||||
'-I[add directory to import search path]:directory' \
|
||||
'-K[debug missing line numbers]' \
|
||||
'-L[use full (long) path in error messages]' \
|
||||
'-M[debug move generation]' \
|
||||
'-N[disable optimizations]' \
|
||||
'-P[debug peephole optimizer]' \
|
||||
'-R[debug register optimizer]' \
|
||||
'-S[print assembly listing]' \
|
||||
'-V[print compiler version]' \
|
||||
'-W[debug parse tree after type checking]' \
|
||||
'-asmhdr[write assembly header to file]:file' \
|
||||
'-buildid[record id as the build id in the export metadata]:id' \
|
||||
'-complete[compiling complete package (no C or assembly)]' \
|
||||
'-cpuprofile[write cpu profile to file]:file' \
|
||||
'-d[print debug information about items in list]:list' \
|
||||
'-dynlink[support references to Go symbols]' \
|
||||
'-e[no limit on number of errors reported]' \
|
||||
'-f[debug stack frames]' \
|
||||
'-g[debug code generation]' \
|
||||
'-h[halt on error]' \
|
||||
'-i[debug line number stack]' \
|
||||
'-importmap[add definition of the form source=actual to import map]:definition' \
|
||||
'-installsuffix[set pkg directory suffix]:suffix' \
|
||||
'-j[debug runtime-initialized variables]' \
|
||||
'-l[disable inlining]' \
|
||||
'-largemodel[generate code that assumes a large memory model]' \
|
||||
'-live[debug liveness analysis]' \
|
||||
'-m[print optimization decisions]' \
|
||||
'-memprofile[write memory profile to file]:file' \
|
||||
'-memprofilerate[set runtime.MemProfileRate to rate]:rate' \
|
||||
'-nolocalimports[reject local (relative) imports]' \
|
||||
'-o[write output to file]:file' \
|
||||
'-p[set expected package import path]:path' \
|
||||
'-pack[write package file instead of object file]' \
|
||||
'-r[debug generated wrappers]' \
|
||||
'-race[enable race detector]' \
|
||||
'-s[warn about composite literals that can be simplified]' \
|
||||
'-shared[generate code that can be linked into a shared library]' \
|
||||
'-trimpath[remove prefix from recorded source file paths]:prefix' \
|
||||
'-u[reject unsafe code]' \
|
||||
'-v[increase debug verbosity]' \
|
||||
'-w[debug type checking]' \
|
||||
'-wb[enable write barrier (default 1)]' \
|
||||
'-x[debug lexer]' \
|
||||
'-y[debug declarations in canned imports (with -d)]' \
|
||||
'*:file:_path_files -g "*.go"'
|
||||
;;
|
||||
|
||||
cover)
|
||||
if (( CURRENT == 2 )); then
|
||||
_arguments \
|
||||
'-func=[output coverage profile information for each function]:string' \
|
||||
'-html=[generate HTML representation of coverage profile]:file:_files' \
|
||||
'-mode=[coverage mode]:mode:(set count atomic)'
|
||||
return
|
||||
fi
|
||||
|
||||
_arguments \
|
||||
'-o[file for output]:file' \
|
||||
'-var=[name of coverage variable to generate]:var' \
|
||||
'*:file:_path_files -g "*.go"'
|
||||
;;
|
||||
|
||||
doc)
|
||||
_arguments \
|
||||
'-c[respect case when matching symbols]' \
|
||||
'-cmd[treat a command (package main) like a regular package]' \
|
||||
'-u[show docs for unexported and exported symbols and methods]' \
|
||||
;;
|
||||
|
||||
fix)
|
||||
_arguments \
|
||||
'-diff[display diffs instead of rewriting files]' \
|
||||
'-force[force fixes to run even if the code looks updated]:string' \
|
||||
'-r[restrict the rewrites]:string' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
|
||||
link)
|
||||
_arguments \
|
||||
'-B[add an ELF NT_GNU_BUILD_ID note when using ELF]:note' \
|
||||
'-C[check Go calls to C code]' \
|
||||
'-D[set data segment address (default -1)]:address' \
|
||||
'-E[set entry symbol name]:entry' \
|
||||
'-H[set header type]:type' \
|
||||
'-I[use linker as ELF dynamic linker]:linker' \
|
||||
'-L[add specified directory to library path]:directory' \
|
||||
'-R[set address rounding quantum (default -1)]:quantum' \
|
||||
'-T[set text segment address (default -1)]:address' \
|
||||
'-V[print version and exit]' \
|
||||
'-W[disassemble input]' \
|
||||
'-X[add string value definition]:definition' \
|
||||
'-a[disassemble output]' \
|
||||
'-buildid[record id as Go toolchain build id]:id' \
|
||||
'-buildmode[set build mode]:mode' \
|
||||
'-c[dump call graph]' \
|
||||
'-cpuprofile[write cpu profile to file]:file' \
|
||||
'-d[disable dynamic executable]' \
|
||||
'-extld[use linker when linking in external mode]:linker' \
|
||||
'-extldflags[pass flags to external linker]:flags' \
|
||||
'-f[ignore version mismatch]' \
|
||||
'-g[disable go package data checks]' \
|
||||
'-h[halt on error]' \
|
||||
'-installsuffix[set package directory suffix]:suffix' \
|
||||
'-k[set field tracking symbol]:symbol' \
|
||||
'-linkmode[set link mode]:mode:(internal external auto)' \
|
||||
'-linkshared[link against installed Go shared libraries]' \
|
||||
'-memprofile[write memory profile to file]:file' \
|
||||
'-memprofilerate[set runtime.MemProfileRate to rate]:rate' \
|
||||
'-n[dump symbol table]' \
|
||||
'-o[write output to file]:file' \
|
||||
'-r[set the ELF dynamic linker search path to dir1:dir2:...]:path' \
|
||||
'-race[enable race detector]' \
|
||||
'-s[disable symbol table]' \
|
||||
'-shared[generate shared object (implies -linkmode external)]' \
|
||||
'-tmpdir[use directory for temporary files]:directory' \
|
||||
'-u[reject unsafe packages]' \
|
||||
'-v[print link trace]' \
|
||||
'-w[disable DWARF generation]' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
|
||||
objdump)
|
||||
_arguments \
|
||||
'-s[only dump symbols matching this regexp]:regexp' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
|
||||
pack)
|
||||
_arguments '1:ops:(c p r t x)' '::verbose:(v)' ':files:_files'
|
||||
;;
|
||||
|
||||
pprof)
|
||||
_arguments \
|
||||
'-callgrind[outputs a graph in callgrind format]' \
|
||||
'-disasm=[output annotated assembly]:p' \
|
||||
'-dot[outputs a graph in DOT format]' \
|
||||
'-eog[visualize graph through eog]' \
|
||||
'-evince[visualize graph through evince]' \
|
||||
'-gif[outputs a graph image in GIF format]' \
|
||||
'-gv[visualize graph through gv]' \
|
||||
'-list=[output annotated source for functions matching regexp]:p' \
|
||||
'-pdf[outputs a graph in PDF format]' \
|
||||
'-peek=[output callers/callees of functions matching regexp]:p' \
|
||||
'-png[outputs a graph image in PNG format]' \
|
||||
'-proto[outputs the profile in compressed protobuf format]' \
|
||||
'-ps[outputs a graph in PS format]' \
|
||||
'-raw[outputs a text representation of the raw profile]' \
|
||||
'-svg[outputs a graph in SVG format]' \
|
||||
'-tags[outputs all tags in the profile]' \
|
||||
'-text[outputs top entries in text form]' \
|
||||
'-top[outputs top entries in text form]' \
|
||||
'-tree[outputs a text rendering of call graph]' \
|
||||
'-web[visualize graph through web browser]' \
|
||||
'-weblist=[output annotated source in HTML]:p' \
|
||||
'-output=[generate output on file f (stdout by default)]:f' \
|
||||
'-functions[report at function level (default)]' \
|
||||
'-files[report at source file level]' \
|
||||
'-lines[report at source line level]' \
|
||||
'-addresses[report at address level]' \
|
||||
'-base[show delta from this profile]:profile' \
|
||||
'-drop_negative[ignore negative differences]' \
|
||||
'-cum[sort by cumulative data]' \
|
||||
'-seconds=[length of time for dynamic profiles]:n' \
|
||||
'-nodecount=[max number of nodes to show]:n' \
|
||||
'-nodefraction=[hide nodes below <f>*total]:f' \
|
||||
'-edgefraction=[hide edges below <f>*total]:f' \
|
||||
'-sample_index[index of sample value to display]' \
|
||||
'-mean[average sample value over first value]' \
|
||||
'-inuse_space[display in-use memory size]' \
|
||||
'-inuse_objects[display in-use object counts]' \
|
||||
'-alloc_space[display allocated memory size]' \
|
||||
'-alloc_objects[display allocated object counts]' \
|
||||
'-total_delay[display total delay at each region]' \
|
||||
'-contentions[display number of delays at each region]' \
|
||||
'-mean_delay[display mean delay at each region]' \
|
||||
'-runtime[show runtime call frames in memory profiles]' \
|
||||
'-focus=[restricts to paths going through a node matching regexp]:r' \
|
||||
'-ignore=[skips paths going through any nodes matching regexp]:r' \
|
||||
'-tagfocus=[restrict to samples tagged with key:value matching regexp]:r' \
|
||||
'-tagignore=[discard samples tagged with key:value matching regexp]' \
|
||||
'-call_tree[generate a context-sensitive call tree]' \
|
||||
'-unit=[convert all samples to unit u for display]:u' \
|
||||
'-divide_by=[scale all samples by dividing them by f]:f' \
|
||||
'-buildid=[override build id for main binary in profile]:id' \
|
||||
'-tools=[search path for object-level tools]:path' \
|
||||
'-help[help message]' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
|
||||
trace)
|
||||
_arguments \
|
||||
'-http=[HTTP service address]:addr' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
|
||||
vet)
|
||||
_arguments \
|
||||
'-all[check everything]' \
|
||||
'-asmdecl[check assembly against Go declarations]' \
|
||||
'-assign[check for useless assignments]' \
|
||||
'-atomic[check for common mistaken usages of the sync/atomic]' \
|
||||
'-bool[check for mistakes involving boolean operators]' \
|
||||
'-buildtags[check that +build tags are valid]' \
|
||||
'-composites[check that composite literals used field-keyed elements]' \
|
||||
'-compositewhitelist[use composite white list]' \
|
||||
'-copylocks[check that locks are not passed by value]' \
|
||||
'-methods[check that canonically named methods are canonically defined]' \
|
||||
'-nilfunc[check for comparisons between functions and nil]' \
|
||||
'-printf[check printf-like invocations]' \
|
||||
'-printfuncs[print function names to check]:string' \
|
||||
'-rangeloops[check that range loop variables are used correctly]' \
|
||||
'-shadow[check for shadowed variables]' \
|
||||
'-shadowstrict[whether to be strict about shadowing]' \
|
||||
'-shift[check for useless shifts]' \
|
||||
'-structtags[check that struct field tags have canonical format]' \
|
||||
'-tags[list of build tags to apply when parsing]:list' \
|
||||
'-test[for testing only: sets -all and -shadow]' \
|
||||
'-unreachable[check for unreachable code]' \
|
||||
'-unsafeptr[check for misuse of unsafe.Pointer]' \
|
||||
'-unusedfuncs[list of functions whose results must be used]:string' \
|
||||
'-unusedresult[check for unused result of calls to functions in -unusedfuncs]' \
|
||||
'-unusedstringmethods[list of methods whose results must be used]:string' \
|
||||
'-v[verbose]' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
|
||||
yacc)
|
||||
_arguments \
|
||||
'-o[output]:output' \
|
||||
'-v[parsetable]:parsetable' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
vet)
|
||||
_arguments \
|
||||
'-n[print commands that would be executed]' \
|
||||
'-x[prints commands as they are executed]' \
|
||||
${build_flags[@]} \
|
||||
'*:importpaths:__go_packages'
|
||||
;;
|
||||
help)
|
||||
local -a topics
|
||||
topics=(
|
||||
'c:calling between Go and C'
|
||||
'buildmode:description of build modes'
|
||||
'filetype:file types'
|
||||
'gopath:GOPATH environment variable'
|
||||
'environment:environment variables'
|
||||
'importpath:import path syntax'
|
||||
'packages:description of package lists'
|
||||
'testflag:description of testing flags'
|
||||
'testfunc:description of testing functions'
|
||||
)
|
||||
|
||||
_arguments "1: :{_describe 'command' commands -- topics}"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_go
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,80 @@
|
|||
#compdef gpgconf
|
||||
# Copyright (c) 2021 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:
|
||||
# Completions for gpgconf (configuration utility provided with GnuPG 2.4.4
|
||||
# <https://gnupg.org>)
|
||||
#
|
||||
# Authors:
|
||||
# * "score" <seejay.11@gmail.com> https://keybase.io/score_under
|
||||
|
||||
_gpgconf_component() {
|
||||
local values=(
|
||||
"${(@f)$(gpgconf --list-components | awk -F: '{printf "%s[%s]\n", $1, $2}')}"
|
||||
)
|
||||
if [ "${action[2]}" = all ]; then
|
||||
values+=('all[All daemon components]')
|
||||
fi
|
||||
|
||||
_values 'component' "${(o)values[@]}"
|
||||
}
|
||||
|
||||
_arguments \
|
||||
'--help[print help text]' \
|
||||
'--list-components[list all components]' \
|
||||
'--check-programs[check all programs]' \
|
||||
'--apply-defaults[apply global default values]' \
|
||||
'--list-dirs[get the configuration directories for gpgconf]' \
|
||||
'--list-config[list global configuration file]' \
|
||||
'--check-config[check global configuration file]' \
|
||||
'--query-swdb[query the software version database]' \
|
||||
'--reload[reload all or a given component]:component:_gpgconf_component all' \
|
||||
'--launch[launch a given component]:component:_gpgconf_component all' \
|
||||
'--kill[kill a given component]:component:_gpgconf_component all' \
|
||||
'--create-socketdir[create a directory for sockets below /run/user or /var/run/user]' \
|
||||
'--remove-socketdir[remove a directory created with command --create-socketdir]' \
|
||||
'--list-options[list options]:component:_gpgconf_component' \
|
||||
'--change-options[change options]:component:_gpgconf_component' \
|
||||
'--check-options[check options]:component:_gpgconf_component' \
|
||||
'--apply-profile[update configuration files using the specified file]:configuration file:_path_files' \
|
||||
'--status-fd[write status info to the specified file descriptor]:file descriptor' \
|
||||
'--homedir[specify an alternative gnupg configuration home directory]:directory:_directories' \
|
||||
'--chuid[change the current user to uid which may either be a number or a name]:uid' \
|
||||
'(--lock --unlock)--unlock[remove a stale lock file hold for file]:name' \
|
||||
'(--lock --unlock)--lock[name of file protected by the lock]:name' \
|
||||
'(-o --output)'{-o,--output}'[write output to the specified file]:output file:_path_files' \
|
||||
'(-v --verbose)'{-v,--verbose}'[verbose]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[quiet]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[do not make any changes]' \
|
||||
'(-r --runtime)'{-r,--runtime}'[activate changes at runtime, if possible]'
|
||||
|
||||
# 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 grpcurl
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 grpcurl v1.8.7. (https://github.com/fullstorydev/grpcurl)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'*-H[Additional headers in "name:value" format]:header' \
|
||||
'-allow-unknown-fields[If "json" format is used, allows unknown fields to be present]' \
|
||||
'-authority[The authoritative name of the remote server]:authority' \
|
||||
'-cacert[File containing trusted root certificates for the server]: :_files' \
|
||||
'-cert[File containing client certificate(public key) to present to the server]: :_files' \
|
||||
'-connect-timeout[The maximum time, in seconds, to wait for connection to be established]:seconds' \
|
||||
'*-d[Data for request contents]:data' \
|
||||
'-emit-defaults[Emit default values for JSON-encoded responses]' \
|
||||
'-expand-headers[Headers may use "\${NAME}" syntax to reference environment variables]' \
|
||||
'-format[The format of request data]: :(json text)' \
|
||||
'-format-error[When a non-zero status is returned, format the response using the value set by the -format flag]' \
|
||||
'*-import-path[The path to a directory from which proto sources can be imported]: :_files -/' \
|
||||
'-insecure[Skip server certificate and domain verification]' \
|
||||
'-keepalive-time[The maximum idle time in seconds]:seconds' \
|
||||
'-key[File containing client private key, to present to the server]: :_files' \
|
||||
'-max-msg-sz[The maximum encoded size of a response message in bytes, that grpcurl will accept]:bytes' \
|
||||
'-max-time[The maximum total time the operation can take, in seconds]:seconds' \
|
||||
'-msg-template[When describing messages, show a template of input data]' \
|
||||
'-plaintext[Use plain-text HTTP/2 when connecting to server(no TLS)]' \
|
||||
'*-proto[The name of a proto source file]: :_files' \
|
||||
'*-protoset[The name of a file containing an encoded FileDescriptorSet]: :_files' \
|
||||
'-protoset-out[The name of a file to be written that will contain a FileDescriptorSet]: :_files' \
|
||||
'*-reflect-header[Additional reflection headers in "name:value" format]:header' \
|
||||
'*-rpc-header[Additional RPC headers in "name:value" format]' \
|
||||
'-servername[Override server name when validating TLS certificate]' \
|
||||
'-unix[Indicates that the server address is the path to a Unix domain socket]' \
|
||||
'-use-reflection[Server reflection will be used to determine the RPC schema]' \
|
||||
'-user-agent[The specified value will be added to the User-Agent header set by the grpc-go library]:user_agent' \
|
||||
'-v[Enable verbose output]' \
|
||||
'(- *)-version[Print version]' \
|
||||
'-vv[Enable very verbose output]' \
|
||||
'(- *)-h[Show help message]' \
|
||||
'*:: :_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
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#compdef gtk-launch
|
||||
#compdef gtk-launch gtk4-launch
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
|
||||
# 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
|
||||
|
|
@ -28,55 +28,52 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for gtk-launch on gtk+-3.14.8 (http://www.gtk.org/).
|
||||
# Completion script for gtk-launch on gtk+-3.24.37, gtk4-launch-4.10.4
|
||||
# (https://www.gtk.org/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * ncaq <ncaq@ncaq.net> (version 3.14.8)
|
||||
# * ncaq <ncaq@ncaq.net>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_gtk-launch() {
|
||||
_arguments \
|
||||
{-h,--help}'[Show help options]' \
|
||||
--help-all'[Show all help options]' \
|
||||
--help-gtk'[Show GTK+ Options]' \
|
||||
--display='[X display to use]' \
|
||||
'1: :_applications'
|
||||
local ret=1
|
||||
|
||||
if [[ $service == "gtk-launch" ]]; then
|
||||
_arguments -S -A "-*" \
|
||||
'(- *)'{-h,--help}'[Show help options]' \
|
||||
'(- *)'{-v,--version}'[Show program version]' \
|
||||
'(- *)--help-all[Show all help options]' \
|
||||
'(- *)--help-gtk[Show GTK+ Options]' \
|
||||
'(- *)--display=[X display to use]:display:_x_display' \
|
||||
'--class=[Program class as used by the window manager]:class' \
|
||||
'--name=[Program name as used by the window manager]:name' \
|
||||
'--gtk-module=[Load additional GTK+ modules]:module' \
|
||||
'--g-fatal-warnings[Make all warnings fatal]' \
|
||||
'1: :_gtk-launch-apps' \
|
||||
'*:: :_files' && ret=0
|
||||
else
|
||||
# gtk4-launch
|
||||
_arguments -S -A "-*" \
|
||||
'(- *)'{-h,--help}'[Show help options]' \
|
||||
'(- *)'{-v,--version}'[Show program version]' \
|
||||
'1: :_gtk-launch-apps' \
|
||||
'*:: :_files' && ret=0
|
||||
fi
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
_applications() {
|
||||
local -a applications
|
||||
|
||||
for file in /usr/share/applications/*.desktop; do
|
||||
applications+=`_format_entry $file`
|
||||
done
|
||||
|
||||
_values -w \
|
||||
'applications' \
|
||||
$applications
|
||||
(( $+functions[_gtk-launch-apps] )) ||
|
||||
_gtk-launch-apps() {
|
||||
local -a apps=(/usr/share/applications/*.desktop(:r:t))
|
||||
_values 'applications' $apps
|
||||
}
|
||||
|
||||
_format_entry() {
|
||||
echo "`_remove_path_extension $1`[`_get_description $1`]"
|
||||
}
|
||||
|
||||
_remove_path_extension() {
|
||||
# echo arg
|
||||
# remove path string
|
||||
# remove extension string
|
||||
echo $1 | \
|
||||
sed 's/.*\///' | \
|
||||
sed 's/\.desktop//'
|
||||
}
|
||||
|
||||
_get_description() {
|
||||
# grep --no-messages option is handling of not UTF-8 text
|
||||
grep --no-messages '^Comment=\|^Exec=' $1 | \
|
||||
tr '\n' ' '
|
||||
}
|
||||
_gtk-launch "$@"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
#compdef h2load
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 h2load 1.64.0 (https://github.com/nghttp2/nghttp2)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
'(-n --requests)'{-n,--requests=}'[Number of requests across all clients(Default 1)]:num' \
|
||||
'(-c --clients)'{-c,--clients=}'[Number of concurrent clients(Default 1)]:num' \
|
||||
'(-t --threads)'{-t,--threads=}'[Number of native threads(Default 1)]:num' \
|
||||
'(-i --input-file)'{-i,--input-file=}'[Path of a file with multiple URIs are separated by EOLs]:file:_files' \
|
||||
'(-m --max-concurrent-streams)'{-m,--max-concurrent-streams=}'[Max concurrent streams to issue per session(Default 1)]:num' \
|
||||
'(-f --max-frame-size)'{-f,--max-frame-size=}'[Maximum frame size that the local endpoint is willing to receive(Default 16K)]:size' \
|
||||
'(-w --window-bits)'{-w,--window-bits=}'[Set the stream level initial window size to (2**n)-1(Default 30)]:num' \
|
||||
'(-W --connection-window-bits)'{-W,--connection-window-bits=}'[Set the connection level initial window size to (2**n)-1(Default 30)]:num' \
|
||||
\*{-H,--header=}'[Add/Override a header to the requests]:header' \
|
||||
'--ciphers=[Set allowed cipher list for TLSv1.2 or earlier]:cipher_list' \
|
||||
'--tls13-ciphers=[Set allowed cipher list for TLSv1.3]:cipher_list' \
|
||||
'(-p --no-tls-proto)'{-p,--no-tls-proto=}'[Specify ALPN identifier of the protocol to used when accessing without SSL/TLS(Default h2c)]:protoid' \
|
||||
'(-d --data)'{-d,--data=}'[POST file to server]:file:_files' \
|
||||
'(-r --rate)'{-r,--rate=}'[Specify the fixed rate at which connections are created]:num' \
|
||||
'--rate-period=[Specify the time period between creating connections]:num' \
|
||||
'(-D --duration)'{-D,--duration=}'[Specify the main duration for the measurements]:duration' \
|
||||
'--warm-up-time[Specify the time period before starting the actual measurements]:duration' \
|
||||
'(-T --connection-active-timeout)'{-T,--connection-active-timeout=}'[Specify the maximum time that h2load is willing to keep a connection open]:duration' \
|
||||
'(-N --connection-inactivity-timeout)'{-N,--connection-inactivity-timeout=}'[Specify the amount of time that h2load willing to wait to see activity on a given connection]:duration' \
|
||||
'(--timing-script-file --rps)--timing-script-file=[Path of a timing script file]:file:_files' \
|
||||
'(-B --base-uri)'{-B,--base-uri=}'[Specify URI from which the scheme, host and port will be used for all requests]:uri:_urls' \
|
||||
'--alpn-list=[Comma delimited list of ALPN protocol identifier sorted in the order of preference]:alpn_list' \
|
||||
'--h1[Short hand for --alpn-list=http/1.1 --no-tls-proto=http/1.1]' \
|
||||
'--header-table-size=[Specify decoder header table size(Default 4K)]:size' \
|
||||
'--encoder-header-table-size=[Specify encoder header table size(Default 4K)]:size' \
|
||||
'--log-file=[Path of a request information]:file:_files' \
|
||||
'--qlog-file-base=[Enable qlog output and specify base file name for qlogs]:file:_files' \
|
||||
'--connect-to=[Host and port to connect]:host_port' \
|
||||
'(--timing-script-file --rps)--rps=[Specify request per second for each client]:num' \
|
||||
'--groups=[Specify the supported groups]:groups' \
|
||||
'--no-udp-gso[Disable UDP GSO]' \
|
||||
'--max-udp-payload-size=[Specify the maximum outgoing UDP datagram payload size]:size' \
|
||||
'--ktls[Enable ktls]' \
|
||||
'--sni=[Send given DNS name in TLS SNI]:dns_name' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Output debug information]' \
|
||||
'(- *)--version[Display version information and exit]' \
|
||||
'(- *)'{-h,--help}'[Display help and exit]' \
|
||||
'*:: :_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,28 @@
|
|||
#compdef hello
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for GNU hello (https://www.gnu.org/software/hello/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Wu Zhenyu <wuzy01@qq.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments -s \
|
||||
'(- *)'{-h,--help}'[display help and exit]' \
|
||||
'(- *)'{-v,--version}'[display version information and exit]' \
|
||||
{-t,--traditional}'[use traditional greeting]' \
|
||||
{-g,--greeting=}'[use TEXT as the greeting message]:TEXT'
|
||||
|
||||
# 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,294 @@
|
|||
#compdef hledger
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 hledger 1.10 ( https://hledger.org/ )
|
||||
# Last updated: 07.08.2018
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Valodim ( https://github.com/Valodim )
|
||||
# * fdw ( https://github.com/fdw )
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Notes
|
||||
# -----
|
||||
#
|
||||
# account completion depends on availability of a ~/.hledger.journal file
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
local curcontext="$curcontext" curstate state line expl grp cmd ret=1
|
||||
typeset -a args
|
||||
typeset -A opt_args
|
||||
|
||||
args=(
|
||||
'(- *)'{-h,--help}'[print help information]'
|
||||
'(-f --file)'{-f,--file}'=[use a different input file]:input file:_files'
|
||||
'--rules-file=[CSV conversion rules file]:rules file:_files'
|
||||
'--alias=[display accounts named OLD as NEW]:alias specification'
|
||||
'--anon=[anonymize accounts and payees]'
|
||||
'(-b --begin)'{-b,--begin}'=[include postings/txns on or after this date]:date'
|
||||
'(-e --end)'{-e,--end}'=[include postings/txns before this date]:date'
|
||||
'(-D --daily)'{-D,--daily}'[multiperiod/multicolumn report by day]'
|
||||
'(-W --weekly)'{-W,--weekly}'[multiperiod/multicolumn report by week]'
|
||||
'(-M --monthly)'{-M,--monthly}'[multiperiod/multicolumn report by month]'
|
||||
'(-Q --quarterly)'{-Q,--quarterly}'[multiperiod/multicolumn report by quarter]'
|
||||
'(-Y --yearly)'{-Y,--yearly}'[multiperiod/multicolumn report by year]'
|
||||
'(-p --period)'{-p,--period}'=[set start date, end date, and/or reporting interval all at once]'
|
||||
'(-C --cleared)'{-C,--cleared}'[include only cleared postings/txns]'
|
||||
'(-U --uncleared)'{-U,--uncleared}'[include only uncleared postings/txns]'
|
||||
'(-R --real)'{-R,--real}'[include only non-virtual postings]'
|
||||
'(--depth)--depth=[hide accounts/postings deeper than N]:depth'
|
||||
'(-E --empty)'{-E,--empty}'[show empty/zero things which are normally omitted]'
|
||||
'(-B --cost)'{-B,--cost}'[show amounts in their cost price'\''s commodity]'
|
||||
'(-V --value)'{-V,--value}'[converts reported amounts to the current market value]'
|
||||
'(-I --ignore-assertions)'{-I,--ignore-assertions}'[ignore any failing balance assertions]'
|
||||
'--forecast=[apply periodic transaction rules to generate future transactions]'
|
||||
)
|
||||
|
||||
_arguments -C -A "-*" "$args[@]" \
|
||||
'(- *)--version[print version information]' \
|
||||
'--debug[show debug output]' \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
while (( $#state )); do
|
||||
curstate=$state
|
||||
shift state
|
||||
case $curstate in
|
||||
cmds)
|
||||
typeset -a cmds
|
||||
cmds=(
|
||||
'accounts:show account names (a)'
|
||||
'activity:show an ascii barchart of posting counts per interval'
|
||||
'add:prompt for transactions and add them to the journal'
|
||||
'balance:show accounts and balances (b, bal)'
|
||||
'balancesheet:show a balance sheet (bs)'
|
||||
'balancesheetequity:like balancesheet, but also reports equity'
|
||||
'cashflow:show a cashflow statement (cf)'
|
||||
'check-dates:check that transactions are sorted by increasing date'
|
||||
'check-dupes:report account names having the same leaf but different prefixes'
|
||||
'close:print closing/opening transactions that bring some or all account balances to zero and back'
|
||||
'help:show any of the hledger manuals'
|
||||
'import:read new transactions added to each file since last run, and add them to the main journal file'
|
||||
'incomestatement:show an income statement (is)'
|
||||
'prices:print market price directives from the journal'
|
||||
'print:show transaction entries (p, txns)'
|
||||
'print-unique:print transactions which do not reuse an already-seen description'
|
||||
'register:show postings and running total (r, reg)'
|
||||
'register-patch:print the one posting whose transaction description is closest to the description'
|
||||
'rewrite:print all transactions, adding custom postings to the matched ones'
|
||||
'stats:show some journal statistics'
|
||||
'tags:list all the tag names used in the journal'
|
||||
'test:run built-in unit tests'
|
||||
)
|
||||
_describe 'subcommands' cmds && ret=0
|
||||
;;
|
||||
args)
|
||||
: $words
|
||||
local cmd=$words[1]
|
||||
(( $+cmd )) || return 1
|
||||
# curcontext="${curcontext%:*:*}:$service-$cmd:"
|
||||
case $cmd in
|
||||
accounts)
|
||||
args=(
|
||||
'(--declared)--declared[show account names declared with account directives]'
|
||||
'(--used)--used[show account names posted to by transactions]'
|
||||
'(--tree)--tree[show accounts as a tree (default in simple reports)]'
|
||||
'(--flat)--flat[show accounts as a list (default in multicolumn)]'
|
||||
'(--drop)--drop=[flat mode, omit N leading account name parts]:drop n'
|
||||
)
|
||||
;;
|
||||
activity)
|
||||
;;
|
||||
add)
|
||||
args=(
|
||||
'(--no-new-accounts)--no-new-accounts=[do not allow creating new accounts]'
|
||||
)
|
||||
;;
|
||||
bal|balance)
|
||||
args+=(
|
||||
'(--change)--change[show balance change in each period (default)]'
|
||||
'(--cumulative)--cumulative[show balance change accumulated across periods]'
|
||||
'(-H --historical)'{-H,--historical}'[show historical ending balance in each period]'
|
||||
'(--tree)--tree[show accounts as a tree (default in simple reports)]'
|
||||
'(--flat)--flat[show accounts as a list (default in multicolumn)]'
|
||||
'(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]'
|
||||
'(-T --row-total)'{-T,--row-total}'[show a row total column]'
|
||||
'(-N --no-total)'{-N,--no-total}'[do not show the final total row]'
|
||||
'(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n'
|
||||
'(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]'
|
||||
'(--format)--format=[in tree mode, use this custom line format]:custom line format'
|
||||
'(-O --output-format)'{-O,--output-format}='[select the output format from txt, csv, html]:format'
|
||||
'(-o --output-file)'{-o,--output-file}'=[write output to file]:file'
|
||||
'(--pretty-tables)--pretty-tables[use unicode to display prettier tables]'
|
||||
'(--sort-amount)--sort-amount[sort by amount instead of account code/name]'
|
||||
'(--invert)--invert[display all amounts with reversed sign]'
|
||||
'(--budget)--budget[show performance compared to budget goals]'
|
||||
'(--show-unbudgeted)--show-unbudgeted[with --budget, show unbudgeted accounts also]'
|
||||
)
|
||||
;;
|
||||
bl|balancesheet|balancesheetequity)
|
||||
args+=(
|
||||
'(--change)--change[show balance change in each period (default)]'
|
||||
'(--cumulative)--cumulative[show balance change accumulated across periods]'
|
||||
'(-H --historical)'{-H,--historical}'[show historical ending balance in each period]'
|
||||
'(--tree)--tree[show accounts as a tree (default in simple reports)]'
|
||||
'(--flat)--flat[show accounts as a list (default in multicolumn)]'
|
||||
'(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]'
|
||||
'(-T --row-total)'{-T,--row-total}'[show a row total column]'
|
||||
'(-N --no-total)'{-N,--no-total}'[do not show the final total row]'
|
||||
'(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n'
|
||||
'(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]'
|
||||
'(--format)--format=[in tree mode, use this custom line format]:custom line format'
|
||||
'(--sort-amount)--sort-amount[sort by amount instead of account code/name]'
|
||||
)
|
||||
;;
|
||||
cashflow|cf|balancesheet|bs|incomestatement|is)
|
||||
args+=(
|
||||
'(--change)--change[show balance change in each period (default)]'
|
||||
'(--cumulative)--cumulative[show balance change accumulated across periods]'
|
||||
'(-H --historical)'{-H,--historical}'[show historical ending balance in each period]'
|
||||
'(--tree)--tree[show accounts as a tree (default in simple reports)]'
|
||||
'(--flat)--flat[show accounts as a list (default in multicolumn)]'
|
||||
'(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]'
|
||||
'(-T --row-total)'{-T,--row-total}'[show a row total column]'
|
||||
'(-N --no-total)'{-N,--no-total}'[do not show the final total row]'
|
||||
'(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n'
|
||||
'(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]'
|
||||
'(--format)--format=[in tree mode, use this custom line format]:custom line format'
|
||||
'(--sort-amount)--sort-amount[sort by amount instead of account code/name]'
|
||||
)
|
||||
;;
|
||||
import)
|
||||
args=(
|
||||
'(--dry-run)--dry-run[just show the transactions to be imported]'
|
||||
)
|
||||
;;
|
||||
is|incomestatement)
|
||||
args+=(
|
||||
'(--change)--change[show balance change in each period (default)]'
|
||||
'(--cumulative)--cumulative[show balance change accumulated across periods]'
|
||||
'(-H --historical)'{-H,--historical}'[show historical ending balance in each period]'
|
||||
'(--tree)--tree[show accounts as a tree (default in simple reports)]'
|
||||
'(--flat)--flat[show accounts as a list (default in multicolumn)]'
|
||||
'(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]'
|
||||
'(-T --row-total)'{-T,--row-total}'[show a row total column]'
|
||||
'(-N --no-total)'{-N,--no-total}'[do not show the final total row]'
|
||||
'(--drop)--drop=[in flat mode, omit N leading account name parts]:drop n'
|
||||
'(--no-elide)--no-elide[tree mode, do not squash boring parent accounts]'
|
||||
'(--format)--format=[in tree mode, use this custom line format]:custom line format'
|
||||
'(--sort-amount)--sort-amount[sort by amount instead of account code/name]'
|
||||
)
|
||||
;;
|
||||
print)
|
||||
args=(
|
||||
'(-m --match)'{-m,--match}'[show the transaction whose description is most similar]:string'
|
||||
'(--new)--new[show only newer-dated transactions added in each file since last run]'
|
||||
'(-x --explicit)'{-x,--explicit}'[show all amounts explicitly]'
|
||||
'(-O --output-format)'{-O,--output-format}='[select the output format from txt, csv, html]:format'
|
||||
'(-o --output-file)'{-o,--output-file}'=[write output to file]:file'
|
||||
)
|
||||
;;
|
||||
register|reg)
|
||||
args+=(
|
||||
'(--cumulative)--cumulative[show balance change accumulated across periods]'
|
||||
'(-H --historical)'{-H,--historical}'[show historical ending balance in each period]'
|
||||
'(-A --average)'{-A,--average}'[show a row average column (in multicolumn mode)]'
|
||||
'(-r --related)'{-r,--related}'[show postings'\'' siblings instead]'
|
||||
'(-w --width)'{-w,--width}'=[set output width to 120, or N]:width (default 80)'
|
||||
'(-O --output-format)'{-O,--output-format}='[select the output format from txt, csv, html]:format'
|
||||
'(-o --output-file)'{-o,--output-file}'=[write output to file]:file'
|
||||
)
|
||||
;;
|
||||
stats)
|
||||
args=(
|
||||
'(-o --output-file)'{-o,--output-file}'=[write output to file]:file'
|
||||
)
|
||||
;;
|
||||
# fallback to _default
|
||||
*) _arguments -C -A "-*" "$args[@]" \
|
||||
'*: :_default' && ret=0
|
||||
continue
|
||||
esac
|
||||
_arguments -C -A "-*" "$args[@]" \
|
||||
'*:query patterns:->query' && ret=0
|
||||
;;
|
||||
query)
|
||||
|
||||
local -a accs keywords
|
||||
keywords=(
|
||||
'acct\::match account names'
|
||||
'code\::match by transaction code'
|
||||
'desc\::match transaction descriptions'
|
||||
'tag\::match by tag name'
|
||||
'depth\::match at or above depth'
|
||||
'status\::match cleared/uncleared transactions'
|
||||
'real\::match real/virtual transactions'
|
||||
'empty\::match if amount is/is not zero'
|
||||
'amt\::match transaction amount'
|
||||
'cur\::match by currency'
|
||||
)
|
||||
if compset -P 'amt:'; then
|
||||
_message 'match amount (<, <=, >, >=, add sign for non-absolute match)' && ret=0
|
||||
continue
|
||||
fi
|
||||
if compset -P '(#b)(code|desc|tag|depth|status|real|empty):'; then
|
||||
_message "'$match[1]' parameter" && ret=0
|
||||
continue
|
||||
fi
|
||||
|
||||
accs=( ${(f)"$(_call_program hledger hledger accounts $PREFIX 2>/dev/null)"} )
|
||||
if (( $? )); then
|
||||
_message "error fetching accounts from hledger"
|
||||
fi
|
||||
|
||||
# decided against partial matching here. these lines can
|
||||
# be uncommented to complete subaccounts hierarchically
|
||||
# (add -S '' -q to the compadd below, too)
|
||||
# if compset -P '(#b)(*):'; then
|
||||
# accs=( ${(M)accs:#$match[1]:*} )
|
||||
# accs=( ${accs#$IPREFIX} )
|
||||
# fi
|
||||
# accs=( ${accs%%:*} )
|
||||
|
||||
_wanted accounts expl "accounts" compadd -a accs && ret=0
|
||||
_describe "matcher keywords" keywords -S '' && ret=0
|
||||
|
||||
# not is special, it doesn't need the -S ''
|
||||
keywords=(
|
||||
'not:negate expression'
|
||||
)
|
||||
_describe "matcher keywords" keywords && ret=0
|
||||
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
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
|
||||
239
src/_httpie
239
src/_httpie
|
|
@ -1,6 +1,6 @@
|
|||
#compdef http
|
||||
#compdef http https=http
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users
|
||||
# Copyright (c) 2015 Github zsh-users - https://github.com/zsh-users
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for httpie 0.7.2 (http://httpie.org)
|
||||
# Completion script for httpie 3.2.2 (https://httpie.io/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
|
|
@ -36,79 +36,77 @@
|
|||
#
|
||||
# * Akira Maeda <https://github.com/glidenote>
|
||||
# * Valodim <https://github.com/Valodim>
|
||||
# * Claus Klingberg <https://github.com/cjk>
|
||||
# * Shohei YOSHIDA <https://github.com/syohex>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_httpie_params () {
|
||||
_httpie_params() {
|
||||
local ret=1 expl
|
||||
|
||||
local ret=1 expl
|
||||
|
||||
# or a url
|
||||
if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then
|
||||
_httpie_urls && ret=0
|
||||
# or a url
|
||||
if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then
|
||||
_httpie_urls && ret=0
|
||||
|
||||
# regular param, if we already have a url
|
||||
elif (( CURRENT > NORMARG )); then
|
||||
|
||||
# if the suffix is precisely : this is shorthand for a header
|
||||
if [[ -prefix ':' ]]; then
|
||||
PREFIX=
|
||||
SUFFIX=:
|
||||
fi
|
||||
|
||||
# if we are in front of a : (possibly due to the PREFIX move before)
|
||||
if [[ -suffix ':' ]]; then
|
||||
|
||||
# this is rather buggy with normal tab behavior :\
|
||||
compstate[insert]=menu
|
||||
_wanted http_header expl 'HTTP Header' \
|
||||
compadd -s ':' -S '' -- Content-Type Cookie && return 0
|
||||
fi
|
||||
|
||||
# ignore all prefix stuff
|
||||
compset -P '(#b)([^:@=]#)'
|
||||
local name=$match[1]
|
||||
|
||||
if compset -P ':'; then
|
||||
_message "$name header content"
|
||||
elif compset -P '@'; then
|
||||
_files
|
||||
elif compset -P ':='; then
|
||||
_message "$name raw json data"
|
||||
elif compset -P '=='; then
|
||||
_message "$name url parameter value"
|
||||
elif compset -P '='; then
|
||||
_message "$name data field value"
|
||||
else
|
||||
typeset -a ops
|
||||
ops=(
|
||||
'=:data field'
|
||||
'\::header'
|
||||
'==:request parameter'
|
||||
'@:data file field'
|
||||
'\:=:raw json field'
|
||||
)
|
||||
_describe -t httpparams "parameter types" ops -Q -S ''
|
||||
fi
|
||||
|
||||
ret=0
|
||||
elif (( CURRENT > NORMARG )); then
|
||||
|
||||
# if the suffix is precisely : this is shorthand for a header
|
||||
if [[ -prefix ':' ]]; then
|
||||
PREFIX=
|
||||
SUFFIX=:
|
||||
fi
|
||||
|
||||
# first arg may be a request method
|
||||
(( CURRENT == NORMARG )) &&
|
||||
_wanted http_method expl 'Request Method' \
|
||||
# if we are in front of a : (possibly due to the PREFIX move before)
|
||||
if [[ -suffix ':' ]]; then
|
||||
# this is rather buggy with normal tab behavior :
|
||||
compstate[insert]=menu
|
||||
_wanted http_header expl 'HTTP Header' \
|
||||
compadd -s ':' -S '' -- Content-Type Cookie && return 0
|
||||
fi
|
||||
|
||||
# ignore all prefix stuff
|
||||
compset -P '(#b)([^:@=]#)'
|
||||
local name=$match[1]
|
||||
|
||||
if compset -P '='; then
|
||||
_message "$name data field value"
|
||||
elif compset -P '@'; then
|
||||
_files
|
||||
elif compset -P ':=@'; then
|
||||
_files
|
||||
elif compset -P ':='; then
|
||||
_message "$name raw json data"
|
||||
elif compset -P '=='; then
|
||||
_message "$name url parameter value"
|
||||
elif compset -P ':'; then
|
||||
_message "$name header content"
|
||||
else
|
||||
typeset -a ops
|
||||
ops=(
|
||||
'=:data field'
|
||||
'\::header'
|
||||
'==:request parameter'
|
||||
'@:data file field'
|
||||
'\:=:raw json field'
|
||||
'\:=@:raw json field file path'
|
||||
)
|
||||
_describe -t httpparams "parameter types" ops -Q -S ''
|
||||
fi
|
||||
|
||||
ret=0
|
||||
|
||||
fi
|
||||
|
||||
# first arg may be a request method
|
||||
(( CURRENT == NORMARG )) &&
|
||||
_wanted http_method expl 'Request Method' \
|
||||
compadd GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK && ret=0
|
||||
|
||||
return $ret
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
_httpie_urls() {
|
||||
|
||||
local ret=1
|
||||
|
||||
if ! [[ -prefix [-+.a-z0-9]#:// ]]; then
|
||||
|
|
@ -123,55 +121,98 @@ _httpie_urls() {
|
|||
|
||||
}
|
||||
|
||||
_httpie_printflags () {
|
||||
_httpie_printflags() {
|
||||
local ret=1
|
||||
|
||||
local ret=1
|
||||
# not sure why this is necessary, but it will complete "-pH" style without it
|
||||
[[ $IPREFIX == "-p" ]] && IPREFIX+=" "
|
||||
|
||||
# not sure why this is necessary, but it will complete "-pH" style without it
|
||||
[[ $IPREFIX == "-p" ]] && IPREFIX+=" "
|
||||
compset -P '(#b)([a-zA-Z]#)'
|
||||
|
||||
compset -P '(#b)([a-zA-Z]#)'
|
||||
local -a flags
|
||||
[[ $match[1] != *H* ]] && flags+=( "H:request headers" )
|
||||
[[ $match[1] != *B* ]] && flags+=( "B:request body" )
|
||||
[[ $match[1] != *h* ]] && flags+=( "h:response headers" )
|
||||
[[ $match[1] != *b* ]] && flags+=( "b:response body" )
|
||||
|
||||
local -a flags
|
||||
[[ $match[1] != *H* ]] && flags+=( "H:request headers" )
|
||||
[[ $match[1] != *B* ]] && flags+=( "B:request body" )
|
||||
[[ $match[1] != *h* ]] && flags+=( "h:response headers" )
|
||||
[[ $match[1] != *b* ]] && flags+=( "b:response body" )
|
||||
_describe -t printflags "print flags" flags -S '' && ret=0
|
||||
|
||||
_describe -t printflags "print flags" flags -S '' && ret=0
|
||||
return $ret
|
||||
}
|
||||
|
||||
return $ret
|
||||
_httpie_styles() {
|
||||
local -a styles=(abap algol algol_nu arduino auto autumn borland bw
|
||||
colorful default dracula emacs friendly
|
||||
friendly_grayscale fruity github-dark gruvbox-dark gruvbox-light
|
||||
igor inkpot lilypond lovelace manni material monokai
|
||||
murphy native nord nord-darker one-dark paraiso-dark paraiso-light
|
||||
pastie perldoc pie pie-dark pie-light rainbow_dash
|
||||
rrt sas solarized solarized-dark solarized-light stata
|
||||
stata-dark stata-light tango trac vim vs xcode zenburn)
|
||||
|
||||
_describe -t styles 'style' styles
|
||||
}
|
||||
|
||||
integer NORMARG
|
||||
|
||||
_arguments -n -C -s \
|
||||
'(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object.]' \
|
||||
'(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields.]' \
|
||||
'--pretty=[Controls output processing.]:output format:(all colors format none)' \
|
||||
'(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:(autumn borland bw colorful default emacs friendly fruity manni monokai murphy native pastie perldoc ttr solarized tango trac vim vs)' \
|
||||
'(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object]' \
|
||||
'(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields]' \
|
||||
'--multipart[Similar to --form, but always sends a multipart/form-data request]' \
|
||||
'--boundary=[Specify a custom boundary string for multipart/form-data requests]' \
|
||||
'--raw=[This option allows you to pass raw request data without extra processing]' \
|
||||
'(-x --compress)'{-x,--compress}'[Content compressed with Deflate algorithm]' \
|
||||
'--pretty=[Controls output processing]:output format:(all colors format none)' \
|
||||
'(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:_httpie_styles' \
|
||||
'--unsorted[Disables all sorting while formatting output]' \
|
||||
'--sorted[Re-enables all sorting options while formatting output]' \
|
||||
'--response-charset=[Override the response encoding for terminal display purposes]:encoding' \
|
||||
'--response-mime=[Override the response mime type for coloring and formatting for the terminal]:mine' \
|
||||
'--format-options=[Controls output formatting]:format' \
|
||||
'(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response.]' \
|
||||
'(-p -h --headers)'{-h,--headers}'[Print only the response headers.]' \
|
||||
'(-p -b --body)'{-b,--body}'[Print only the response body.]' \
|
||||
'(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`.]' \
|
||||
'(-o --output)'{-o,--output}'=[Save output to FILE.]:output file:_files' \
|
||||
'(-d --download)'{-d,--download}'=[Do not print the response body to stdout.]' \
|
||||
'(-c --continue)'{-c,--continue}'[Resume an interrupted download.]' \
|
||||
'(--session-read-only)--session=[Create, or reuse and update a session.]:session name (or path)' \
|
||||
'(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange.]:session name (or path)' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response]' \
|
||||
'(-p -h --headers)'{-h,--headers}'[Print only the response headers]' \
|
||||
'(-p -m --meta)'{-m,--meta}'[Print only the response metadata]' \
|
||||
'(-p -b --body)'{-b,--body}'[Print only the response body]' \
|
||||
'--all[By default, only the final request/response is shown]' \
|
||||
'(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`]' \
|
||||
'(-o --output)'{-o,--output}'=[Save output to FILE]:output file:_files' \
|
||||
'(-d --download)'{-d,--download}'=[Do not print the response body to stdout]' \
|
||||
'(-c --continue)'{-c,--continue}'[Resume an interrupted download]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Do not print to stdout or stderr, except for errors and warnings when provided once]' \
|
||||
'(--session-read-only)--session=[Create, or reuse and update a session]:session name (or path)' \
|
||||
'(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange]:session name (or path)' \
|
||||
'(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\:PASS' \
|
||||
'--auth-type=[The authentication mechanism to be used. Defaults to "basic".]:AUTH-TYPE:(basic digest)' \
|
||||
'--proxy=[String mapping protocol to the URL of the proxy.]:PROXY' \
|
||||
'--follow[Allow full redirects.]' \
|
||||
"--verify=[Enable or disable verification of ssl certificates.]:verify certificate:(yes no)" \
|
||||
'--allow-redirects[Set this flag if full redirects are allowed (e.g. re-POST-ing of data at new ``Location``)]' \
|
||||
'--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback).]:timeout (seconds)' \
|
||||
'--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one.]' \
|
||||
'--ignore-stdin[Do not attempt to read stdin.]' \
|
||||
'(- *)--help[show help message.]' \
|
||||
"(- *)--version[show program's version number and exit.]" \
|
||||
'--traceback[Prints exception traceback should one occur.]' \
|
||||
'--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself.]' \
|
||||
'--auth-type=[The authentication mechanism to be used. Defaults to "basic"]:AUTH-TYPE:(basic digest bearer)' \
|
||||
'--ignore-netrc[Ignore credentials from .netrc]' \
|
||||
'--offline[Build the request and print it but do not actually send it]' \
|
||||
'--proxy=[String mapping protocol to the URL of the proxy]:PROXY' \
|
||||
'(-F --follow)'{-F,--follow}'[Allow full redirects]' \
|
||||
'--max-redirects=[A limit of redirects]:number:' \
|
||||
'--max-headers=[The maximum number of response headers to be read]:number:' \
|
||||
"--verify=[Enable or disable verification of ssl certificates]:verify certificate:(yes no)" \
|
||||
'--ssl=[The desired protocol version to use]:ssl version:(ssl2.3 tls1 tls1.1 tls1.2)' \
|
||||
'--ciphers=[A string in the OpenSSL cipher list format]:ciphers' \
|
||||
'--cert=[Specify a local cert to use as client side SSL certificate]:cert:_files' \
|
||||
'--cert-key=[Specify the private to key to use with SSL]:cert key:_files' \
|
||||
'--cert-key-pass=[The passphrase to be used to with the given private key]' \
|
||||
'--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback)]:timeout (seconds)' \
|
||||
'--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one]' \
|
||||
'--path-as-is[Bypass dot segment URL squashing]' \
|
||||
'--chunked[Enable streaming via chunked transfer encoding]' \
|
||||
'(-I --ignore-stdin)'{-I,--ignore-stdin}'[Do not attempt to read stdin]' \
|
||||
'(- *)--help[show help message]' \
|
||||
'(- *)--manual[show the full manual]' \
|
||||
"(- *)--version[show program's version number and exit]" \
|
||||
'--traceback[Prints exception traceback should one occur]' \
|
||||
'--default-scheme=[The default scheme to use if not specified in the URL]:scheme:' \
|
||||
'--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself]' \
|
||||
'*:args:_httpie_params' && 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,109 @@
|
|||
#compdef ibus
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 ibus 1.5.27 (https://github.com/ibus/ibus).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Tomo Kazahaya <https://github.com/tomonacci>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The completion of "ibus emoji --lang=" depends on _language_codes from
|
||||
# https://github.com/zsh-users/zsh-completions.
|
||||
|
||||
local context state state_descr line
|
||||
typeset -A opt_args
|
||||
local curcontext=$curcontext
|
||||
|
||||
_arguments -C \
|
||||
":command:(($(ibus help|sed -ne 's/^ \(\S\+\) \+\(.*\)/"\1\\:\2"/p')))" \
|
||||
'*:: :->args' \
|
||||
&& return
|
||||
|
||||
case $state in
|
||||
args)
|
||||
case $line[1] in
|
||||
(engine)
|
||||
_arguments \
|
||||
":engine:(($(ibus list-engine|sed -ne 's/:/\\\\:/g' -e 's/^ \(\S\+\) - \(.*\)$/"\1:\2"/p')))" \
|
||||
&& return
|
||||
;;
|
||||
(start|restart)
|
||||
_arguments \
|
||||
'--type=[start or restart daemon type with direct or systemd type]: :(direct systemd)' \
|
||||
'--file=[start or restart daemon with SYSTEMD_SERVICE file]: :_files' \
|
||||
'--verbose[Show debug message]' \
|
||||
'(- *)--help[Show help message]' \
|
||||
&& return
|
||||
;;
|
||||
(read-cache)
|
||||
_arguments \
|
||||
'--system[show the content of the system registry cache]' \
|
||||
'--file=[custom registry cache to show]:registry cache:_files' \
|
||||
'(- *)--help[Show help message]' \
|
||||
&& return
|
||||
;;
|
||||
(write-cache)
|
||||
_arguments \
|
||||
'--system[save the system registry cache]' \
|
||||
'--file=[custom registry cache to save]:registry cache:_files' \
|
||||
'(- *)--help[Show help message]' \
|
||||
&& return
|
||||
;;
|
||||
(emoji)
|
||||
_arguments \
|
||||
'--font=[emoji font]:emoji font: ' \
|
||||
'--lang=[language of emoji annotations]:language:_language_codes ISO-639-1' \
|
||||
'--partial-match[match annotations with a partial string]' \
|
||||
'(- *)--help[Show help message]' \
|
||||
&& return
|
||||
;;
|
||||
(im-module)
|
||||
_arguments \
|
||||
'--type=[Set im-module TYPE]: :(gtk2 gtk3 gtk4)' \
|
||||
'(- *)--help[Show help message]' \
|
||||
&& return
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return 1
|
||||
|
||||
# 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,87 @@
|
|||
#compdef include-what-you-use iwyu
|
||||
|
||||
# Copyright 2018 CERN for the benefit of the LHCb Collaboration.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Developed by:
|
||||
#
|
||||
# CERN LBC group
|
||||
#
|
||||
# CERN
|
||||
#
|
||||
# https://home.web.cern.ch/
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# with 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:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimers.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimers in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the names of the LBC group, CERN, nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this Software without specific prior written permission.
|
||||
#
|
||||
# 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
|
||||
# CONTRIBUTORS 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 WITH
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
# 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.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for include-what-you-use 0.19 (https://github.com/include-what-you-use/include-what-you-use).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# TODO:
|
||||
# - prevent _iwyu_opts from running once the first clang option got passed
|
||||
|
||||
_iwyu_opts() {
|
||||
_arguments \
|
||||
'--check_also=[print iwyu-violation info for files matching the given glob pattern]:glob pattern:' \
|
||||
'--keep=[tells iwyu to always keep these includes]:glob pattern' \
|
||||
'*'"--mapping_file=[iwyu mapping file]:iwyu mapping file:_path_files -g '*(/) *.imp'" \
|
||||
"--no_default_mappings[do not add iwyu's default mappings]" \
|
||||
'--pch_in_code[mark the first include in a translation unit as a precompiled header]' \
|
||||
'--prefix_header_includes=[what to do with command line includes]:command line include treatment:(add keep remove)' \
|
||||
"--transitive_includes_only[do not suggest that a file add headers that aren't already visible]" \
|
||||
'--max_line_length=[maximum line length for includes]:a number:' \
|
||||
'--comment_style=[set verbosity of "why" comments to]:comment style:(none short long)' \
|
||||
'--no_comments[do not add "why" comments]' \
|
||||
'--no_fwd_decls[do not use forward declarations]' \
|
||||
'--verbose=[the higher the level, the more output]:a number:' \
|
||||
'--quoted_includes_first[when sorting includes, place quoted ones first]' \
|
||||
'--cxx17ns[suggests the more concise syntax introduced in C++17]' \
|
||||
'--error=-[exit with N(default: 1) for iwyu violations]::exit code' \
|
||||
'--error_always=-[always exit with N (default: 1)]::exit code' \
|
||||
'--debug=[debug flags]:flag' \
|
||||
'--regex=[use specified regex dialect in iwyu]:dialect:(llvm ecmascript)' \
|
||||
'*: :_files'
|
||||
}
|
||||
|
||||
_alternative \
|
||||
'iwyu:iwyu_option:_iwyu_opts' \
|
||||
'gcc:gcc_option:_gcc' \
|
||||
|
||||
# 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