id = "xxd" name = "xxd" description = "Makes a hexdump or reverses one." executables = ["xxd"] [commands] format = 1 label = "Hexdump a file" description = "Dump a file as hex, or reverse a dump with revert. Only short flags are used." quality = "ai-draft" base = "fig:xxd" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/xxd.ts" license = "MIT" [[commands.field]] id = "revert" label = "Revert hexdump to binary" type = "boolean" option = ["-r"] sources = ["fig"] [[commands.field]] id = "plain" label = "Plain hex (postscript)" type = "boolean" option = ["-p"] sources = ["fig"] [[commands.field]] id = "bits" label = "Binary digits" type = "boolean" option = ["-b"] sources = ["fig"] [[commands.field]] id = "include" label = "C include style" type = "boolean" option = ["-i"] sources = ["fig"] [[commands.field]] id = "upper" label = "Upper-case hex" type = "boolean" option = ["-u"] sources = ["fig"] [[commands.field]] id = "cols" label = "Octets per line" type = "integer" option = ["-c"] sources = ["fig"] [[commands.field]] id = "groupsize" label = "Group size (bytes)" type = "integer" option = ["-g"] sources = ["fig"] [[commands.field]] id = "len" label = "Stop after N octets" type = "integer" option = ["-l"] sources = ["fig"] [[commands.field]] id = "infile" label = "Input file" type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "outfile" label = "Output file" type = "path" position = 1 path = { kind = "file", role = "output", must_exist = false } effect = "overwrite" sources = ["fig"] [[commands.task]] id = "dump" label = "Hexdump" fields = ["infile", "cols", "groupsize", "len", "upper"] required = ["infile"] [[commands.task]] id = "revert" label = "Hexdump to binary" fields = ["infile", "outfile", "plain"] set = { revert = [true] } lock = ["revert"] required = ["infile", "outfile"] [[commands.group]] id = "basic" label = "Basic" fields = ["infile", "outfile", "revert", "plain", "cols", "groupsize", "len"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["bits", "include", "upper"]