id = "sed" name = "sed" description = "Stream editor for filtering and transforming text." executables = ["sed"] [commands] format = 1 label = "Edit text stream" description = "Apply sed commands to files or standard input and print the result. In-place editing (-i) is left out because its backup-suffix syntax differs between BSD and GNU sed." quality = "ai-draft" base = "fig:sed" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sed.ts" license = "MIT" [[commands.field]] id = "script" label = "Script" description = "A sed command such as s/old/new/g. Repeat to add more commands." type = "string" option = ["-e"] multiple = true sources = ["fig"] [[commands.field]] id = "script_file" label = "Script file" type = "path" option = ["-f"] path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "extended" label = "Extended regex" description = "Use extended regular expressions." type = "boolean" option = ["-E", "-r"] sources = ["fig"] [[commands.field]] id = "quiet" label = "Suppress automatic printing" description = "Only print lines selected by a p command." type = "boolean" option = ["-n"] sources = ["fig"] [[commands.field]] id = "unbuffered" label = "Unbuffered output" type = "boolean" option = ["-u"] sources = ["fig"] [[commands.field]] id = "files" label = "Input files" description = "Leave empty to read standard input." type = "path" position = 0 multiple = true path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.task]] id = "substitute" label = "Substitute text" fields = ["script", "files", "extended"] required = ["script"] [[commands.task]] id = "print-lines" label = "Print selected lines" set = { quiet = [true] } fields = ["script", "files", "quiet"] required = ["script"] [[commands.group]] id = "basic" label = "Basic" fields = ["script", "extended", "quiet", "files"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["script_file", "unbuffered"]