Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shell completion scripts #590

Closed
paulo-ferraz-oliveira opened this issue Sep 21, 2024 · 7 comments · Fixed by #591
Closed

Add shell completion scripts #590

paulo-ferraz-oliveira opened this issue Sep 21, 2024 · 7 comments · Fixed by #591

Comments

@paulo-ferraz-oliveira
Copy link
Collaborator

... and maybe when that's done update the Homebrew formula.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

I vote for, at least, Bash and Zsh.

@elbrujohalcon
Copy link
Member

Yeah, great idea.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

I just need to make a full tree of them, now, since this should not be that difficult to achieve (kerl has them, these days, and so does rebar3, so we have examples aplenty).

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Here's what I have atm:

command description
--help (-h) Show help information
--config <file> (-c <file>) Provide path to a non-default configuration file
--commands Show available commands
git-branch <branch|commit> Execute on files changed since <branch> or <commit>
git-hook Execute on the pre-commit hook Git-staged files
install git-hook Install as a Git pre-commit hook
rock [<file>...] Execute on identified files
--output_format <plain|colors|parsable> Control the output format
--parallel <auto|n> (-P <auto|n>) Analyze files concurrently
--quiet (-q) Suppress all output
--verbose (-V) Enable verbose output
--version (-v) Show the current version
--code_path <dir> (-p <dir>) Add <dir> to analysis code path
--keep_rocking (-k) Don't stop on errors

@elbrujohalcon
Copy link
Member

Yeah… you can simply elvis --help, right?

elvis @ master % _build/default/bin/elvis --help
Usage: elvis [-h] [-c <config>] [--commands]
             [--output-format <output_format>] [-P <parallel>] [-q] [-V]
             [-v] [-p <code_path>] [-k]

  -h, --help          Show this help information.
  -c, --config        Provide the path to the configuration file. When
                      none is provided elvis checks if there's an
                      elvis.config file.
  --commands          Show available commands.
  --output-format     It allows you to display the results in plain text.
                      When none is provided elvis displays the results in
                      colors. The options allowed are (plain | colors |
                      parsable).
  -P, --parallel      Allows to analyze files concurrently. Provide max
                      number of concurrent workers, or specify "auto" to
                      peek default value based on the number of schedulers.
  -q, --quiet         Suppress all output.
  -V, --verbose       Enable verbose output.
  -v, --version       Output the current elvis version.
  -p, --code-path     Add the directory in the code path.
  -k, --keep-rocking  Won't stop rocking on first error when given a list
                      of files

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Yeah, but:

  1. I don't wanna trust the README
  2. I don't wanna trust --help
  3. I wanna trust the code

And, as you can see, --help doesn't mention any of the commands. 😄 At the same time it doesn't show where stuff like <config> is actually used.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

... and it's now in Homebrew already. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants