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 aliases for subcommand #389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Jujumba
Copy link

@Jujumba Jujumba commented Dec 6, 2024

This PR adds several "cargo-like" aliases for common subcommands, presumably:

  • b for build
  • r for run
  • c for check
  • ls for list
  • cov for coverage

The help message after the added changes:

A `cargo` subcommand for fuzzing with `libFuzzer`! Easy to use!

Usage: cargo-fuzz <COMMAND>

Commands:
  init      Initialize the fuzz directory
  add       Add a new fuzz target
  build     Build fuzz targets [aliases: b]
  check     Type-check the fuzz targets [aliases: c]
  fmt       Print the `std::fmt::Debug` output for an input
  list      List all the existing fuzz targets [aliases: ls]
  run       Run a fuzz target [aliases: r]
  cmin      Minify a corpus
  tmin      Minify a test case
  coverage  Run program on the generated corpus and generate coverage information [aliases: cov]
  help      Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help information
  -V, --version  Print version information

So it means that one, for example, can write

cargo fuzz b <target>

instead of

cargo fuzz build <target>

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable! Thanks!

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 this pull request may close these issues.

2 participants