id = "xargs" name = "xargs" description = "Builds and runs commands from whitespace-delimited standard input." executables = ["xargs"] [commands] format = 1 label = "Run a command per input batch" description = "Choose how xargs batches stdin into the command line. The command and its fixed arguments are typed as separate words; less common size limits are left out." quality = "ai-draft" base = "fig:xargs" 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/xargs.ts" license = "MIT" [[commands.field]] id = "null_sep" label = "NUL-separated input" type = "boolean" option = ["-0"] sources = ["fig"] [[commands.field]] id = "replace" label = "Replacement string" description = "Occurrences of this string in the command are replaced by each input item." type = "string" option = ["-I"] suggestions = [{ value = "{}", label = "{}" }] sources = ["fig"] [[commands.field]] id = "max_args" label = "Max arguments per run" type = "integer" option = ["-n"] sources = ["fig"] [[commands.field]] id = "parallel" label = "Parallel processes" description = "0 runs as many as possible." type = "integer" option = ["-P"] sources = ["fig"] [[commands.field]] id = "prompt" label = "Prompt before each run" type = "boolean" option = ["-p"] sources = ["fig"] [[commands.field]] id = "no_run_empty" label = "Skip when input is empty" type = "boolean" option = ["-r"] sources = ["fig"] [[commands.field]] id = "trace" label = "Echo each command" type = "boolean" option = ["-t"] sources = ["fig"] [[commands.field]] id = "eof" label = "Logical EOF marker" type = "string" option = ["-E"] sources = ["fig"] [[commands.field]] id = "command" label = "Command and arguments" description = "Defaults to echo when empty." type = "string" position = 0 multiple = true sources = ["fig"] [[commands.task]] id = "each-line" label = "One run per item" fields = ["null_sep", "max_args", "trace", "command"] set = { max_args = [1] } required = ["command"] [[commands.task]] id = "parallel" label = "Parallel run" fields = ["null_sep", "max_args", "parallel", "no_run_empty", "command"] set = { max_args = [1], parallel = [4] } required = ["command"] [[commands.group]] id = "basic" label = "Basic" fields = ["command", "null_sep", "max_args", "parallel", "replace"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["prompt", "no_run_empty", "trace", "eof"]