You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
16 KiB

  1. ## copy this to ~/.config/fish/completions
  2. function __fish_rebar3_needs_command
  3. set cmd (commandline -opc)
  4. if [ (count $cmd) -eq 1 -a $cmd[1] = 'rebar3' -o $cmd[1] = './rebar3' ]
  5. return 0
  6. end
  7. return 1
  8. end
  9. function __fish_rebar3_using_command
  10. set cmd (commandline -opc)
  11. if [ (count $cmd) -gt 1 ]
  12. if [ $argv[1] = $cmd[2] ]
  13. return 0
  14. end
  15. end
  16. return 1
  17. end
  18. ## ➜ ~ rebar3 --help
  19. ## Rebar3 is a tool for working with Erlang projects.
  20. ##
  21. ##
  22. ## Usage: rebar [-h] [-v] [<task>]
  23. ##
  24. ## -h, --help Print this help.
  25. ## -v, --version Show version information.
  26. ## <task> Task to run.
  27. ##
  28. ##
  29. ## Several tasks are available:
  30. ##
  31. ## as Higher order provider for running multiple tasks in a sequence as a certain profiles.
  32. ## clean Remove compiled beam files from apps.
  33. ## compile Compile apps .app.src and .erl files.
  34. ## cover Perform coverage analysis.
  35. ## ct Run Common Tests.
  36. ## deps List dependencies
  37. ## dialyzer Run the Dialyzer analyzer on the project.
  38. ## do Higher order provider for running multiple tasks in a sequence.
  39. ## edoc Generate documentation using edoc.
  40. ## escriptize Generate escript archive.
  41. ## eunit Run EUnit Tests.
  42. ## help Display a list of tasks or help for a given task or subtask.
  43. ## new Create new project from templates.
  44. ## path Print paths to build dirs in current profile.
  45. ## pkgs List available packages.
  46. ## release Build release of project.
  47. ## relup Create relup of releases.
  48. ## report Provide a crash report to be sent to the rebar3 issues page.
  49. ## shell Run shell with project apps and deps in path.
  50. ## tar Tar archive of release built of project.
  51. ## tree Print dependency tree.
  52. ## unlock Unlock dependencies.
  53. ## unstable Namespace providing commands that are still in flux.
  54. ## update Update package index.
  55. ## upgrade Upgrade dependencies.
  56. ## version Print version for rebar and current Erlang.
  57. ## xref Run cross reference analysis.
  58. ##
  59. ## plugins <task>:
  60. ## list List local and global plugins for this project
  61. ## upgrade Uprade plugins
  62. ##
  63. ## Run 'rebar3 help <TASK>' for details.
  64. # general options
  65. complete -f -c 'rebar3' -n 'not __fish_rebar3_needs_command' -l help -d 'Display the manual of a rebar3 command'
  66. complete -f -c 'rebar3' -s h -l help -d "Show the program options"
  67. complete -f -c 'rebar3' -s v -l version -d "Show version information"
  68. ## included tasks
  69. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a as -d "Higher order task which takes a profile name and list of tasks to run under that profile."
  70. ## TODO: 'as' needs to inspect the rebar.config's profiles element
  71. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a clean -d "Removes compiled beam files from apps."
  72. complete -f -c 'rebar3' -n '__fish_rebar3_using_command clean' -s a -l all -d "Clean all apps, including the dependencies"
  73. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a compile -d "Compile apps .app.src and .erl files."
  74. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a cover -d "Perform coverage analysis."
  75. complete -f -c 'rebar3' -n '__fish_rebar3_using_command cover' -s r -l reset -d "Resets all cover data"
  76. complete -f -c 'rebar3' -n '__fish_rebar3_using_command cover' -s v -l verbose -d "Prints coverage analysis in the terminal."
  77. ## ct
  78. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a ct -d "Run Common Tests."
  79. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l dir -d "Compile and run all test suites in the specified directories."
  80. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l suites -d "Compile and run all test suites specified. Must be specified by full path, either absolute or relative to the current directory."
  81. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l group -d "Test groups to run."
  82. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l label -d "Test label."
  83. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l config -d "Config files to use when running tests."
  84. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l allow_user_terms -d "Allow user defined terms in config files."
  85. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l logdir -d "The directory in which test logs will be written. Default: _build/test/logs"
  86. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l logopts -d "Options for common test logging."
  87. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l verbosity -d "Verbosity."
  88. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -s c -l cover -d "Generate cover data."
  89. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l include -d "Include folders."
  90. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l repeat -d "How often to repeat tests."
  91. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l duration -d "Max runtime (format: HHMMSS)."
  92. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l until -d "Run until (format: HHMMSS)."
  93. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l force_stop -d "Force stop on test timeout."
  94. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l basic_html -d "Show basic HTML."
  95. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l stylesheet -d "CSS stylesheet to apply to html output."
  96. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l decrypt_key -d "Path to key for decrypting config."
  97. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l decrypt_file -d "Path to file containing key for decrypting config."
  98. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l abort_if_missing_suites -d "Abort if suites are missing."
  99. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l multiply_timetraps -d "Multiply timetraps."
  100. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l scale_timetraps -d "Scale timetraps."
  101. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l create_priv_dir -d "Create priv dir (auto_per_run | auto_per_tc | manual_per_tc)."
  102. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l include -d "Directories containing additional include files."
  103. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -s v -l verbose -d "Enable verbose output. Default: false."
  104. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l auto_compile -d "Let common test compile test suites instead of rebar3."
  105. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a deps -d "List dependencies"
  106. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a dialyzer -d "Run the Dialyzer analyzer on the project."
  107. complete -f -c 'rebar3' -n '__fish_rebar3_using_command dialyzer' -s u -l update-plt -d "Enable updating the PLT. Default: true"
  108. complete -f -c 'rebar3' -n '__fish_rebar3_using_command dialyzer' -s s -l succ-typings -d "Enable success typing analysis. Default: true"
  109. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a do -d "Higher order provider for running multiple tasks in a sequence."
  110. complete -f -c 'rebar3' -n '__fish_rebar3_using_command do' -a 'compile, clean, ct, cover, deps, dialyzer, edoc, eunit, help, new, pkgs, release, relup, report, shell, tar, unlock, unstable, update, upgrade, version, xref,'
  111. ## TODO: do should understand plugins, but now it does not.
  112. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a edoc -d "Generate documentation using edoc."
  113. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a escriptize -d "Generate escript archive."
  114. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a eunit -d "Run EUnit Tests."
  115. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l app -d "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`"
  116. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l application -d "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`"
  117. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s c -l cover -d "Generate cover data"
  118. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s d -l dir -d "Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`"
  119. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunut' -s e -l error_on_warning -d "Error on invalid test specifications instead of warning"
  120. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s f -l file -d "Comma separated list of files to load tests from. Equivalent to `[{file, File}]`"
  121. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s m -l module -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`"
  122. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s s -l suite -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`"
  123. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s v -l verbose -d "Verbose output"
  124. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l suite -d "Lists of test suites to run"
  125. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a help -d "Display a list of tasks or help for a given task or subtask."
  126. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a new -d "Create new project from templates."
  127. complete -f -c 'rebar3' -n '__fish_rebar3_using_command new' -s f -l force -d "Overwrite existing files"
  128. complete -f -c 'rebar3' -n '__fish_rebar3_using_command new' -a help -d "Display all variables and arguments for each template"
  129. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a paths -d "Print paths to build dirs in current profile."
  130. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l app -d "Comma separated list of applications to return paths for."
  131. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l base -d "Return the `base` path of the current profile."
  132. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l bin -d "Return the `bin` path of the current profile."
  133. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l ebin -d "Return all `ebin` paths of the current profile`s applications."
  134. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l lib -d "Return the `lib` path of the current profile."
  135. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l priv -d "Return the `priv` path of the current profile`s applications."
  136. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -s s -l separator -d "In case of multiple return paths, the separator character to use to join them."
  137. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l src -d "Return the `src` path of the current profile`s applications."
  138. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command paths' -l rel -d "Return the `rel` path of the current profile."
  139. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a pkgs -d "List available packages."
  140. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a release -d "Build release of project."
  141. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a relup -d "Create relup of releases."
  142. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a report -d "Provide a crash report to be sent to the rebar3 issues page."
  143. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a shell -d "Run shell with project apps and deps in path."
  144. complete -f -c 'rebar3' -n '__fish_rebar3_using_command shell' -l config -d "Allows to load a config file, if any. Defaults to the sys_config entry defined for relx if present."
  145. complete -f -c 'rebar3' -n '__fish_rebar3_using_command shell' -l name -d "equivalent to erlang`s -name"
  146. complete -f -c 'rebar3' -n '__fish_rebar3_using_command shell' -l sname -d "equivalent to erlang`s -sname"
  147. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a tar -d "Tar archive of release built of project."
  148. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s n -l relname -d "Specify the name for the release that will be generated"
  149. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s v -l relvsn -d "Specify the version for the release"
  150. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s g -l goal -d "Specify a target constraint on the system. These are usually the OTP"
  151. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s u -l upfrom -d "Only valid with relup target, specify the release to upgrade from"
  152. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s o -l output-dir -d "The output directory for the release. This is `./` by default."
  153. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s h -l help -d "Print usage"
  154. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s l -l lib-dir -d "Additional dir that should be searched for OTP Apps"
  155. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s p -l path -d "Additional dir to add to the code path"
  156. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l default-libs -d "Whether to use the default system added lib dirs (means you must add them all manually). Default is true"
  157. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s V -l verbose -d "Verbosity level, maybe between 0 and 3 [default: 2]"
  158. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s d -l dev-mode -d "Symlink the applications and configuration into the release instead of copying"
  159. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s i -l include-erts -d "If true include a copy of erts used to build with, if a path include erts at that path. If false, do not include erts"
  160. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s a -l override -d "Provide an app name and a directory to override in the form <appname>:<app directory>"
  161. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s c -l config -d "The path to a config file [default: ]"
  162. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l overlay_vars -d "Path to a file of overlay variables"
  163. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l vm_args -d "Path to a file to use for vm.args"
  164. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l sys_config -d "Path to a file to use for sys.config"
  165. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l system_libs -d "Path to dir of Erlang system libs"
  166. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l version -d "Print relx version"
  167. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s r -l root -d "The project root directory"
  168. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a tree -d "Print depdency tree."
  169. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command tree' -s v -l verbose -d "Print repo and branch/tag/ref for git and hg deps."
  170. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a unlock -d "Unlock dependencies."
  171. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a unstable -d "Namespace providing commands that are still in flux."
  172. complete -f -c 'rebar3' -n '__fish_rebar3_using_command unstable' -a 'install upgrade'
  173. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a update -d "Update package index."
  174. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a upgrade -d "Upgrade dependencies."
  175. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a version -d "Print version for rebar and current Erlang."
  176. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a xref -d "Run cross reference analysis."