id = "sudo" name = "sudo" description = "Execute a command as the superuser or another user." executables = ["sudo"] [commands] format = 1 label = "Run as another user" description = "Run a command with elevated privileges, optionally as a given user or group. Other sudo options are not in this form." quality = "ai-draft" base = "fig:sudo" 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/sudo.ts" license = "MIT" [[commands.field]] id = "user" label = "Run as user" type = "string" option = ["--user", "-u"] sources = ["fig"] [[commands.field]] id = "group" label = "Run as group" type = "string" option = ["--group", "-g"] sources = ["fig"] [[commands.field]] id = "command" label = "Command" description = "Command and its arguments to run with elevated permissions." type = "string" position = 0 multiple = true min = 1 effect = "exec" sources = ["fig"] [[commands.task]] id = "root" label = "Run as root" fields = ["command"] required = ["command"] [[commands.task]] id = "as-user" label = "Run as another user" fields = ["user", "group", "command"] required = ["user", "command"] [[commands.group]] id = "basic" label = "Basic" fields = ["command", "user", "group"]