Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

161 linhas
11 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. ## pkgs List available packages.
  45. ## release Build release of project.
  46. ## relup Create relup of releases.
  47. ## report Provide a crash report to be sent to the rebar3 issues page.
  48. ## shell Run shell with project apps and deps in path.
  49. ## tar Tar archive of release built of project.
  50. ## unlock Unlock dependencies.
  51. ## update Update package index.
  52. ## upgrade Upgrade dependencies.
  53. ## version Print version for rebar and current Erlang.
  54. ## xref Run cross reference analysis.
  55. ##
  56. ## plugins <task>:
  57. ## list List local and global plugins for this project
  58. ## upgrade Uprade plugins
  59. ##
  60. ## Run 'rebar3 help <TASK>' for details.
  61. # general options
  62. complete -f -c 'rebar3' -n 'not __fish_rebar3_needs_command' -l help -d 'Display the manual of a rebar3 command'
  63. complete -f -c 'rebar3' -s h -l help -d "Show the program options"
  64. complete -f -c 'rebar3' -s v -l version -d "Show version information"
  65. ## included tasks
  66. 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."
  67. ## TODO: 'as' needs to inspect the rebar.config's profiles element
  68. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a clean -d "Removes compiled beam files from apps."
  69. complete -f -c 'rebar3' -n '__fish_rebar3_using_command clean' -s a -l all -d "Clean all apps, including the dependencies"
  70. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a compile -d "Compile apps .app.src and .erl files."
  71. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a cover -d "Perform coverage analysis."
  72. complete -f -c 'rebar3' -n '__fish_rebar3_using_command cover' -s r -l reset -d "Resets all cover data"
  73. complete -f -c 'rebar3' -n '__fish_rebar3_using_command cover' -s v -l verbose -d "Prints coverage analysis in the terminal."
  74. ## ct
  75. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a ct -d "Run Common Tests."
  76. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l dir -d "Compile and run all test suites in the specified directories."
  77. 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."
  78. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l group -d "Test groups to run."
  79. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -l config -d "Config files to use when running tests."
  80. 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"
  81. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -s v -l verbose -d "Enable verbose output. Default: false"
  82. complete -f -c 'rebar3' -n '__fish_rebar3_using_command ct' -s c -l cover -d "Generate cover data"
  83. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a deps -d "List dependencies"
  84. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a dialyzer -d "Run the Dialyzer analyzer on the project."
  85. complete -f -c 'rebar3' -n '__fish_rebar3_using_command dialyzer' -s u -l update-plt -d "Enable updating the PLT. Default: true"
  86. complete -f -c 'rebar3' -n '__fish_rebar3_using_command dialyzer' -s s -l succ-typings -d "Enable success typing analysis. Default: true"
  87. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a do -d "Higher order provider for running multiple tasks in a sequence."
  88. 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, update, upgrade, version, xref,'
  89. ## TODO: do should understand plugins, but now it does not.
  90. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a edoc -d "Generate documentation using edoc."
  91. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a escriptize -d "Generate escript archive."
  92. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a eunit -d "Run EUnit Tests."
  93. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s c -l cover -d "Generate cover data"
  94. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s v -l verbose -d "Verbose output"
  95. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l app -d "List of applications to run tests for"
  96. complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l suite -d "Lists of test suites to run"
  97. 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."
  98. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a new -d "Create new project from templates."
  99. complete -f -c 'rebar3' -n '__fish_rebar3_using_command new' -s f -l force -d "Overwrite existing files"
  100. complete -f -c 'rebar3' -n '__fish_rebar3_using_command new' -a help -d "Display all variables and arguments for each template"
  101. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a pkgs -d "List available packages."
  102. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a release -d "Build release of project."
  103. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a relup -d "Create relup of releases."
  104. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a report -d "Provide a crash report to be sent to the rebar3 issues page."
  105. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a shell -d "Run shell with project apps and deps in path."
  106. 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."
  107. complete -f -c 'rebar3' -n '__fish_rebar3_using_command shell' -l name -d "equivalent to erlang's -name"
  108. complete -f -c 'rebar3' -n '__fish_rebar3_using_command shell' -l sname -d "equivalent to erlang's -sname"
  109. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a tar -d "Tar archive of release built of project."
  110. 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"
  111. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s v -l relvsn -d "Specify the version for the release"
  112. 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"
  113. 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"
  114. 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."
  115. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s h -l help -d "Print usage"
  116. 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"
  117. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s p -l path -d "Additional dir to add to the code path"
  118. 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"
  119. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s V -l verbose -d "Verbosity level, maybe between 0 and 3 [default: 2]"
  120. 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"
  121. 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"
  122. 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>"
  123. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s c -l config -d "The path to a config file [default: ]"
  124. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l overlay_vars -d "Path to a file of overlay variables"
  125. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l vm_args -d "Path to a file to use for vm.args"
  126. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l sys_config -d "Path to a file to use for sys.config"
  127. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l system_libs -d "Path to dir of Erlang system libs"
  128. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -l version -d "Print relx version"
  129. complete -f -c 'rebar3' -n '__fish_rebar3_using_command tar' -s r -l root -d "The project root directory"
  130. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a unlock -d "Unlock dependencies."
  131. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a update -d "Update package index."
  132. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a upgrade -d "Upgrade dependencies."
  133. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a version -d "Print version for rebar and current Erlang."
  134. complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a xref -d "Run cross reference analysis."