Skip to content
Snippets Groups Projects

feat(clap_complete): add completion subcommand

Merged Paco Velobs requested to merge pacovelobs-add-clap_complete-through-subcommand into master
All threads resolved!
Files
5
+ 10
0
@@ -72,6 +72,9 @@ pub enum Subcommand {
/// The custom benchmark subcommmand benchmarking runtime pallets.
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
/// Generate completion for various shell interpreters
Completion(Completion),
}
/// Block authoring scheme to be used by the node
@@ -84,6 +87,7 @@ pub enum Sealing {
/// Author a block upon receiving an RPC command
Manual,
/// Author blocks at a regular interval specified in milliseconds
#[clap(skip)]
Interval(u64),
}
@@ -110,3 +114,9 @@ impl std::str::FromStr for Sealing {
})
}
}
#[derive(Debug, clap::Args)]
pub struct Completion {
#[clap(short, long, arg_enum)]
pub generator: clap_complete::Shell,
}
Loading