{
  "id": "r",
  "name": "R",
  "homepage": "https://www.r-project.org",
  "description": "R is a free software environment for statistical computing and graphics.",
  "icon": "SimpleIcons:r",
  "executables": [
    "R",
    "Rscript"
  ],
  "dotfiles": {
    "paths": [
      "~/.Renviron",
      "~/.Rprofile",
      "~/.R/Makevars",
      "~/.R/Makevars-*",
      "~/.R/check.Renviron",
      "~/.R/build.Renviron"
    ],
    "exclude": [
      "~/R/",
      "~/.RData",
      "~/.Rhistory"
    ],
    "secret": [],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "~/.Renviron",
        "match": {
          "prefix": [
            "GITHUB_PAT",
            "GITHUB_TOKEN"
          ]
        }
      }
    ],
    "machine_lines": [
      {
        "file": "~/.Renviron",
        "match": {
          "prefix": [
            "R_LIBS"
          ]
        },
        "scope": "backup"
      },
      {
        "file": "~/.R/Makevars",
        "match": {
          "prefix": [
            "CPPFLAGS",
            "LDFLAGS"
          ]
        },
        "scope": "platform"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Start R",
    "description": "Start R with an optional script or expression. Debugger, memory and CMD tools are left out.",
    "quality": "ai-draft",
    "base": "fig:R",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/R.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "file",
        "label": "Script file",
        "type": "path",
        "option": [
          "--file",
          "-f"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "expr",
        "label": "Expression",
        "description": "Execute an R expression and exit.",
        "type": "string",
        "option": [
          "-e"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "vanilla",
        "label": "Vanilla",
        "description": "Combines --no-save, --no-restore, --no-site-file, --no-init-file and --no-environ.",
        "type": "boolean",
        "option": [
          "--vanilla"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_save",
        "label": "Do not save workspace",
        "type": "boolean",
        "option": [
          "--no-save"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_restore",
        "label": "Do not restore anything",
        "type": "boolean",
        "option": [
          "--no-restore"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet startup",
        "type": "boolean",
        "option": [
          "--quiet",
          "--silent",
          "-q"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_echo",
        "label": "No echo",
        "type": "boolean",
        "option": [
          "--no-echo",
          "-s"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "interactive",
        "label": "Force interactive",
        "type": "boolean",
        "option": [
          "--interactive"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "encoding",
        "label": "Stdin encoding",
        "type": "string",
        "option": [
          "--encoding"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "--verbose"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "script",
        "label": "Run a script",
        "fields": [
          "file",
          "vanilla",
          "no_echo"
        ],
        "required": [
          "file"
        ],
        "set": {
          "no_echo": [
            true
          ],
          "vanilla": [
            true
          ]
        }
      },
      {
        "id": "expr",
        "label": "Run an expression",
        "fields": [
          "expr",
          "quiet",
          "no_save"
        ],
        "required": [
          "expr"
        ],
        "set": {
          "quiet": [
            true
          ],
          "no_save": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "file",
          "expr",
          "vanilla",
          "quiet",
          "no_save"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_restore",
          "no_echo",
          "interactive",
          "encoding",
          "verbose"
        ]
      }
    ]
  }
}
