mirror of
https://github.com/clap-rs/clap
synced 2025-01-09 03:08:45 +00:00
eec047a6f6
This prevents global args from showing in help completions, since help completions should only suggest subcommands. Adds tests to ensure the args still show in the generated help messages of subcommands.
54 lines
999 B
JavaScript
54 lines
999 B
JavaScript
const completion: Fig.Spec = {
|
|
name: "my-app",
|
|
description: "",
|
|
subcommands: [
|
|
{
|
|
name: "test",
|
|
description: "Subcommand",
|
|
options: [
|
|
{
|
|
name: "-d",
|
|
isRepeatable: true,
|
|
},
|
|
{
|
|
name: "-c",
|
|
},
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "help",
|
|
description: "Print this message or the help of the given subcommand(s)",
|
|
subcommands: [
|
|
{
|
|
name: "test",
|
|
description: "Subcommand",
|
|
},
|
|
{
|
|
name: "help",
|
|
description: "Print this message or the help of the given subcommand(s)",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
options: [
|
|
{
|
|
name: "-c",
|
|
},
|
|
{
|
|
name: "-v",
|
|
exclusiveOn: [
|
|
"-c",
|
|
],
|
|
},
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
};
|
|
|
|
export default completion;
|