{
  "name": "mdls",
  "description": "Lists the metadata attributes for the specified file",
  "parserDirectives": {
    "flagsArePosixNoncompliant": true
  },
  "options": [
    {
      "names": [
        "--name",
        "-name"
      ],
      "description": "Print only the matching metadata attribute value.  Can be used multiple times",
      "isRepeatable": -1,
      "exclusiveOn": [
        "--plist",
        "-plist"
      ],
      "args": [
        {
          "name": "attributeName",
          "description": "Metadata attribute name",
          "suggestions": [
            "_kMDItemDisplayNameWithExtensions",
            "kMDItemContentCreationDate",
            "kMDItemContentCreationDate_Ranking",
            "kMDItemContentModificationDate",
            "kMDItemContentModificationDate_Ranking",
            "kMDItemContentType",
            "kMDItemContentTypeTree",
            "kMDItemDateAdded",
            "kMDItemDateAdded_Ranking",
            "kMDItemDisplayName",
            "kMDItemDocumentIdentifier",
            "kMDItemFSContentChangeDate",
            "kMDItemFSCreationDate",
            "kMDItemFSCreatorCode",
            "kMDItemFSFinderFlags",
            "kMDItemFSHasCustomIcon",
            "kMDItemFSInvisible",
            "kMDItemFSIsExtensionHidden",
            "kMDItemFSIsStationery",
            "kMDItemFSLabel",
            "kMDItemFSName",
            "kMDItemFSNodeCount",
            "kMDItemFSOwnerGroupID",
            "kMDItemFSOwnerUserID",
            "kMDItemFSSize",
            "kMDItemFSTypeCode",
            "kMDItemInterestingDate_Ranking",
            "kMDItemKind",
            "kMDItemLogicalSize",
            "kMDItemPhysicalSize"
          ]
        }
      ]
    },
    {
      "names": [
        "--raw",
        "-raw"
      ],
      "description": "Print raw attribute data in the order that was requested. Fields will be separated with a ASCII NUL character, suitable for piping to xargs(1) -0",
      "exclusiveOn": [
        "--plist",
        "-plist"
      ]
    },
    {
      "names": [
        "--nullMarker",
        "-nullMarker"
      ],
      "description": "Sets a marker string to be used when a requested attribute is null. Only used in -raw mode.  Default is '(null)'",
      "exclusiveOn": [
        "--plist",
        "-plist"
      ],
      "dependsOn": [
        "--raw",
        "-raw"
      ]
    },
    {
      "names": [
        "--plist",
        "-plist"
      ],
      "description": "Output attributes in XML format to file. Use - to write to stdout option. Incompatible with options -raw, -nullMarker, and -name",
      "exclusiveOn": [
        "--raw",
        "-raw",
        "--nullMarker",
        "-nullMarker",
        "--name",
        "-name"
      ],
      "args": [
        {
          "name": "stdout or file",
          "description": "XML output location",
          "template": "filepaths",
          "suggestions": [
            "-"
          ]
        },
        {
          "name": "file",
          "description": "File to read from",
          "template": "filepaths"
        }
      ]
    }
  ],
  "args": [
    {
      "name": "file",
      "isVariadic": true,
      "template": "filepaths"
    }
  ]
}
