2022-03-07 20:08:56 +00:00
|
|
|
const completion: Fig.Spec = {
|
|
|
|
name: "my-app",
|
|
|
|
description: "",
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: "--choice",
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "choice",
|
|
|
|
isOptional: true,
|
|
|
|
suggestions: [
|
2022-03-17 20:32:28 +00:00
|
|
|
"bash",
|
|
|
|
"fish",
|
|
|
|
"zsh",
|
|
|
|
],
|
2022-03-07 20:08:56 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "--unknown",
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "unknown",
|
|
|
|
isOptional: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "--other",
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "other",
|
|
|
|
isOptional: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: ["-p", "--path"],
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "path",
|
|
|
|
isOptional: true,
|
|
|
|
template: "filepaths",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: ["-f", "--file"],
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "file",
|
|
|
|
isOptional: true,
|
|
|
|
template: "filepaths",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: ["-d", "--dir"],
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "dir",
|
|
|
|
isOptional: true,
|
|
|
|
template: "folders",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: ["-e", "--exe"],
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "exe",
|
|
|
|
isOptional: true,
|
|
|
|
template: "filepaths",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "--cmd-name",
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "cmd_name",
|
|
|
|
isOptional: true,
|
|
|
|
isCommand: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: ["-c", "--cmd"],
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "cmd",
|
|
|
|
isOptional: true,
|
|
|
|
isCommand: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: ["-u", "--user"],
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "user",
|
|
|
|
isOptional: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: ["-h", "--host"],
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "host",
|
|
|
|
isOptional: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "--url",
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "url",
|
|
|
|
isOptional: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "--email",
|
2022-07-22 18:37:18 +00:00
|
|
|
isRepeatable: true,
|
2022-03-07 20:08:56 +00:00
|
|
|
args: {
|
|
|
|
name: "email",
|
|
|
|
isOptional: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "--help",
|
|
|
|
description: "Print help information",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
args: {
|
|
|
|
name: "command_with_args",
|
|
|
|
isVariadic: true,
|
|
|
|
isOptional: true,
|
|
|
|
isCommand: true,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default completion;
|