cargo: updates from 0.82.0

This commit is contained in:
rsteube 2024-10-03 20:47:52 +02:00
parent 9f18adb314
commit aa570e3980
36 changed files with 88 additions and 116 deletions

View File

@ -76,6 +76,15 @@ type TargetOpts struct {
Test bool
}
func (t TargetOpts) Default() TargetOpts {
t.Bench = true
t.Bin = true
t.Example = true
t.Lib = true
t.Test = true
return t
}
func (t *TargetOpts) Includes(kinds []string) bool {
var match bool
for _, kind := range kinds {

View File

@ -13,7 +13,7 @@ import (
var addCmd = &cobra.Command{
Use: "add",
Short: "Add dependency to a Cargo.toml manifest file",
Short: "Add dependencies to a Cargo.toml manifest file",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("add"),
}
@ -25,18 +25,19 @@ func init() {
addCmd.Flags().Bool("build", false, "Add as build dependency")
addCmd.Flags().Bool("default-features", false, "Re-enable the default features")
addCmd.Flags().Bool("dev", false, "Add as development dependency")
addCmd.Flags().Bool("dry-run", false, "Don't actually write the manifest")
addCmd.Flags().BoolP("dry-run", "n", false, "Don't actually write the manifest")
addCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
addCmd.Flags().String("git", "", "Git repository location")
addCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
addCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages (unstable)")
addCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
addCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
addCmd.Flags().Bool("no-default-features", false, "Disable the default features")
addCmd.Flags().Bool("no-optional", false, "Mark the dependency as required")
addCmd.Flags().Bool("no-public", false, "Mark the dependency as private (unstable)")
addCmd.Flags().Bool("optional", false, "Mark the dependency as optional")
addCmd.Flags().StringP("package", "p", "", "Package to modify")
addCmd.Flags().String("path", "", "Filesystem path to local crate to add")
addCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
addCmd.Flags().Bool("public", false, "Mark the dependency as public (unstable)")
addCmd.Flags().String("registry", "", "Package registry for this dependency")
addCmd.Flags().String("rename", "", "Rename the dependency")
addCmd.Flags().String("rev", "", "Git reference to download the crate from")

View File

@ -20,7 +20,7 @@ func init() {
benchCmd.Flags().Bool("all-features", false, "Activate all available features")
benchCmd.Flags().Bool("all-targets", false, "Benchmark all targets")
benchCmd.Flags().StringSlice("bench", []string{}, "Benchmark only the specified bench target")
benchCmd.Flags().Bool("benches", false, "Benchmark all benches")
benchCmd.Flags().Bool("benches", false, "Benchmark all bench targets")
benchCmd.Flags().StringSlice("bin", []string{}, "Benchmark only the specified binary")
benchCmd.Flags().Bool("bins", false, "Benchmark all binaries")
benchCmd.Flags().StringSlice("example", []string{}, "Benchmark only the specified example")
@ -29,8 +29,7 @@ func init() {
benchCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
benchCmd.Flags().BoolP("help", "h", false, "Print help")
benchCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
benchCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
benchCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
benchCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
benchCmd.Flags().Bool("lib", false, "Benchmark only this package's library")
benchCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
benchCmd.Flags().StringSlice("message-format", []string{}, "Error format")
@ -39,11 +38,10 @@ func init() {
benchCmd.Flags().Bool("no-run", false, "Compile, but don't run benchmarks")
benchCmd.Flags().StringSliceP("package", "p", []string{}, "Package to run benchmarks for")
benchCmd.Flags().String("profile", "", "Build artifacts with the specified profile")
benchCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
benchCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
benchCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
benchCmd.Flags().StringSlice("test", []string{}, "Benchmark only the specified test target")
benchCmd.Flags().Bool("tests", false, "Benchmark all tests")
benchCmd.Flags().Bool("tests", false, "Benchmark all test targets")
benchCmd.Flags().String("timings", "", "Timing output formats (unstable) (comma separated): html, json")
benchCmd.Flags().Bool("unit-graph", false, "Output build graph in JSON (unstable)")
benchCmd.Flags().Bool("workspace", false, "Benchmark all packages in the workspace")

View File

@ -8,7 +8,6 @@ import (
var buildCmd = &cobra.Command{
Use: "build",
Aliases: []string{"b"},
Short: "Compile a local package and all of its dependencies",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("build"),
@ -20,8 +19,9 @@ func init() {
buildCmd.Flags().Bool("all", false, "Alias for --workspace (deprecated)")
buildCmd.Flags().Bool("all-features", false, "Activate all available features")
buildCmd.Flags().Bool("all-targets", false, "Build all targets")
buildCmd.Flags().String("artifact-dir", "", "Copy final artifacts to this directory (unstable)")
buildCmd.Flags().StringSlice("bench", []string{}, "Build only the specified bench target")
buildCmd.Flags().Bool("benches", false, "Build all benches")
buildCmd.Flags().Bool("benches", false, "Build all bench targets")
buildCmd.Flags().StringSlice("bin", []string{}, "Build only the specified binary")
buildCmd.Flags().Bool("bins", false, "Build all binaries")
buildCmd.Flags().Bool("build-plan", false, "Output the build plan in JSON (unstable)")
@ -32,21 +32,19 @@ func init() {
buildCmd.Flags().Bool("future-incompat-report", false, "Outputs a future incompatibility report at the end of the build")
buildCmd.Flags().BoolP("help", "h", false, "Print help")
buildCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
buildCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
buildCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
buildCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
buildCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
buildCmd.Flags().Bool("lib", false, "Build only this package's library")
buildCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
buildCmd.Flags().StringSlice("message-format", []string{}, "Error format")
buildCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
buildCmd.Flags().String("out-dir", "", "Copy final artifacts to this directory (unstable)")
buildCmd.Flags().StringSliceP("package", "p", []string{}, "Package to build (see `cargo help pkgid`)")
buildCmd.Flags().String("profile", "", "Build artifacts with the specified profile")
buildCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
buildCmd.Flags().BoolP("release", "r", false, "Build artifacts in release mode, with optimizations")
buildCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
buildCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
buildCmd.Flags().StringSlice("test", []string{}, "Build only the specified test target")
buildCmd.Flags().Bool("tests", false, "Build all tests")
buildCmd.Flags().Bool("tests", false, "Build all test targets")
buildCmd.Flags().String("timings", "", "Timing output formats (unstable) (comma separated): html, json")
buildCmd.Flags().Bool("unit-graph", false, "Output build graph in JSON (unstable)")
buildCmd.Flags().Bool("workspace", false, "Build all packages in the workspace")
@ -54,6 +52,7 @@ func init() {
rootCmd.AddCommand(buildCmd)
carapace.Gen(buildCmd).FlagCompletion(carapace.ActionMap{
"artifact-dir": carapace.ActionDirectories(),
"bench": action.ActionTargets(buildCmd, action.TargetOpts{Bench: true}),
"bin": action.ActionTargets(buildCmd, action.TargetOpts{Bin: true}),
"example": action.ActionTargets(buildCmd, action.TargetOpts{Example: true}),
@ -61,7 +60,6 @@ func init() {
"features": action.ActionFeatures(buildCmd).UniqueList(","),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
"out-dir": carapace.ActionDirectories(),
"package": action.ActionDependencies(buildCmd, true),
"profile": action.ActionProfiles(buildCmd),
"target-dir": carapace.ActionDirectories(),

View File

@ -8,7 +8,6 @@ import (
var checkCmd = &cobra.Command{
Use: "check",
Aliases: []string{"c"},
Short: "Check a local package and all of its dependencies for errors",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("check"),
@ -21,7 +20,7 @@ func init() {
checkCmd.Flags().Bool("all-features", false, "Activate all available features")
checkCmd.Flags().Bool("all-targets", false, "Check all targets")
checkCmd.Flags().StringSlice("bench", []string{}, "Check only the specified bench target")
checkCmd.Flags().Bool("benches", false, "Check all benches")
checkCmd.Flags().Bool("benches", false, "Check all bench targets")
checkCmd.Flags().StringSlice("bin", []string{}, "Check only the specified binary")
checkCmd.Flags().Bool("bins", false, "Check all binaries")
checkCmd.Flags().StringSlice("example", []string{}, "Check only the specified example")
@ -31,20 +30,19 @@ func init() {
checkCmd.Flags().Bool("future-incompat-report", false, "Outputs a future incompatibility report at the end of the build")
checkCmd.Flags().BoolP("help", "h", false, "Print help")
checkCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
checkCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
checkCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
checkCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
checkCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
checkCmd.Flags().Bool("lib", false, "Check only this package's library")
checkCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
checkCmd.Flags().StringSlice("message-format", []string{}, "Error format")
checkCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
checkCmd.Flags().StringSliceP("package", "p", []string{}, "Package(s) to check")
checkCmd.Flags().String("profile", "", "Check artifacts with the specified profile")
checkCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
checkCmd.Flags().BoolP("release", "r", false, "Check artifacts in release mode, with optimizations")
checkCmd.Flags().StringSlice("target", []string{}, "Check for the target triple")
checkCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
checkCmd.Flags().StringSlice("test", []string{}, "Check only the specified test target")
checkCmd.Flags().Bool("tests", false, "Check all tests")
checkCmd.Flags().Bool("tests", false, "Check all test targets")
checkCmd.Flags().String("timings", "", "Timing output formats (unstable) (comma separated): html, json")
checkCmd.Flags().Bool("unit-graph", false, "Output build graph in JSON (unstable)")
checkCmd.Flags().Bool("workspace", false, "Check all packages in the workspace")

View File

@ -17,11 +17,11 @@ func init() {
carapace.Gen(cleanCmd).Standalone()
cleanCmd.Flags().Bool("doc", false, "Whether or not to clean just the documentation directory")
cleanCmd.Flags().BoolP("dry-run", "n", false, "Display what would be deleted without deleting anything")
cleanCmd.Flags().BoolP("help", "h", false, "Print help")
cleanCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
cleanCmd.Flags().StringSliceP("package", "p", []string{}, "Package to clean artifacts for")
cleanCmd.Flags().String("profile", "", "Clean artifacts of the specified profile")
cleanCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
cleanCmd.Flags().BoolP("release", "r", false, "Whether or not to clean release artifacts")
cleanCmd.Flags().StringSlice("target", []string{}, "Target triple to clean output for")
cleanCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")

View File

@ -8,7 +8,6 @@ import (
var docCmd = &cobra.Command{
Use: "doc",
Aliases: []string{"d"},
Short: "Build a package's documentation",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("doc"),
@ -28,8 +27,8 @@ func init() {
docCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
docCmd.Flags().BoolP("help", "h", false, "Print help")
docCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
docCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
docCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
docCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
docCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
docCmd.Flags().Bool("lib", false, "Document only this package's library")
docCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
docCmd.Flags().StringSlice("message-format", []string{}, "Error format")
@ -38,7 +37,6 @@ func init() {
docCmd.Flags().Bool("open", false, "Opens the docs in a browser after the operation")
docCmd.Flags().StringSliceP("package", "p", []string{}, "Package to document")
docCmd.Flags().String("profile", "", "Build artifacts with the specified profile")
docCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
docCmd.Flags().BoolP("release", "r", false, "Build artifacts in release mode, with optimizations")
docCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
docCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")

View File

@ -7,7 +7,7 @@ import (
var fetchCmd = &cobra.Command{
Use: "fetch",
Short: "",
Short: "Fetch dependencies of a package from the network",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("fetch"),
}
@ -17,7 +17,6 @@ func init() {
fetchCmd.Flags().BoolP("help", "h", false, "Print help")
fetchCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
fetchCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
fetchCmd.Flags().StringSlice("target", []string{}, "Fetch dependencies for the target triple")
rootCmd.AddCommand(fetchCmd)

View File

@ -23,7 +23,7 @@ func init() {
fixCmd.Flags().Bool("allow-no-vcs", false, "Fix code even if a VCS was not detected")
fixCmd.Flags().Bool("allow-staged", false, "Fix code even if the working directory has staged changes")
fixCmd.Flags().StringSlice("bench", []string{}, "Fix only the specified bench target")
fixCmd.Flags().Bool("benches", false, "Fix all benches")
fixCmd.Flags().Bool("benches", false, "Fix all bench targets")
fixCmd.Flags().StringSlice("bin", []string{}, "Fix only the specified binary")
fixCmd.Flags().Bool("bins", false, "Fix all binaries")
fixCmd.Flags().Bool("broken-code", false, "Fix code even if it already has compiler errors")
@ -35,20 +35,19 @@ func init() {
fixCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
fixCmd.Flags().BoolP("help", "h", false, "Print help")
fixCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
fixCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
fixCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
fixCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
fixCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
fixCmd.Flags().Bool("lib", false, "Fix only this package's library")
fixCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
fixCmd.Flags().StringSlice("message-format", []string{}, "Error format")
fixCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
fixCmd.Flags().StringSliceP("package", "p", []string{}, "Package(s) to fix")
fixCmd.Flags().String("profile", "", "Build artifacts with the specified profile")
fixCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
fixCmd.Flags().BoolP("release", "r", false, "Fix artifacts in release mode, with optimizations")
fixCmd.Flags().StringSlice("target", []string{}, "Fix for the target triple")
fixCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
fixCmd.Flags().StringSlice("test", []string{}, "Fix only the specified test target")
fixCmd.Flags().Bool("tests", false, "Fix all tests")
fixCmd.Flags().Bool("tests", false, "Fix all test targets")
fixCmd.Flags().String("timings", "", "Timing output formats (unstable) (comma separated): html, json")
fixCmd.Flags().Bool("workspace", false, "Fix all packages in the workspace")
fixCmd.Flag("timings").NoOptDefVal = " "

View File

@ -15,8 +15,8 @@ func init() {
carapace.Gen(generateLockfileCmd).Standalone()
generateLockfileCmd.Flags().BoolP("help", "h", false, "Print help")
generateLockfileCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages (unstable)")
generateLockfileCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
generateLockfileCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.AddCommand(generateLockfileCmd)
carapace.Gen(generateLockfileCmd).FlagCompletion(carapace.ActionMap{

View File

@ -21,9 +21,8 @@ func init() {
initCmd.Flags().BoolP("help", "h", false, "Print help")
initCmd.Flags().Bool("lib", false, "Use a library template")
initCmd.Flags().String("name", "", "Set the resulting package name, defaults to the directory name")
initCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
initCmd.Flags().String("registry", "", "Registry to use")
initCmd.Flags().String("vcs", "", "Initialize a new repository for the given version control system (git, hg, pijul, or fossil) or do not initialize any version control at all (none), overriding a global configuration.")
initCmd.Flags().String("vcs", "", "Initialize a new repository for the given version control system, overriding a global configuration.")
rootCmd.AddCommand(initCmd)
carapace.Gen(initCmd).FlagCompletion(carapace.ActionMap{

View File

@ -29,15 +29,14 @@ func init() {
installCmd.Flags().BoolP("help", "h", false, "Print help")
installCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
installCmd.Flags().String("index", "", "Registry index to install from")
installCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
installCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
installCmd.Flags().Bool("list", false, "list all installed packages and their versions")
installCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
installCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
installCmd.Flags().Bool("list", false, "List all installed packages and their versions")
installCmd.Flags().StringSlice("message-format", []string{}, "Error format")
installCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
installCmd.Flags().Bool("no-track", false, "Do not save tracking information")
installCmd.Flags().String("path", "", "Filesystem path to local crate to install")
installCmd.Flags().String("path", "", "Filesystem path to local crate to install from")
installCmd.Flags().String("profile", "", "Install artifacts with the specified profile")
installCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
installCmd.Flags().String("registry", "", "Registry to use")
installCmd.Flags().String("rev", "", "Specific commit to use when installing from git")
installCmd.Flags().String("root", "", "Directory to install packages into")

View File

@ -17,7 +17,6 @@ func init() {
locateProjectCmd.Flags().BoolP("help", "h", false, "Print help")
locateProjectCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
locateProjectCmd.Flags().String("message-format", "", "Output representation [possible values: json, plain]")
locateProjectCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
locateProjectCmd.Flags().Bool("workspace", false, "Locate Cargo.toml of the workspace root")
rootCmd.AddCommand(locateProjectCmd)

View File

@ -7,18 +7,14 @@ import (
var loginCmd = &cobra.Command{
Use: "login",
Short: "Save an api token from the registry locally. If token is not specified, it will be read from stdin.",
Short: "Log in to a registry.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(loginCmd).Standalone()
loginCmd.Flags().Bool("generate-keypair", false, "Generate a public/secret keypair (unstable)")
loginCmd.Flags().BoolP("help", "h", false, "Print help")
loginCmd.Flags().String("key-subject", "", "Set the key subject for this registry (unstable)")
loginCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
loginCmd.Flags().String("registry", "", "Registry to use")
loginCmd.Flags().Bool("secret-key", false, "Prompt for secret key (unstable)")
rootCmd.AddCommand(loginCmd)
}

View File

@ -15,7 +15,6 @@ func init() {
carapace.Gen(logoutCmd).Standalone()
logoutCmd.Flags().BoolP("help", "h", false, "Print help")
logoutCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
logoutCmd.Flags().String("registry", "", "Registry to use")
rootCmd.AddCommand(logoutCmd)
}

View File

@ -23,7 +23,6 @@ func init() {
metadataCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
metadataCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
metadataCmd.Flags().Bool("no-deps", false, "Output information only about the workspace members and don't fetch dependencies")
metadataCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.AddCommand(metadataCmd)
carapace.Gen(metadataCmd).FlagCompletion(carapace.ActionMap{

View File

@ -21,9 +21,8 @@ func init() {
newCmd.Flags().BoolP("help", "h", false, "Print help")
newCmd.Flags().Bool("lib", false, "Use a library template")
newCmd.Flags().String("name", "", "Set the resulting package name, defaults to the directory name")
newCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
newCmd.Flags().String("registry", "", "Registry to use")
newCmd.Flags().String("vcs", "", "Initialize a new repository for the given version control system (git, hg, pijul, or fossil) or do not initialize any version control at all (none), overriding a global configuration.")
newCmd.Flags().String("vcs", "", "Initialize a new repository for the given version control system, overriding a global configuration.")
rootCmd.AddCommand(newCmd)
carapace.Gen(newCmd).FlagCompletion(carapace.ActionMap{

View File

@ -16,10 +16,9 @@ func init() {
ownerCmd.Flags().StringSliceP("add", "a", []string{}, "Name of a user or team to invite as an owner")
ownerCmd.Flags().BoolP("help", "h", false, "Print help")
ownerCmd.Flags().String("index", "", "Registry index to modify owners for")
ownerCmd.Flags().String("index", "", "Registry index URL to modify owners for")
ownerCmd.Flags().BoolP("list", "l", false, "List owners of a crate")
ownerCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
ownerCmd.Flags().String("registry", "", "Registry to use")
ownerCmd.Flags().String("registry", "", "Registry to modify owners for")
ownerCmd.Flags().StringSliceP("remove", "r", []string{}, "Name of a user or team to remove as an owner")
ownerCmd.Flags().String("token", "", "API token to use when authenticating")
rootCmd.AddCommand(ownerCmd)

View File

@ -20,15 +20,14 @@ func init() {
packageCmd.Flags().StringSlice("exclude", []string{}, "Don't assemble specified packages")
packageCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
packageCmd.Flags().BoolP("help", "h", false, "Print help")
packageCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
packageCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
packageCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
packageCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
packageCmd.Flags().BoolP("list", "l", false, "Print files included in a package without making one")
packageCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
packageCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
packageCmd.Flags().Bool("no-metadata", false, "Ignore warnings about a lack of human-usable metadata")
packageCmd.Flags().Bool("no-verify", false, "Don't verify the contents by building them")
packageCmd.Flags().StringSliceP("package", "p", []string{}, "Package(s) to assemble")
packageCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
packageCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
packageCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
packageCmd.Flags().Bool("workspace", false, "Assemble all packages in the workspace")

View File

@ -18,7 +18,6 @@ func init() {
pkgidCmd.Flags().BoolP("help", "h", false, "Print help")
pkgidCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
pkgidCmd.Flags().StringP("package", "p", "", "Argument to get the package ID specifier for")
pkgidCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.AddCommand(pkgidCmd)
carapace.Gen(pkgidCmd).FlagCompletion(carapace.ActionMap{

View File

@ -18,18 +18,17 @@ func init() {
publishCmd.Flags().Bool("all-features", false, "Activate all available features")
publishCmd.Flags().Bool("allow-dirty", false, "Allow dirty working directories to be packaged")
publishCmd.Flags().Bool("dry-run", false, "Perform all checks without uploading")
publishCmd.Flags().BoolP("dry-run", "n", false, "Perform all checks without uploading")
publishCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
publishCmd.Flags().BoolP("help", "h", false, "Print help")
publishCmd.Flags().String("index", "", "Registry index URL to upload the package to")
publishCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
publishCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
publishCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
publishCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
publishCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
publishCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
publishCmd.Flags().Bool("no-verify", false, "Don't verify the contents by building them")
publishCmd.Flags().StringP("package", "p", "", "Package to publish")
publishCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
publishCmd.Flags().String("registry", "", "Registry to publish to")
publishCmd.Flags().String("registry", "", "Registry to upload the package to")
publishCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
publishCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
publishCmd.Flags().String("token", "", "Token to use when uploading")

View File

@ -16,7 +16,6 @@ func init() {
readManifestCmd.Flags().BoolP("help", "h", false, "Print help")
readManifestCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
readManifestCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.AddCommand(readManifestCmd)
carapace.Gen(readManifestCmd).FlagCompletion(carapace.ActionMap{

View File

@ -15,19 +15,19 @@ var removeCmd = &cobra.Command{
func init() {
carapace.Gen(removeCmd).Standalone()
removeCmd.Flags().Bool("build", false, "Remove as build dependency")
removeCmd.Flags().Bool("dev", false, "Remove as development dependency")
removeCmd.Flags().Bool("dry-run", false, "Don't actually write the manifest")
removeCmd.Flags().Bool("build", false, "Remove from build-dependencies")
removeCmd.Flags().Bool("dev", false, "Remove from dev-dependencies")
removeCmd.Flags().BoolP("dry-run", "n", false, "Don't actually write the manifest")
removeCmd.Flags().BoolP("help", "h", false, "Print help")
removeCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
removeCmd.Flags().StringP("package", "p", "", "Package to remove from")
removeCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
removeCmd.Flags().String("target", "", "Remove as dependency from the given target platform")
removeCmd.Flags().String("target", "", "Remove from target-dependencies")
rootCmd.AddCommand(removeCmd)
carapace.Gen(removeCmd).FlagCompletion(carapace.ActionMap{
"manifest-path": carapace.ActionFiles(),
"package": action.ActionDependencies(removeCmd, false),
"target": action.ActionTargets(removeCmd, action.TargetOpts{}.Default()),
})
carapace.Gen(removeCmd).PositionalAnyCompletion(

View File

@ -49,13 +49,13 @@ func init() {
rootCmd.PersistentFlags().StringSliceS("Z", "Z", []string{}, "Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details")
rootCmd.PersistentFlags().String("color", "", "Coloring: auto, always, never")
rootCmd.PersistentFlags().StringSlice("config", []string{}, "Override a configuration value")
rootCmd.Flags().String("explain", "", "Run `rustc --explain CODE`")
rootCmd.PersistentFlags().Bool("frozen", false, "Require Cargo.lock and cache are up to date")
rootCmd.Flags().String("explain", "", "Provide a detailed explanation of a rustc error message")
rootCmd.PersistentFlags().Bool("frozen", false, "Equivalent to specifying both --locked and --offline")
rootCmd.Flags().BoolP("help", "h", false, "Print help")
rootCmd.Flags().Bool("list", false, "List installed commands")
rootCmd.PersistentFlags().Bool("locked", false, "Require Cargo.lock is up to date")
rootCmd.PersistentFlags().Bool("locked", false, "Assert that `Cargo.lock` will remain unchanged")
rootCmd.PersistentFlags().Bool("offline", false, "Run without accessing the network")
rootCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.PersistentFlags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.PersistentFlags().CountP("verbose", "v", "Use verbose output (-vv very verbose/build.rs output)")
rootCmd.Flags().BoolP("version", "V", false, "Print version info and exit")

View File

@ -8,7 +8,6 @@ import (
var runCmd = &cobra.Command{
Use: "run",
Aliases: []string{"r"},
Short: "Run a binary or example of the local package",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("run"),
@ -23,14 +22,13 @@ func init() {
runCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
runCmd.Flags().BoolP("help", "h", false, "Print help")
runCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
runCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
runCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
runCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
runCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
runCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
runCmd.Flags().StringSlice("message-format", []string{}, "Error format")
runCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
runCmd.Flags().StringP("package", "p", "", "Package with the target to run")
runCmd.Flags().String("profile", "", "Build artifacts with the specified profile")
runCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
runCmd.Flags().BoolP("release", "r", false, "Build artifacts in release mode, with optimizations")
runCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
runCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")

View File

@ -18,7 +18,7 @@ func init() {
rustcCmd.Flags().Bool("all-features", false, "Activate all available features")
rustcCmd.Flags().Bool("all-targets", false, "Build all targets")
rustcCmd.Flags().StringSlice("bench", []string{}, "Build only the specified bench target")
rustcCmd.Flags().Bool("benches", false, "Build all benches")
rustcCmd.Flags().Bool("benches", false, "Build all bench targets")
rustcCmd.Flags().StringSlice("bin", []string{}, "Build only the specified binary")
rustcCmd.Flags().Bool("bins", false, "Build all binaries")
rustcCmd.Flags().StringSlice("crate-type", []string{}, "Comma separated list of types of crates for the compiler to emit")
@ -28,8 +28,8 @@ func init() {
rustcCmd.Flags().Bool("future-incompat-report", false, "Outputs a future incompatibility report at the end of the build")
rustcCmd.Flags().BoolP("help", "h", false, "Print help")
rustcCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
rustcCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
rustcCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
rustcCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
rustcCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
rustcCmd.Flags().Bool("lib", false, "Build only this package's library")
rustcCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
rustcCmd.Flags().StringSlice("message-format", []string{}, "Error format")
@ -37,12 +37,11 @@ func init() {
rustcCmd.Flags().StringP("package", "p", "", "Package to build")
rustcCmd.Flags().String("print", "", "Output compiler information without compiling")
rustcCmd.Flags().String("profile", "", "Build artifacts with the specified profile")
rustcCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rustcCmd.Flags().BoolP("release", "r", false, "Build artifacts in release mode, with optimizations")
rustcCmd.Flags().StringSlice("target", []string{}, "Target triple which compiles will be for")
rustcCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
rustcCmd.Flags().StringSlice("test", []string{}, "Build only the specified test target")
rustcCmd.Flags().Bool("tests", false, "Build all tests")
rustcCmd.Flags().Bool("tests", false, "Build all test targets")
rustcCmd.Flags().String("timings", "", "Timing output formats (unstable) (comma separated): html, json")
rustcCmd.Flags().Bool("unit-graph", false, "Output build graph in JSON (unstable)")
rustcCmd.Flag("timings").NoOptDefVal = " "

View File

@ -18,7 +18,7 @@ func init() {
rustdocCmd.Flags().Bool("all-features", false, "Activate all available features")
rustdocCmd.Flags().Bool("all-targets", false, "Build all targets")
rustdocCmd.Flags().StringSlice("bench", []string{}, "Build only the specified bench target")
rustdocCmd.Flags().Bool("benches", false, "Build all benches")
rustdocCmd.Flags().Bool("benches", false, "Build all bench targets")
rustdocCmd.Flags().StringSlice("bin", []string{}, "Build only the specified binary")
rustdocCmd.Flags().Bool("bins", false, "Build all binaries")
rustdocCmd.Flags().StringSlice("example", []string{}, "Build only the specified example")
@ -26,21 +26,21 @@ func init() {
rustdocCmd.Flags().StringSliceP("features", "F", []string{}, "Space or comma separated list of features to activate")
rustdocCmd.Flags().BoolP("help", "h", false, "Print help")
rustdocCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
rustdocCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
rustdocCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
rustdocCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
rustdocCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error")
rustdocCmd.Flags().Bool("lib", false, "Build only this package's library")
rustdocCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
rustdocCmd.Flags().StringSlice("message-format", []string{}, "Error format")
rustdocCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
rustdocCmd.Flags().Bool("open", false, "Opens the docs in a browser after the operation")
rustdocCmd.Flags().String("output-format", "", "The output type to write (unstable)")
rustdocCmd.Flags().StringP("package", "p", "", "Package to document")
rustdocCmd.Flags().String("profile", "", "Build artifacts with the specified profile")
rustdocCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rustdocCmd.Flags().BoolP("release", "r", false, "Build artifacts in release mode, with optimizations")
rustdocCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
rustdocCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
rustdocCmd.Flags().StringSlice("test", []string{}, "Build only the specified test target")
rustdocCmd.Flags().Bool("tests", false, "Build all tests")
rustdocCmd.Flags().Bool("tests", false, "Build all test targets")
rustdocCmd.Flags().String("timings", "", "Timing output formats (unstable) (comma separated): html, json")
rustdocCmd.Flags().Bool("unit-graph", false, "Output build graph in JSON (unstable)")
rustdocCmd.Flag("timings").NoOptDefVal = " "
@ -54,6 +54,7 @@ func init() {
"features": action.ActionFeatures(rustdocCmd).UniqueList(","),
"manifest-path": carapace.ActionFiles(),
"message-format": action.ActionMessageFormats(),
"output-format": carapace.ActionValues("html", "json"),
"package": action.ActionDependencies(rustdocCmd, false),
"profile": action.ActionProfiles(rustdocCmd),
"target-dir": carapace.ActionDirectories(),

View File

@ -8,7 +8,7 @@ import (
var searchCmd = &cobra.Command{
Use: "search",
Short: "Search packages in crates.io",
Short: "Search packages in the registry. Default registry is crates.io",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("search"),
}
@ -17,10 +17,9 @@ func init() {
carapace.Gen(searchCmd).Standalone()
searchCmd.Flags().BoolP("help", "h", false, "Print help")
searchCmd.Flags().String("index", "", "Registry index URL to upload the package to")
searchCmd.Flags().String("index", "", "Registry index URL to search packages in")
searchCmd.Flags().String("limit", "", "Limit the number of results (default: 10, max: 100)")
searchCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
searchCmd.Flags().String("registry", "", "Registry to use")
searchCmd.Flags().String("registry", "", "Registry to search packages in")
rootCmd.AddCommand(searchCmd)
carapace.Gen(searchCmd).FlagCompletion(carapace.ActionMap{

View File

@ -8,7 +8,6 @@ import (
var testCmd = &cobra.Command{
Use: "test",
Aliases: []string{"t"},
Short: "Execute all unit and integration tests and build examples of a local package",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groupFor("test"),
@ -19,9 +18,9 @@ func init() {
testCmd.Flags().Bool("all", false, "Alias for --workspace (deprecated)")
testCmd.Flags().Bool("all-features", false, "Activate all available features")
testCmd.Flags().Bool("all-targets", false, "Test all targets")
testCmd.Flags().Bool("all-targets", false, "Test all targets (does not include doctests)")
testCmd.Flags().StringSlice("bench", []string{}, "Test only the specified bench target")
testCmd.Flags().Bool("benches", false, "Test all benches")
testCmd.Flags().Bool("benches", false, "Test all bench targets")
testCmd.Flags().StringSlice("bin", []string{}, "Test only the specified binary")
testCmd.Flags().Bool("bins", false, "Test all binaries")
testCmd.Flags().Bool("doc", false, "Test only this library's documentation")
@ -32,9 +31,8 @@ func init() {
testCmd.Flags().Bool("future-incompat-report", false, "Outputs a future incompatibility report at the end of the build")
testCmd.Flags().BoolP("help", "h", false, "Print help")
testCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages")
testCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs")
testCmd.Flags().Bool("keep-going", false, "Do not abort the build as soon as there is an error (unstable)")
testCmd.Flags().Bool("lib", false, "Test only this package's library unit tests")
testCmd.Flags().StringP("jobs", "j", "", "Number of parallel jobs, defaults to # of CPUs.")
testCmd.Flags().Bool("lib", false, "Test only this package's library")
testCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
testCmd.Flags().StringSlice("message-format", []string{}, "Error format")
testCmd.Flags().Bool("no-default-features", false, "Do not activate the `default` feature")
@ -47,7 +45,7 @@ func init() {
testCmd.Flags().StringSlice("target", []string{}, "Build for the target triple")
testCmd.Flags().String("target-dir", "", "Directory for all generated artifacts")
testCmd.Flags().StringSlice("test", []string{}, "Test only the specified test target")
testCmd.Flags().Bool("tests", false, "Test all tests")
testCmd.Flags().Bool("tests", false, "Test all test targets")
testCmd.Flags().String("timings", "", "Timing output formats (unstable) (comma separated): html, json")
testCmd.Flags().Bool("unit-graph", false, "Output build graph in JSON (unstable)")
testCmd.Flags().Bool("workspace", false, "Test all packages in the workspace")

View File

@ -16,7 +16,7 @@ func init() {
carapace.Gen(treeCmd).Standalone()
treeCmd.Flags().Bool("all-features", false, "Activate all available features")
treeCmd.Flags().String("charset", "", "Character set to use in output: utf8, ascii")
treeCmd.Flags().String("charset", "", "Character set to use in output")
treeCmd.Flags().String("depth", "", "Maximum display depth of the dependency tree")
treeCmd.Flags().BoolP("duplicates", "d", false, "Show only dependencies which come in multiple versions (implies -i)")
treeCmd.Flags().StringSliceP("edges", "e", []string{}, "The kinds of dependencies to display (features, normal, build, dev, all, no-normal, no-build, no-dev, no-proc-macro)")
@ -31,7 +31,6 @@ func init() {
treeCmd.Flags().StringSliceP("package", "p", []string{}, "Package to be used as the root of the tree")
treeCmd.Flags().String("prefix", "", "Change the prefix (indentation) of how each entry is displayed")
treeCmd.Flags().StringSlice("prune", []string{}, "Prune the given package from the display of the dependency tree")
treeCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
treeCmd.Flags().StringSlice("target", []string{}, "Filter dependencies matching the given target-triple (default host platform). Pass `all` to include all targets.")
treeCmd.Flags().Bool("workspace", false, "Display the tree for all packages in the workspace")
rootCmd.AddCommand(treeCmd)

View File

@ -19,7 +19,6 @@ func init() {
uninstallCmd.Flags().StringSlice("bin", []string{}, "Only uninstall the binary NAME")
uninstallCmd.Flags().BoolP("help", "h", false, "Print help")
uninstallCmd.Flags().StringSliceP("package", "p", []string{}, "Package to uninstall")
uninstallCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
uninstallCmd.Flags().String("root", "", "Directory to uninstall packages from")
rootCmd.AddCommand(uninstallCmd)

View File

@ -2,7 +2,6 @@ package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/cargo_completer/cmd/action"
"github.com/spf13/cobra"
)
@ -16,18 +15,17 @@ var updateCmd = &cobra.Command{
func init() {
carapace.Gen(updateCmd).Standalone()
updateCmd.Flags().Bool("aggressive", false, "Force updating all dependencies of SPEC as well when used with -p")
updateCmd.Flags().Bool("dry-run", false, "Don't actually write the lockfile")
updateCmd.Flags().BoolP("breaking", "b", false, "Update [SPEC] to latest SemVer-breaking version (unstable)")
updateCmd.Flags().BoolP("dry-run", "n", false, "Don't actually write the lockfile")
updateCmd.Flags().BoolP("help", "h", false, "Print help")
updateCmd.Flags().Bool("ignore-rust-version", false, "Ignore `rust-version` specification in packages (unstable)")
updateCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
updateCmd.Flags().StringSliceP("package", "p", []string{}, "Package to update")
updateCmd.Flags().String("precise", "", "Update a single dependency to exactly PRECISE when used with -p")
updateCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
updateCmd.Flags().String("precise", "", "Update [SPEC] to exactly PRECISE")
updateCmd.Flags().Bool("recursive", false, "Force updating all dependencies of [SPEC]... as well")
updateCmd.Flags().BoolP("workspace", "w", false, "Only update the workspace packages")
rootCmd.AddCommand(updateCmd)
carapace.Gen(updateCmd).FlagCompletion(carapace.ActionMap{
"manifest-path": carapace.ActionFiles(),
"package": action.ActionDependencies(updateCmd, false),
})
}

View File

@ -17,7 +17,6 @@ func init() {
vendorCmd.Flags().BoolP("help", "h", false, "Print help")
vendorCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
vendorCmd.Flags().Bool("no-delete", false, "Don't delete older crates in the vendor directory")
vendorCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
vendorCmd.Flags().Bool("respect-source-config", false, "Respect `[source]` config in `.cargo/config`")
vendorCmd.Flags().StringSliceP("sync", "s", []string{}, "Additional `Cargo.toml` to sync and vendor")
vendorCmd.Flags().Bool("versioned-dirs", false, "Always include version in subdir name")

View File

@ -16,7 +16,6 @@ func init() {
verifyProjectCmd.Flags().BoolP("help", "h", false, "Print help")
verifyProjectCmd.Flags().String("manifest-path", "", "Path to Cargo.toml")
verifyProjectCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.AddCommand(verifyProjectCmd)
carapace.Gen(verifyProjectCmd).FlagCompletion(carapace.ActionMap{

View File

@ -15,6 +15,5 @@ func init() {
carapace.Gen(versionCmd).Standalone()
versionCmd.Flags().BoolP("help", "h", false, "Print help")
versionCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
rootCmd.AddCommand(versionCmd)
}

View File

@ -15,9 +15,8 @@ func init() {
carapace.Gen(yankCmd).Standalone()
yankCmd.Flags().BoolP("help", "h", false, "Print help")
yankCmd.Flags().String("index", "", "Registry index to yank from")
yankCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
yankCmd.Flags().String("registry", "", "Registry to use")
yankCmd.Flags().String("index", "", "Registry index URL to yank from")
yankCmd.Flags().String("registry", "", "Registry to yank from")
yankCmd.Flags().String("token", "", "API token to use when authenticating")
yankCmd.Flags().Bool("undo", false, "Undo a yank, putting a version back into the index")
yankCmd.Flags().String("version", "", "The version to yank or un-yank")