nim.zsh-completion 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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|endb[use native debugger (gdb) | ENDB (experimental)]' \
  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. ':filename:_files -g"*.nim"'
  71. }
  72. _nim "$@"