mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
6f03b4f948
For num_vals and friends, this only implements hacks until #2688 Fixes #3021
111 lines
2.4 KiB
JavaScript
111 lines
2.4 KiB
JavaScript
const completion: Fig.Spec = {
|
|
name: "my-app",
|
|
description: "",
|
|
subcommands: [
|
|
{
|
|
name: "cmd-single-quotes",
|
|
description: "Can be 'always', 'auto', or 'never'",
|
|
options: [
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "cmd-double-quotes",
|
|
description: "Can be /"always/", /"auto/", or /"never/"",
|
|
options: [
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "cmd-backticks",
|
|
description: "For more information see `echo test`",
|
|
options: [
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "cmd-backslash",
|
|
description: "Avoid '//n'",
|
|
options: [
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "cmd-brackets",
|
|
description: "List packages [filter]",
|
|
options: [
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "cmd-expansions",
|
|
description: "Execute the shell command with $SHELL",
|
|
options: [
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: "help",
|
|
description: "Print this message or the help of the given subcommand(s)",
|
|
args: {
|
|
name: "subcommand",
|
|
isVariadic: true,
|
|
isOptional: true,
|
|
},
|
|
},
|
|
],
|
|
options: [
|
|
{
|
|
name: ["-h", "--help"],
|
|
description: "Print help information",
|
|
},
|
|
{
|
|
name: ["-V", "--version"],
|
|
description: "Print version information",
|
|
},
|
|
{
|
|
name: "--single-quotes",
|
|
description: "Can be 'always', 'auto', or 'never'",
|
|
},
|
|
{
|
|
name: "--double-quotes",
|
|
description: "Can be /"always/", /"auto/", or /"never/"",
|
|
},
|
|
{
|
|
name: "--backticks",
|
|
description: "For more information see `echo test`",
|
|
},
|
|
{
|
|
name: "--backslash",
|
|
description: "Avoid '//n'",
|
|
},
|
|
{
|
|
name: "--brackets",
|
|
description: "List packages [filter]",
|
|
},
|
|
{
|
|
name: "--expansions",
|
|
description: "Execute the shell command with $SHELL",
|
|
},
|
|
],
|
|
};
|
|
|
|
export default completion;
|