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

+ 10
0
@@ -72,6 +72,9 @@ pub enum Subcommand {
@@ -72,6 +72,9 @@ pub enum Subcommand {
/// The custom benchmark subcommmand benchmarking runtime pallets.
/// The custom benchmark subcommmand benchmarking runtime pallets.
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
 
 
/// Generate completion for various shell interpreters
 
Completion(Completion),
}
}
/// Block authoring scheme to be used by the node
/// Block authoring scheme to be used by the node
@@ -84,6 +87,7 @@ pub enum Sealing {
@@ -84,6 +87,7 @@ pub enum Sealing {
/// Author a block upon receiving an RPC command
/// Author a block upon receiving an RPC command
Manual,
Manual,
/// Author blocks at a regular interval specified in milliseconds
/// Author blocks at a regular interval specified in milliseconds
 
+1
#[clap(skip)]
Interval(u64),
Interval(u64),
}
}
@@ -110,3 +114,9 @@ impl std::str::FromStr for Sealing {
@@ -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