clap/clap_complete_fig/tests/snapshots/basic.fig.js
Andrew Shu eec047a6f6 fix(help): Do not propagate global args to help
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.
2022-08-26 17:48:58 -07:00

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;