id = "tr" name = "tr" description = "Translates, squeezes or deletes characters from standard input." executables = ["tr"] [commands] format = 1 label = "Translate characters" description = "Translate, delete or squeeze characters read from standard input." quality = "ai-draft" base = "fig:tr" 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/tr.ts" license = "MIT" [[commands.field]] id = "complement" label = "Complement set 1" description = "Use every character except those in string 1." type = "boolean" option = ["-C"] sources = ["fig"] [[commands.field]] id = "delete" label = "Delete" description = "Delete characters in string 1 from the input." type = "boolean" option = ["-d"] sources = ["fig"] [[commands.field]] id = "squeeze" label = "Squeeze repeats" type = "boolean" option = ["-s"] sources = ["fig"] [[commands.field]] id = "unbuffered" label = "Unbuffered output" type = "boolean" option = ["-u"] sources = ["fig"] [[commands.field]] id = "string1" label = "String 1" type = "string" position = 0 suggestions = [{ value = "[:lower:]", label = "Lowercase" }, { value = "[:upper:]", label = "Uppercase" }, { value = "[:alnum:]", label = "Alphanumeric" }, { value = "[:digit:]", label = "Digits" }, { value = "[:blank:]", label = "Blank" }] sources = ["fig"] [[commands.field]] id = "string2" label = "String 2" description = "Replacement characters; omit when deleting." type = "string" position = 1 sources = ["fig"] [[commands.task]] id = "translate" label = "Translate" fields = ["string1", "string2", "complement"] required = ["string1", "string2"] [[commands.task]] id = "delete" label = "Delete characters" set = { delete = [true] } fields = ["string1", "delete", "complement"] required = ["string1"] [[commands.group]] id = "basic" label = "Basic" fields = ["string1", "string2", "delete", "squeeze", "complement"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["unbuffered"]