_rustup 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. #compdef rustup
  2. autoload -U is-at-least
  3. _rustup() {
  4. typeset -A opt_args
  5. typeset -a _arguments_options
  6. local ret=1
  7. if is-at-least 5.2; then
  8. _arguments_options=(-s -S -C)
  9. else
  10. _arguments_options=(-s -C)
  11. fi
  12. local context curcontext="$curcontext" state line
  13. _arguments "${_arguments_options[@]}" \
  14. '-v[Enable verbose output]' \
  15. '--verbose[Enable verbose output]' \
  16. '(-v --verbose)-q[Disable progress output]' \
  17. '(-v --verbose)--quiet[Disable progress output]' \
  18. '-h[Prints help information]' \
  19. '--help[Prints help information]' \
  20. '-V[Prints version information]' \
  21. '--version[Prints version information]' \
  22. '::+toolchain -- release channel (e.g. +stable) or custom toolchain to set override:_files' \
  23. ":: :_rustup_commands" \
  24. "*::: :->rustup" \
  25. && ret=0
  26. case $state in
  27. (rustup)
  28. words=($line[2] "${words[@]}")
  29. (( CURRENT += 1 ))
  30. curcontext="${curcontext%:*:*}:rustup-command-$line[2]:"
  31. case $line[2] in
  32. (dump-testament)
  33. _arguments "${_arguments_options[@]}" \
  34. '-h[Prints help information]' \
  35. '--help[Prints help information]' \
  36. '-V[Prints version information]' \
  37. '--version[Prints version information]' \
  38. && ret=0
  39. ;;
  40. (show)
  41. _arguments "${_arguments_options[@]}" \
  42. '-h[Prints help information]' \
  43. '--help[Prints help information]' \
  44. '-V[Prints version information]' \
  45. '--version[Prints version information]' \
  46. ":: :_rustup__show_commands" \
  47. "*::: :->show" \
  48. && ret=0
  49. case $state in
  50. (show)
  51. words=($line[1] "${words[@]}")
  52. (( CURRENT += 1 ))
  53. curcontext="${curcontext%:*:*}:rustup-show-command-$line[1]:"
  54. case $line[1] in
  55. (active-toolchain)
  56. _arguments "${_arguments_options[@]}" \
  57. '-h[Prints help information]' \
  58. '--help[Prints help information]' \
  59. '-V[Prints version information]' \
  60. '--version[Prints version information]' \
  61. && ret=0
  62. ;;
  63. (home)
  64. _arguments "${_arguments_options[@]}" \
  65. '-h[Prints help information]' \
  66. '--help[Prints help information]' \
  67. '-V[Prints version information]' \
  68. '--version[Prints version information]' \
  69. && ret=0
  70. ;;
  71. (profile)
  72. _arguments "${_arguments_options[@]}" \
  73. '-h[Prints help information]' \
  74. '--help[Prints help information]' \
  75. '-V[Prints version information]' \
  76. '--version[Prints version information]' \
  77. && ret=0
  78. ;;
  79. (keys)
  80. _arguments "${_arguments_options[@]}" \
  81. '-h[Prints help information]' \
  82. '--help[Prints help information]' \
  83. '-V[Prints version information]' \
  84. '--version[Prints version information]' \
  85. && ret=0
  86. ;;
  87. (help)
  88. _arguments "${_arguments_options[@]}" \
  89. '-h[Prints help information]' \
  90. '--help[Prints help information]' \
  91. '-V[Prints version information]' \
  92. '--version[Prints version information]' \
  93. && ret=0
  94. ;;
  95. esac
  96. ;;
  97. esac
  98. ;;
  99. (install)
  100. _arguments "${_arguments_options[@]}" \
  101. '--profile=[]: :(minimal default complete)' \
  102. '--no-self-update[Don'\''t perform self-update when running the `rustup install` command]' \
  103. '--force[Force an update, even if some components are missing]' \
  104. '-h[Prints help information]' \
  105. '--help[Prints help information]' \
  106. '-V[Prints version information]' \
  107. '--version[Prints version information]' \
  108. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  109. && ret=0
  110. ;;
  111. (uninstall)
  112. _arguments "${_arguments_options[@]}" \
  113. '-h[Prints help information]' \
  114. '--help[Prints help information]' \
  115. '-V[Prints version information]' \
  116. '--version[Prints version information]' \
  117. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  118. && ret=0
  119. ;;
  120. (update)
  121. _arguments "${_arguments_options[@]}" \
  122. '--no-self-update[Don'\''t perform self update when running the `rustup update` command]' \
  123. '--force[Force an update, even if some components are missing]' \
  124. '-h[Prints help information]' \
  125. '--help[Prints help information]' \
  126. '-V[Prints version information]' \
  127. '--version[Prints version information]' \
  128. '::toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  129. && ret=0
  130. ;;
  131. (check)
  132. _arguments "${_arguments_options[@]}" \
  133. '-h[Prints help information]' \
  134. '--help[Prints help information]' \
  135. '-V[Prints version information]' \
  136. '--version[Prints version information]' \
  137. && ret=0
  138. ;;
  139. (default)
  140. _arguments "${_arguments_options[@]}" \
  141. '-h[Prints help information]' \
  142. '--help[Prints help information]' \
  143. '-V[Prints version information]' \
  144. '--version[Prints version information]' \
  145. '::toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  146. && ret=0
  147. ;;
  148. (toolchain)
  149. _arguments "${_arguments_options[@]}" \
  150. '-h[Prints help information]' \
  151. '--help[Prints help information]' \
  152. '-V[Prints version information]' \
  153. '--version[Prints version information]' \
  154. ":: :_rustup__toolchain_commands" \
  155. "*::: :->toolchain" \
  156. && ret=0
  157. case $state in
  158. (toolchain)
  159. words=($line[1] "${words[@]}")
  160. (( CURRENT += 1 ))
  161. curcontext="${curcontext%:*:*}:rustup-toolchain-command-$line[1]:"
  162. case $line[1] in
  163. (list)
  164. _arguments "${_arguments_options[@]}" \
  165. '-v[Enable verbose output with toolchain information]' \
  166. '--verbose[Enable verbose output with toolchain information]' \
  167. '-h[Prints help information]' \
  168. '--help[Prints help information]' \
  169. '-V[Prints version information]' \
  170. '--version[Prints version information]' \
  171. && ret=0
  172. ;;
  173. (update)
  174. _arguments "${_arguments_options[@]}" \
  175. '--profile=[]: :(minimal default complete)' \
  176. '*-c+[Add specific components on installation]' \
  177. '*--component=[Add specific components on installation]' \
  178. '*-t+[Add specific targets on installation]' \
  179. '*--target=[Add specific targets on installation]' \
  180. '--no-self-update[Don'\''t perform self update when running the`rustup toolchain install` command]' \
  181. '--force[Force an update, even if some components are missing]' \
  182. '--allow-downgrade[Allow rustup to downgrade the toolchain to satisfy your component choice]' \
  183. '-h[Prints help information]' \
  184. '--help[Prints help information]' \
  185. '-V[Prints version information]' \
  186. '--version[Prints version information]' \
  187. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  188. && ret=0
  189. ;;
  190. (add)
  191. _arguments "${_arguments_options[@]}" \
  192. '--profile=[]: :(minimal default complete)' \
  193. '*-c+[Add specific components on installation]' \
  194. '*--component=[Add specific components on installation]' \
  195. '*-t+[Add specific targets on installation]' \
  196. '*--target=[Add specific targets on installation]' \
  197. '--no-self-update[Don'\''t perform self update when running the`rustup toolchain install` command]' \
  198. '--force[Force an update, even if some components are missing]' \
  199. '--allow-downgrade[Allow rustup to downgrade the toolchain to satisfy your component choice]' \
  200. '-h[Prints help information]' \
  201. '--help[Prints help information]' \
  202. '-V[Prints version information]' \
  203. '--version[Prints version information]' \
  204. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  205. && ret=0
  206. ;;
  207. (install)
  208. _arguments "${_arguments_options[@]}" \
  209. '--profile=[]: :(minimal default complete)' \
  210. '*-c+[Add specific components on installation]' \
  211. '*--component=[Add specific components on installation]' \
  212. '*-t+[Add specific targets on installation]' \
  213. '*--target=[Add specific targets on installation]' \
  214. '--no-self-update[Don'\''t perform self update when running the`rustup toolchain install` command]' \
  215. '--force[Force an update, even if some components are missing]' \
  216. '--allow-downgrade[Allow rustup to downgrade the toolchain to satisfy your component choice]' \
  217. '-h[Prints help information]' \
  218. '--help[Prints help information]' \
  219. '-V[Prints version information]' \
  220. '--version[Prints version information]' \
  221. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  222. && ret=0
  223. ;;
  224. (remove)
  225. _arguments "${_arguments_options[@]}" \
  226. '-h[Prints help information]' \
  227. '--help[Prints help information]' \
  228. '-V[Prints version information]' \
  229. '--version[Prints version information]' \
  230. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  231. && ret=0
  232. ;;
  233. (uninstall)
  234. _arguments "${_arguments_options[@]}" \
  235. '-h[Prints help information]' \
  236. '--help[Prints help information]' \
  237. '-V[Prints version information]' \
  238. '--version[Prints version information]' \
  239. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  240. && ret=0
  241. ;;
  242. (link)
  243. _arguments "${_arguments_options[@]}" \
  244. '-h[Prints help information]' \
  245. '--help[Prints help information]' \
  246. '-V[Prints version information]' \
  247. '--version[Prints version information]' \
  248. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  249. ':path:_files' \
  250. && ret=0
  251. ;;
  252. (help)
  253. _arguments "${_arguments_options[@]}" \
  254. '-h[Prints help information]' \
  255. '--help[Prints help information]' \
  256. '-V[Prints version information]' \
  257. '--version[Prints version information]' \
  258. && ret=0
  259. ;;
  260. esac
  261. ;;
  262. esac
  263. ;;
  264. (target)
  265. _arguments "${_arguments_options[@]}" \
  266. '-h[Prints help information]' \
  267. '--help[Prints help information]' \
  268. '-V[Prints version information]' \
  269. '--version[Prints version information]' \
  270. ":: :_rustup__target_commands" \
  271. "*::: :->target" \
  272. && ret=0
  273. case $state in
  274. (target)
  275. words=($line[1] "${words[@]}")
  276. (( CURRENT += 1 ))
  277. curcontext="${curcontext%:*:*}:rustup-target-command-$line[1]:"
  278. case $line[1] in
  279. (list)
  280. _arguments "${_arguments_options[@]}" \
  281. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  282. '--installed[List only installed targets]' \
  283. '-h[Prints help information]' \
  284. '--help[Prints help information]' \
  285. '-V[Prints version information]' \
  286. '--version[Prints version information]' \
  287. && ret=0
  288. ;;
  289. (install)
  290. _arguments "${_arguments_options[@]}" \
  291. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  292. '-h[Prints help information]' \
  293. '--help[Prints help information]' \
  294. '-V[Prints version information]' \
  295. '--version[Prints version information]' \
  296. ':target -- List of targets to install; "all" installs all available targets:_files' \
  297. && ret=0
  298. ;;
  299. (add)
  300. _arguments "${_arguments_options[@]}" \
  301. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  302. '-h[Prints help information]' \
  303. '--help[Prints help information]' \
  304. '-V[Prints version information]' \
  305. '--version[Prints version information]' \
  306. ':target -- List of targets to install; "all" installs all available targets:_files' \
  307. && ret=0
  308. ;;
  309. (uninstall)
  310. _arguments "${_arguments_options[@]}" \
  311. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  312. '-h[Prints help information]' \
  313. '--help[Prints help information]' \
  314. '-V[Prints version information]' \
  315. '--version[Prints version information]' \
  316. ':target:_files' \
  317. && ret=0
  318. ;;
  319. (remove)
  320. _arguments "${_arguments_options[@]}" \
  321. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  322. '-h[Prints help information]' \
  323. '--help[Prints help information]' \
  324. '-V[Prints version information]' \
  325. '--version[Prints version information]' \
  326. ':target:_files' \
  327. && ret=0
  328. ;;
  329. (help)
  330. _arguments "${_arguments_options[@]}" \
  331. '-h[Prints help information]' \
  332. '--help[Prints help information]' \
  333. '-V[Prints version information]' \
  334. '--version[Prints version information]' \
  335. && ret=0
  336. ;;
  337. esac
  338. ;;
  339. esac
  340. ;;
  341. (component)
  342. _arguments "${_arguments_options[@]}" \
  343. '-h[Prints help information]' \
  344. '--help[Prints help information]' \
  345. '-V[Prints version information]' \
  346. '--version[Prints version information]' \
  347. ":: :_rustup__component_commands" \
  348. "*::: :->component" \
  349. && ret=0
  350. case $state in
  351. (component)
  352. words=($line[1] "${words[@]}")
  353. (( CURRENT += 1 ))
  354. curcontext="${curcontext%:*:*}:rustup-component-command-$line[1]:"
  355. case $line[1] in
  356. (list)
  357. _arguments "${_arguments_options[@]}" \
  358. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  359. '--installed[List only installed components]' \
  360. '-h[Prints help information]' \
  361. '--help[Prints help information]' \
  362. '-V[Prints version information]' \
  363. '--version[Prints version information]' \
  364. && ret=0
  365. ;;
  366. (add)
  367. _arguments "${_arguments_options[@]}" \
  368. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  369. '--target=[]' \
  370. '-h[Prints help information]' \
  371. '--help[Prints help information]' \
  372. '-V[Prints version information]' \
  373. '--version[Prints version information]' \
  374. ':component:_files' \
  375. && ret=0
  376. ;;
  377. (remove)
  378. _arguments "${_arguments_options[@]}" \
  379. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  380. '--target=[]' \
  381. '-h[Prints help information]' \
  382. '--help[Prints help information]' \
  383. '-V[Prints version information]' \
  384. '--version[Prints version information]' \
  385. ':component:_files' \
  386. && ret=0
  387. ;;
  388. (help)
  389. _arguments "${_arguments_options[@]}" \
  390. '-h[Prints help information]' \
  391. '--help[Prints help information]' \
  392. '-V[Prints version information]' \
  393. '--version[Prints version information]' \
  394. && ret=0
  395. ;;
  396. esac
  397. ;;
  398. esac
  399. ;;
  400. (override)
  401. _arguments "${_arguments_options[@]}" \
  402. '-h[Prints help information]' \
  403. '--help[Prints help information]' \
  404. '-V[Prints version information]' \
  405. '--version[Prints version information]' \
  406. ":: :_rustup__override_commands" \
  407. "*::: :->override" \
  408. && ret=0
  409. case $state in
  410. (override)
  411. words=($line[1] "${words[@]}")
  412. (( CURRENT += 1 ))
  413. curcontext="${curcontext%:*:*}:rustup-override-command-$line[1]:"
  414. case $line[1] in
  415. (list)
  416. _arguments "${_arguments_options[@]}" \
  417. '-h[Prints help information]' \
  418. '--help[Prints help information]' \
  419. '-V[Prints version information]' \
  420. '--version[Prints version information]' \
  421. && ret=0
  422. ;;
  423. (add)
  424. _arguments "${_arguments_options[@]}" \
  425. '--path=[Path to the directory]' \
  426. '-h[Prints help information]' \
  427. '--help[Prints help information]' \
  428. '-V[Prints version information]' \
  429. '--version[Prints version information]' \
  430. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  431. && ret=0
  432. ;;
  433. (set)
  434. _arguments "${_arguments_options[@]}" \
  435. '--path=[Path to the directory]' \
  436. '-h[Prints help information]' \
  437. '--help[Prints help information]' \
  438. '-V[Prints version information]' \
  439. '--version[Prints version information]' \
  440. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  441. && ret=0
  442. ;;
  443. (remove)
  444. _arguments "${_arguments_options[@]}" \
  445. '--path=[Path to the directory]' \
  446. '--nonexistent[Remove override toolchain for all nonexistent directories]' \
  447. '-h[Prints help information]' \
  448. '--help[Prints help information]' \
  449. '-V[Prints version information]' \
  450. '--version[Prints version information]' \
  451. && ret=0
  452. ;;
  453. (unset)
  454. _arguments "${_arguments_options[@]}" \
  455. '--path=[Path to the directory]' \
  456. '--nonexistent[Remove override toolchain for all nonexistent directories]' \
  457. '-h[Prints help information]' \
  458. '--help[Prints help information]' \
  459. '-V[Prints version information]' \
  460. '--version[Prints version information]' \
  461. && ret=0
  462. ;;
  463. (help)
  464. _arguments "${_arguments_options[@]}" \
  465. '-h[Prints help information]' \
  466. '--help[Prints help information]' \
  467. '-V[Prints version information]' \
  468. '--version[Prints version information]' \
  469. && ret=0
  470. ;;
  471. esac
  472. ;;
  473. esac
  474. ;;
  475. (run)
  476. _arguments "${_arguments_options[@]}" \
  477. '--install[Install the requested toolchain if needed]' \
  478. '-h[Prints help information]' \
  479. '--help[Prints help information]' \
  480. '-V[Prints version information]' \
  481. '--version[Prints version information]' \
  482. ':toolchain -- Toolchain name, such as 'stable', 'nightly', or '1.8.0'. For more information see `rustup help toolchain`:_files' \
  483. ':command:_files' \
  484. && ret=0
  485. ;;
  486. (which)
  487. _arguments "${_arguments_options[@]}" \
  488. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  489. '-h[Prints help information]' \
  490. '--help[Prints help information]' \
  491. '-V[Prints version information]' \
  492. '--version[Prints version information]' \
  493. ':command:_files' \
  494. && ret=0
  495. ;;
  496. (docs)
  497. _arguments "${_arguments_options[@]}" \
  498. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  499. '--path[Only print the path to the documentation]' \
  500. '--alloc[The Rust core allocation and collections library]' \
  501. '--book[The Rust Programming Language book]' \
  502. '--cargo[The Cargo Book]' \
  503. '--core[The Rust Core Library]' \
  504. '--edition-guide[The Rust Edition Guide]' \
  505. '--nomicon[The Dark Arts of Advanced and Unsafe Rust Programming]' \
  506. '--proc_macro[A support library for macro authors when defining new macros]' \
  507. '--reference[The Rust Reference]' \
  508. '--rust-by-example[A collection of runnable examples that illustrate various Rust concepts and standard libraries]' \
  509. '--rustc[The compiler for the Rust programming language]' \
  510. '--rustdoc[Generate documentation for Rust projects]' \
  511. '--std[Standard library API documentation]' \
  512. '--test[Support code for rustc'\''s built in unit-test and micro-benchmarking framework]' \
  513. '--unstable-book[The Unstable Book]' \
  514. '--embedded-book[The Embedded Rust Book]' \
  515. '-h[Prints help information]' \
  516. '--help[Prints help information]' \
  517. '-V[Prints version information]' \
  518. '--version[Prints version information]' \
  519. '::topic -- Topic such as 'core', 'fn', 'usize', 'eprintln!', 'core::arch', 'alloc::format!', 'std::fs', 'std::fs::read_dir', 'std::io::Bytes', 'std::iter::Sum', 'std::io::error::Result' etc...:_files' \
  520. && ret=0
  521. ;;
  522. (doc)
  523. _arguments "${_arguments_options[@]}" \
  524. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  525. '--path[Only print the path to the documentation]' \
  526. '--alloc[The Rust core allocation and collections library]' \
  527. '--book[The Rust Programming Language book]' \
  528. '--cargo[The Cargo Book]' \
  529. '--core[The Rust Core Library]' \
  530. '--edition-guide[The Rust Edition Guide]' \
  531. '--nomicon[The Dark Arts of Advanced and Unsafe Rust Programming]' \
  532. '--proc_macro[A support library for macro authors when defining new macros]' \
  533. '--reference[The Rust Reference]' \
  534. '--rust-by-example[A collection of runnable examples that illustrate various Rust concepts and standard libraries]' \
  535. '--rustc[The compiler for the Rust programming language]' \
  536. '--rustdoc[Generate documentation for Rust projects]' \
  537. '--std[Standard library API documentation]' \
  538. '--test[Support code for rustc'\''s built in unit-test and micro-benchmarking framework]' \
  539. '--unstable-book[The Unstable Book]' \
  540. '--embedded-book[The Embedded Rust Book]' \
  541. '-h[Prints help information]' \
  542. '--help[Prints help information]' \
  543. '-V[Prints version information]' \
  544. '--version[Prints version information]' \
  545. '::topic -- Topic such as 'core', 'fn', 'usize', 'eprintln!', 'core::arch', 'alloc::format!', 'std::fs', 'std::fs::read_dir', 'std::io::Bytes', 'std::iter::Sum', 'std::io::error::Result' etc...:_files' \
  546. && ret=0
  547. ;;
  548. (man)
  549. _arguments "${_arguments_options[@]}" \
  550. '--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]' \
  551. '-h[Prints help information]' \
  552. '--help[Prints help information]' \
  553. '-V[Prints version information]' \
  554. '--version[Prints version information]' \
  555. ':command:_files' \
  556. && ret=0
  557. ;;
  558. (self)
  559. _arguments "${_arguments_options[@]}" \
  560. '-h[Prints help information]' \
  561. '--help[Prints help information]' \
  562. '-V[Prints version information]' \
  563. '--version[Prints version information]' \
  564. ":: :_rustup__self_commands" \
  565. "*::: :->self" \
  566. && ret=0
  567. case $state in
  568. (self)
  569. words=($line[1] "${words[@]}")
  570. (( CURRENT += 1 ))
  571. curcontext="${curcontext%:*:*}:rustup-self-command-$line[1]:"
  572. case $line[1] in
  573. (update)
  574. _arguments "${_arguments_options[@]}" \
  575. '-h[Prints help information]' \
  576. '--help[Prints help information]' \
  577. '-V[Prints version information]' \
  578. '--version[Prints version information]' \
  579. && ret=0
  580. ;;
  581. (uninstall)
  582. _arguments "${_arguments_options[@]}" \
  583. '-y[]' \
  584. '-h[Prints help information]' \
  585. '--help[Prints help information]' \
  586. '-V[Prints version information]' \
  587. '--version[Prints version information]' \
  588. && ret=0
  589. ;;
  590. (upgrade-data)
  591. _arguments "${_arguments_options[@]}" \
  592. '-h[Prints help information]' \
  593. '--help[Prints help information]' \
  594. '-V[Prints version information]' \
  595. '--version[Prints version information]' \
  596. && ret=0
  597. ;;
  598. (help)
  599. _arguments "${_arguments_options[@]}" \
  600. '-h[Prints help information]' \
  601. '--help[Prints help information]' \
  602. '-V[Prints version information]' \
  603. '--version[Prints version information]' \
  604. && ret=0
  605. ;;
  606. esac
  607. ;;
  608. esac
  609. ;;
  610. (set)
  611. _arguments "${_arguments_options[@]}" \
  612. '-h[Prints help information]' \
  613. '--help[Prints help information]' \
  614. '-V[Prints version information]' \
  615. '--version[Prints version information]' \
  616. ":: :_rustup__set_commands" \
  617. "*::: :->set" \
  618. && ret=0
  619. case $state in
  620. (set)
  621. words=($line[1] "${words[@]}")
  622. (( CURRENT += 1 ))
  623. curcontext="${curcontext%:*:*}:rustup-set-command-$line[1]:"
  624. case $line[1] in
  625. (default-host)
  626. _arguments "${_arguments_options[@]}" \
  627. '-h[Prints help information]' \
  628. '--help[Prints help information]' \
  629. '-V[Prints version information]' \
  630. '--version[Prints version information]' \
  631. ':host_triple:_files' \
  632. && ret=0
  633. ;;
  634. (profile)
  635. _arguments "${_arguments_options[@]}" \
  636. '-h[Prints help information]' \
  637. '--help[Prints help information]' \
  638. '-V[Prints version information]' \
  639. '--version[Prints version information]' \
  640. ':profile-name:(minimal default complete)' \
  641. && ret=0
  642. ;;
  643. (help)
  644. _arguments "${_arguments_options[@]}" \
  645. '-h[Prints help information]' \
  646. '--help[Prints help information]' \
  647. '-V[Prints version information]' \
  648. '--version[Prints version information]' \
  649. && ret=0
  650. ;;
  651. esac
  652. ;;
  653. esac
  654. ;;
  655. (completions)
  656. _arguments "${_arguments_options[@]}" \
  657. '-h[Prints help information]' \
  658. '--help[Prints help information]' \
  659. '-V[Prints version information]' \
  660. '--version[Prints version information]' \
  661. '::shell:(zsh bash fish powershell elvish)' \
  662. '::command:(rustup cargo)' \
  663. && ret=0
  664. ;;
  665. (help)
  666. _arguments "${_arguments_options[@]}" \
  667. '-h[Prints help information]' \
  668. '--help[Prints help information]' \
  669. '-V[Prints version information]' \
  670. '--version[Prints version information]' \
  671. && ret=0
  672. ;;
  673. esac
  674. ;;
  675. esac
  676. }
  677. (( $+functions[_rustup_commands] )) ||
  678. _rustup_commands() {
  679. local commands; commands=(
  680. "dump-testament:Dump information about the build" \
  681. "show:Show the active and installed toolchains or profiles" \
  682. "install:Update Rust toolchains" \
  683. "uninstall:Uninstall Rust toolchains" \
  684. "update:Update Rust toolchains and rustup" \
  685. "check:Check for updates to Rust toolchains" \
  686. "default:Set the default toolchain" \
  687. "toolchain:Modify or query the installed toolchains" \
  688. "target:Modify a toolchain's supported targets" \
  689. "component:Modify a toolchain's installed components" \
  690. "override:Modify directory toolchain overrides" \
  691. "run:Run a command with an environment configured for a given toolchain" \
  692. "which:Display which binary will be run for a given command" \
  693. "doc:Open the documentation for the current toolchain" \
  694. "man:View the man page for a given command" \
  695. "self:Modify the rustup installation" \
  696. "set:Alter rustup settings" \
  697. "completions:Generate tab-completion scripts for your shell" \
  698. "help:Prints this message or the help of the given subcommand(s)" \
  699. )
  700. _describe -t commands 'rustup commands' commands "$@"
  701. }
  702. (( $+functions[_rustup__show__active-toolchain_commands] )) ||
  703. _rustup__show__active-toolchain_commands() {
  704. local commands; commands=(
  705. )
  706. _describe -t commands 'rustup show active-toolchain commands' commands "$@"
  707. }
  708. (( $+functions[_rustup__add_commands] )) ||
  709. _rustup__add_commands() {
  710. local commands; commands=(
  711. )
  712. _describe -t commands 'rustup add commands' commands "$@"
  713. }
  714. (( $+functions[_rustup__component__add_commands] )) ||
  715. _rustup__component__add_commands() {
  716. local commands; commands=(
  717. )
  718. _describe -t commands 'rustup component add commands' commands "$@"
  719. }
  720. (( $+functions[_rustup__override__add_commands] )) ||
  721. _rustup__override__add_commands() {
  722. local commands; commands=(
  723. )
  724. _describe -t commands 'rustup override add commands' commands "$@"
  725. }
  726. (( $+functions[_rustup__target__add_commands] )) ||
  727. _rustup__target__add_commands() {
  728. local commands; commands=(
  729. )
  730. _describe -t commands 'rustup target add commands' commands "$@"
  731. }
  732. (( $+functions[_rustup__toolchain__add_commands] )) ||
  733. _rustup__toolchain__add_commands() {
  734. local commands; commands=(
  735. )
  736. _describe -t commands 'rustup toolchain add commands' commands "$@"
  737. }
  738. (( $+functions[_rustup__check_commands] )) ||
  739. _rustup__check_commands() {
  740. local commands; commands=(
  741. )
  742. _describe -t commands 'rustup check commands' commands "$@"
  743. }
  744. (( $+functions[_rustup__completions_commands] )) ||
  745. _rustup__completions_commands() {
  746. local commands; commands=(
  747. )
  748. _describe -t commands 'rustup completions commands' commands "$@"
  749. }
  750. (( $+functions[_rustup__component_commands] )) ||
  751. _rustup__component_commands() {
  752. local commands; commands=(
  753. "list:List installed and available components" \
  754. "add:Add a component to a Rust toolchain" \
  755. "remove:Remove a component from a Rust toolchain" \
  756. "help:Prints this message or the help of the given subcommand(s)" \
  757. )
  758. _describe -t commands 'rustup component commands' commands "$@"
  759. }
  760. (( $+functions[_rustup__default_commands] )) ||
  761. _rustup__default_commands() {
  762. local commands; commands=(
  763. )
  764. _describe -t commands 'rustup default commands' commands "$@"
  765. }
  766. (( $+functions[_rustup__set__default-host_commands] )) ||
  767. _rustup__set__default-host_commands() {
  768. local commands; commands=(
  769. )
  770. _describe -t commands 'rustup set default-host commands' commands "$@"
  771. }
  772. (( $+functions[_rustup__doc_commands] )) ||
  773. _rustup__doc_commands() {
  774. local commands; commands=(
  775. )
  776. _describe -t commands 'rustup doc commands' commands "$@"
  777. }
  778. (( $+functions[_docs_commands] )) ||
  779. _docs_commands() {
  780. local commands; commands=(
  781. )
  782. _describe -t commands 'docs commands' commands "$@"
  783. }
  784. (( $+functions[_rustup__docs_commands] )) ||
  785. _rustup__docs_commands() {
  786. local commands; commands=(
  787. )
  788. _describe -t commands 'rustup docs commands' commands "$@"
  789. }
  790. (( $+functions[_rustup__dump-testament_commands] )) ||
  791. _rustup__dump-testament_commands() {
  792. local commands; commands=(
  793. )
  794. _describe -t commands 'rustup dump-testament commands' commands "$@"
  795. }
  796. (( $+functions[_rustup__component__help_commands] )) ||
  797. _rustup__component__help_commands() {
  798. local commands; commands=(
  799. )
  800. _describe -t commands 'rustup component help commands' commands "$@"
  801. }
  802. (( $+functions[_rustup__help_commands] )) ||
  803. _rustup__help_commands() {
  804. local commands; commands=(
  805. )
  806. _describe -t commands 'rustup help commands' commands "$@"
  807. }
  808. (( $+functions[_rustup__override__help_commands] )) ||
  809. _rustup__override__help_commands() {
  810. local commands; commands=(
  811. )
  812. _describe -t commands 'rustup override help commands' commands "$@"
  813. }
  814. (( $+functions[_rustup__self__help_commands] )) ||
  815. _rustup__self__help_commands() {
  816. local commands; commands=(
  817. )
  818. _describe -t commands 'rustup self help commands' commands "$@"
  819. }
  820. (( $+functions[_rustup__set__help_commands] )) ||
  821. _rustup__set__help_commands() {
  822. local commands; commands=(
  823. )
  824. _describe -t commands 'rustup set help commands' commands "$@"
  825. }
  826. (( $+functions[_rustup__show__help_commands] )) ||
  827. _rustup__show__help_commands() {
  828. local commands; commands=(
  829. )
  830. _describe -t commands 'rustup show help commands' commands "$@"
  831. }
  832. (( $+functions[_rustup__target__help_commands] )) ||
  833. _rustup__target__help_commands() {
  834. local commands; commands=(
  835. )
  836. _describe -t commands 'rustup target help commands' commands "$@"
  837. }
  838. (( $+functions[_rustup__toolchain__help_commands] )) ||
  839. _rustup__toolchain__help_commands() {
  840. local commands; commands=(
  841. )
  842. _describe -t commands 'rustup toolchain help commands' commands "$@"
  843. }
  844. (( $+functions[_rustup__show__home_commands] )) ||
  845. _rustup__show__home_commands() {
  846. local commands; commands=(
  847. )
  848. _describe -t commands 'rustup show home commands' commands "$@"
  849. }
  850. (( $+functions[_rustup__install_commands] )) ||
  851. _rustup__install_commands() {
  852. local commands; commands=(
  853. )
  854. _describe -t commands 'rustup install commands' commands "$@"
  855. }
  856. (( $+functions[_rustup__target__install_commands] )) ||
  857. _rustup__target__install_commands() {
  858. local commands; commands=(
  859. )
  860. _describe -t commands 'rustup target install commands' commands "$@"
  861. }
  862. (( $+functions[_rustup__toolchain__install_commands] )) ||
  863. _rustup__toolchain__install_commands() {
  864. local commands; commands=(
  865. )
  866. _describe -t commands 'rustup toolchain install commands' commands "$@"
  867. }
  868. (( $+functions[_rustup__show__keys_commands] )) ||
  869. _rustup__show__keys_commands() {
  870. local commands; commands=(
  871. )
  872. _describe -t commands 'rustup show keys commands' commands "$@"
  873. }
  874. (( $+functions[_rustup__toolchain__link_commands] )) ||
  875. _rustup__toolchain__link_commands() {
  876. local commands; commands=(
  877. )
  878. _describe -t commands 'rustup toolchain link commands' commands "$@"
  879. }
  880. (( $+functions[_rustup__component__list_commands] )) ||
  881. _rustup__component__list_commands() {
  882. local commands; commands=(
  883. )
  884. _describe -t commands 'rustup component list commands' commands "$@"
  885. }
  886. (( $+functions[_rustup__override__list_commands] )) ||
  887. _rustup__override__list_commands() {
  888. local commands; commands=(
  889. )
  890. _describe -t commands 'rustup override list commands' commands "$@"
  891. }
  892. (( $+functions[_rustup__target__list_commands] )) ||
  893. _rustup__target__list_commands() {
  894. local commands; commands=(
  895. )
  896. _describe -t commands 'rustup target list commands' commands "$@"
  897. }
  898. (( $+functions[_rustup__toolchain__list_commands] )) ||
  899. _rustup__toolchain__list_commands() {
  900. local commands; commands=(
  901. )
  902. _describe -t commands 'rustup toolchain list commands' commands "$@"
  903. }
  904. (( $+functions[_rustup__man_commands] )) ||
  905. _rustup__man_commands() {
  906. local commands; commands=(
  907. )
  908. _describe -t commands 'rustup man commands' commands "$@"
  909. }
  910. (( $+functions[_rustup__override_commands] )) ||
  911. _rustup__override_commands() {
  912. local commands; commands=(
  913. "list:List directory toolchain overrides" \
  914. "set:Set the override toolchain for a directory" \
  915. "unset:Remove the override toolchain for a directory" \
  916. "help:Prints this message or the help of the given subcommand(s)" \
  917. )
  918. _describe -t commands 'rustup override commands' commands "$@"
  919. }
  920. (( $+functions[_rustup__set__profile_commands] )) ||
  921. _rustup__set__profile_commands() {
  922. local commands; commands=(
  923. )
  924. _describe -t commands 'rustup set profile commands' commands "$@"
  925. }
  926. (( $+functions[_rustup__show__profile_commands] )) ||
  927. _rustup__show__profile_commands() {
  928. local commands; commands=(
  929. )
  930. _describe -t commands 'rustup show profile commands' commands "$@"
  931. }
  932. (( $+functions[_rustup__component__remove_commands] )) ||
  933. _rustup__component__remove_commands() {
  934. local commands; commands=(
  935. )
  936. _describe -t commands 'rustup component remove commands' commands "$@"
  937. }
  938. (( $+functions[_rustup__override__remove_commands] )) ||
  939. _rustup__override__remove_commands() {
  940. local commands; commands=(
  941. )
  942. _describe -t commands 'rustup override remove commands' commands "$@"
  943. }
  944. (( $+functions[_rustup__remove_commands] )) ||
  945. _rustup__remove_commands() {
  946. local commands; commands=(
  947. )
  948. _describe -t commands 'rustup remove commands' commands "$@"
  949. }
  950. (( $+functions[_rustup__target__remove_commands] )) ||
  951. _rustup__target__remove_commands() {
  952. local commands; commands=(
  953. )
  954. _describe -t commands 'rustup target remove commands' commands "$@"
  955. }
  956. (( $+functions[_rustup__toolchain__remove_commands] )) ||
  957. _rustup__toolchain__remove_commands() {
  958. local commands; commands=(
  959. )
  960. _describe -t commands 'rustup toolchain remove commands' commands "$@"
  961. }
  962. (( $+functions[_rustup__run_commands] )) ||
  963. _rustup__run_commands() {
  964. local commands; commands=(
  965. )
  966. _describe -t commands 'rustup run commands' commands "$@"
  967. }
  968. (( $+functions[_rustup__self_commands] )) ||
  969. _rustup__self_commands() {
  970. local commands; commands=(
  971. "update:Download and install updates to rustup" \
  972. "uninstall:Uninstall rustup." \
  973. "upgrade-data:Upgrade the internal data format." \
  974. "help:Prints this message or the help of the given subcommand(s)" \
  975. )
  976. _describe -t commands 'rustup self commands' commands "$@"
  977. }
  978. (( $+functions[_rustup__override__set_commands] )) ||
  979. _rustup__override__set_commands() {
  980. local commands; commands=(
  981. )
  982. _describe -t commands 'rustup override set commands' commands "$@"
  983. }
  984. (( $+functions[_rustup__set_commands] )) ||
  985. _rustup__set_commands() {
  986. local commands; commands=(
  987. "default-host:The triple used to identify toolchains when not specified" \
  988. "profile:The default components installed" \
  989. "help:Prints this message or the help of the given subcommand(s)" \
  990. )
  991. _describe -t commands 'rustup set commands' commands "$@"
  992. }
  993. (( $+functions[_rustup__show_commands] )) ||
  994. _rustup__show_commands() {
  995. local commands; commands=(
  996. "active-toolchain:Show the active toolchain" \
  997. "home:Display the computed value of RUSTUP_HOME" \
  998. "profile:Show the current profile" \
  999. "keys:Display the known PGP keys" \
  1000. "help:Prints this message or the help of the given subcommand(s)" \
  1001. )
  1002. _describe -t commands 'rustup show commands' commands "$@"
  1003. }
  1004. (( $+functions[_rustup__target_commands] )) ||
  1005. _rustup__target_commands() {
  1006. local commands; commands=(
  1007. "list:List installed and available targets" \
  1008. "add:Add a target to a Rust toolchain" \
  1009. "remove:Remove a target from a Rust toolchain" \
  1010. "help:Prints this message or the help of the given subcommand(s)" \
  1011. )
  1012. _describe -t commands 'rustup target commands' commands "$@"
  1013. }
  1014. (( $+functions[_rustup__toolchain_commands] )) ||
  1015. _rustup__toolchain_commands() {
  1016. local commands; commands=(
  1017. "list:List installed toolchains" \
  1018. "install:Install or update a given toolchain" \
  1019. "uninstall:Uninstall a toolchain" \
  1020. "link:Create a custom toolchain by symlinking to a directory" \
  1021. "help:Prints this message or the help of the given subcommand(s)" \
  1022. )
  1023. _describe -t commands 'rustup toolchain commands' commands "$@"
  1024. }
  1025. (( $+functions[_rustup__self__uninstall_commands] )) ||
  1026. _rustup__self__uninstall_commands() {
  1027. local commands; commands=(
  1028. )
  1029. _describe -t commands 'rustup self uninstall commands' commands "$@"
  1030. }
  1031. (( $+functions[_rustup__target__uninstall_commands] )) ||
  1032. _rustup__target__uninstall_commands() {
  1033. local commands; commands=(
  1034. )
  1035. _describe -t commands 'rustup target uninstall commands' commands "$@"
  1036. }
  1037. (( $+functions[_rustup__toolchain__uninstall_commands] )) ||
  1038. _rustup__toolchain__uninstall_commands() {
  1039. local commands; commands=(
  1040. )
  1041. _describe -t commands 'rustup toolchain uninstall commands' commands "$@"
  1042. }
  1043. (( $+functions[_rustup__uninstall_commands] )) ||
  1044. _rustup__uninstall_commands() {
  1045. local commands; commands=(
  1046. )
  1047. _describe -t commands 'rustup uninstall commands' commands "$@"
  1048. }
  1049. (( $+functions[_rustup__override__unset_commands] )) ||
  1050. _rustup__override__unset_commands() {
  1051. local commands; commands=(
  1052. )
  1053. _describe -t commands 'rustup override unset commands' commands "$@"
  1054. }
  1055. (( $+functions[_rustup__self__update_commands] )) ||
  1056. _rustup__self__update_commands() {
  1057. local commands; commands=(
  1058. )
  1059. _describe -t commands 'rustup self update commands' commands "$@"
  1060. }
  1061. (( $+functions[_rustup__toolchain__update_commands] )) ||
  1062. _rustup__toolchain__update_commands() {
  1063. local commands; commands=(
  1064. )
  1065. _describe -t commands 'rustup toolchain update commands' commands "$@"
  1066. }
  1067. (( $+functions[_rustup__update_commands] )) ||
  1068. _rustup__update_commands() {
  1069. local commands; commands=(
  1070. )
  1071. _describe -t commands 'rustup update commands' commands "$@"
  1072. }
  1073. (( $+functions[_rustup__self__upgrade-data_commands] )) ||
  1074. _rustup__self__upgrade-data_commands() {
  1075. local commands; commands=(
  1076. )
  1077. _describe -t commands 'rustup self upgrade-data commands' commands "$@"
  1078. }
  1079. (( $+functions[_rustup__which_commands] )) ||
  1080. _rustup__which_commands() {
  1081. local commands; commands=(
  1082. )
  1083. _describe -t commands 'rustup which commands' commands "$@"
  1084. }
  1085. _rustup "$@"