id = "touch" name = "touch" description = "Changes file access and modification times, creating files that do not exist." executables = ["touch"] [commands] format = 1 label = "Create or update files" description = "Create empty files or set their access and modification times." quality = "ai-draft" base = "fig:touch" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/touch.ts" license = "MIT" [[commands.field]] id = "access_only" label = "Access time only" type = "boolean" option = ["-a"] sources = ["fig"] [[commands.field]] id = "modify_only" label = "Modification time only" type = "boolean" option = ["-m"] sources = ["fig"] [[commands.field]] id = "no_create" label = "Do not create" description = "Do not create the file if it does not exist." type = "boolean" option = ["-c"] sources = ["fig"] [[commands.field]] id = "no_follow" label = "Affect symlink itself" type = "boolean" option = ["-h"] sources = ["fig"] [[commands.field]] id = "reference" label = "Copy times from file" type = "path" option = ["-r"] path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "timestamp" label = "Timestamp" description = "Use this time instead of now." type = "string" option = ["-t"] sources = ["fig"] [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "any", role = "output" } sources = ["fig"] [[commands.task]] id = "create" label = "Create files" fields = ["files"] required = ["files"] [[commands.task]] id = "update" label = "Update times of existing files" set = { no_create = [true] } fields = ["files", "no_create", "access_only", "modify_only", "timestamp", "reference"] required = ["files"] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "no_create", "timestamp", "reference"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["access_only", "modify_only", "no_follow"]