nim.zsh-completion 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. #compdef nim
  2. _nim() {
  3. _arguments -C \
  4. ':command:((
  5. {compile,c}\:compile\ project\ with\ default\ code\ generator\ C
  6. doc\:generate\ the\ documentation\ for\ inputfile
  7. {compileToC,cc}\:compile\ project\ with\ C\ code\ generator
  8. {compileToCpp,cpp}\:compile\ project\ to\ C++\ code
  9. {compileToOC,objc}\:compile\ project\ to\ Objective\ C\ code
  10. js\:compile\ project\ to\ Javascript
  11. e\:run\ a\ Nimscript\ file
  12. rst2html\:convert\ a\ reStructuredText\ file\ to\ HTML
  13. rst2tex\:convert\ a\ reStructuredText\ file\ to\ TeX
  14. jsondoc\:extract\ the\ documentation\ to\ a\ json\ file
  15. buildIndex\:build\ an\ index\ for\ the\ whole\ documentation
  16. genDepend\:generate\ a\ DOT\ file\ containing\ the\ module\ dependency\ graph
  17. dump\:dump\ all\ defined\ conditionals\ and\ search\ paths
  18. check\:checks\ the\ project\ for\ syntax\ and\ semantic
  19. ))' \
  20. '*-r[run the application]' \
  21. '*--run[run the application]' \
  22. '*-p=[add path to search paths]' \
  23. '*--path=[add path to search paths]' \
  24. '*-d=[define a conditional symbol]' \
  25. '*--define=[define a conditional symbol]' \
  26. '*-u=[undefine a conditional symbol]' \
  27. '*--undef=[undefine a conditional symbol]' \
  28. '*-f[force rebuilding of all modules]' \
  29. '*--forceBuild[force rebuilding of all modules]' \
  30. '*--stackTrace=on[turn stack tracing on]' \
  31. '*--stackTrace=off[turn stack tracing off]' \
  32. '*--lineTrace=on[turn line tracing on]' \
  33. '*--lineTrace=off[turn line tracing off]' \
  34. '*--threads=on[turn support for multi-threading on]' \
  35. '*--threads=off[turn support for multi-threading off]' \
  36. '*-x=on[turn all runtime checks on]' \
  37. '*-x=off[turn all runtime checks off]' \
  38. '*--checks=on[turn all runtime checks on]' \
  39. '*--checks=off[turn all runtime checks off]' \
  40. '*--objChecks=on[turn obj conversion checks on]' \
  41. '*--objChecks=off[turn obj conversion checks off]' \
  42. '*--fieldChecks=on[turn case variant field checks on]' \
  43. '*--fieldChecks=off[turn case variant field checks off]' \
  44. '*--rangeChecks=on[turn range checks on]' \
  45. '*--rangeChecks=off[turn range checks off]' \
  46. '*--boundChecks=on[turn bound checks on]' \
  47. '*--boundChecks=off[turn bound checks off]' \
  48. '*--overflowChecks=on[turn int over-/underflow checks on]' \
  49. '*--overflowChecks=off[turn int over-/underflow checks off]' \
  50. '*-a[turn assertions on]' \
  51. '*-a[turn assertions off]' \
  52. '*--assertions=on[turn assertions on]' \
  53. '*--assertions=off[turn assertions off]' \
  54. '*--floatChecks=on[turn all floating point (NaN/Inf) checks on]' \
  55. '*--floatChecks=off[turn all floating point (NaN/Inf) checks off]' \
  56. '*--nanChecks=on[turn NaN checks on]' \
  57. '*--nanChecks=off[turn NaN checks off]' \
  58. '*--infChecks=on[turn Inf checks on]' \
  59. '*--infChecks=off[turn Inf checks off]' \
  60. '*--nilChecks=on[turn nil checks on]' \
  61. '*--nilChecks=off[turn nil checks off]' \
  62. '*--opt=none[do not optimize]' \
  63. '*--opt=speed[optimize for speed|size - use -d:release for a release build]' \
  64. '*--opt=size[optimize for size]' \
  65. '*--debugger:native[use native debugger (gdb)]' \
  66. '*--app=console[generate a console app]' \
  67. '*--app=gui[generate a GUI app]' \
  68. '*--app=lib[generate a dynamic library]' \
  69. '*--app=staticlib[generate a static library]' \
  70. '*--cpu=alpha[compile for Alpha architecture]' \
  71. '*--cpu=amd64[compile for x86_64 architecture]' \
  72. '*--cpu=arm[compile for ARM architecture]' \
  73. '*--cpu=arm64[compile for ARM64 architecture]' \
  74. '*--cpu=avr[compile for AVR architecture]' \
  75. '*--cpu=esp[compile for ESP architecture]' \
  76. '*--cpu=hppa[compile for HPPA architecture]' \
  77. '*--cpu=i386[compile for i386 architecture]' \
  78. '*--cpu=ia64[compile for ia64 architecture]' \
  79. '*--cpu=js[compile to JavaScript]' \
  80. '*--cpu=m68k[compile for m68k architecture]' \
  81. '*--cpu=mips[compile for MIPS architecture]' \
  82. '*--cpu=mipsel[compile for MIPS EL architecture]' \
  83. '*--cpu=mips64[compile for MIPS64 architecture]' \
  84. '*--cpu=mips64el[compile for MIPS64 EL architecture]' \
  85. '*--cpu=msp430[compile for msp430 architecture]' \
  86. '*--cpu=nimvm[compile for Nim VM]' \
  87. '*--cpu=powerpc[compile for PowerPC architecture]' \
  88. '*--cpu=powerpc64[compile for PowerPC64 architecture]' \
  89. '*--cpu=powerpc64el[compile for PowerPC64 EL architecture]' \
  90. '*--cpu=riscv32[compile for RISC-V 32 architecture]' \
  91. '*--cpu=riscv64[compile for RISC-V 64 architecture]' \
  92. '*--cpu=sparc[compile for SPARC architecture]' \
  93. '*--cpu=sparc64[compile for SPARC64 architecture]' \
  94. '*--cpu=vm[compile for Nim VM]' \
  95. '*--cpu=wasm32[compile to WASM 32]' \
  96. '*--gc=refc[use reference counting garbage collection]' \
  97. '*--gc=arc[use ARC garbage collection]' \
  98. '*--gc=orc[use ORC garbage collection]' \
  99. '*--gc=markAndSweep[use mark-and-sweep garbage collection]' \
  100. '*--gc=boehm[use Boehm garbage collection]' \
  101. '*--gc=go[use Go garbage collection]' \
  102. '*--gc=regions[use region-based memory management]' \
  103. '*--gc=none[disable garbage collection]' \
  104. '*--os=Standalone[generate a stand-alone executable]' \
  105. '*--os=AIX[compile for AIX]' \
  106. '*--os=Amiga[compile for Amiga OS]' \
  107. '*--os=Android[compile for Android]' \
  108. '*--os=Any[compile for any OS]' \
  109. '*--os=Atari[compile for Atari]' \
  110. '*--os=DOS[compile for DOS]' \
  111. '*--os=DragonFly[compile for DragonFly]' \
  112. '*--os=FreeBSD[compile for FreeBSD]' \
  113. '*--os=FreeRTOS[compile for FreeRTOS]' \
  114. '*--os=Genode[compile for Genode]' \
  115. '*--os=Haiku[compile for Haiku]' \
  116. '*--os=iOS[compile for iOS]' \
  117. '*--os=Irix[compile for Irix]' \
  118. '*--os=Linux[compile for Linux]' \
  119. '*--os=MacOS[compile for MacOS]' \
  120. '*--os=MacOSX[compile for MacOSX]' \
  121. '*--os=MorphOS[compile for MorphOS]' \
  122. '*--os=NetBSD[compile for NetBSD]' \
  123. '*--os=Netware[compile for Netware]' \
  124. '*--os=NimVM[compile for NimVM]' \
  125. '*--os=NintendoSwitch[compile for NintendoSwitch]' \
  126. '*--os=OS2[compile for OS2]' \
  127. '*--os=OpenBSD[compile for OpenBSD]' \
  128. '*--os=PalmOS[compile for PalmOS]' \
  129. '*--os=QNX[compile for QNX]' \
  130. '*--os=SkyOS[compile for SkyOS]' \
  131. '*--os=Solaris[compile for Solaris]' \
  132. '*--os=VxWorks[compile for VxWorks]' \
  133. '*--os=Windows[compile for Windows]' \
  134. '*--os=JS[generate javascript]' \
  135. '*--panics=off[turn panics into process terminations: off by default]' \
  136. '*--panics=on[turn panics into process terminations]' \
  137. '*--verbosity=0[set verbosity to 0]' \
  138. '*--verbosity=1[set verbosity to 1 (default)]' \
  139. '*--verbosity=2[set verbosity to 2]' \
  140. '*--verbosity=3[set verbosity to 3]' \
  141. '*--hints=on[print compilation hints]' \
  142. '*--hints=off[disable compilation hints]' \
  143. '*--hints=list[print compilation hints list]' \
  144. ':filename:_files -g"*.nim"'
  145. }
  146. _nim "$@"