id = "expect" name = "Expect" homepage = "https://core.tcl-lang.org/expect/" description = "A tool for automating interactive programs through scripted dialogue." executables = ["expect"] [dotfiles] # https://man7.org/linux/man-pages/man1/expect.1.html — Expect automatically # sources ~/.expect.rc after processing command-line commands; DOTDIR can # override that directory, but is not a fixed path. paths = ["~/.expect.rc"] secret = [] side_effect = false [commands] format = 1 label = "Run an Expect script" description = "Run an Expect (Tcl) script that talks to interactive programs, or execute inline commands. The debugger, buffered reading and rc-file suppression flags are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false } [[commands.source]] id = "man" kind = "manual" url = "https://manpages.debian.org/bookworm/expect/expect.1.en.html" revision = "Version 5" evidence = """ expect(1) man page, Version 5 (local /usr/bin/expect) expect [ -dDinN ] [ -c cmds ] [ [ -[f|b] ] cmdfile ] [ args ] The -c flag prefaces a command to be executed before any in the script. The -d flag enables some diagnostic output The -D flag enables an interactive debugger. The -f flag prefaces a file from which to read commands from. The -i flag causes Expect to interactively prompt for commands instead of reading them from a file. -v causes Expect to print its version number and exit. Optional args are constructed into a list and stored in the variable named argv. """ [[commands.field]] id = "script" label = "Script file" description = "Expect script to run. Leave empty with a command or interactive mode." type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["man"] [[commands.field]] id = "args" label = "Script arguments" description = "Passed to the script in the argv variable." type = "string" position = 1 multiple = true sources = ["man"] [[commands.field]] id = "cmd" label = "Command before script" description = "Tcl command run before the script. Quote it for the shell." type = "string" option = ["-c"] multiple = true sources = ["man"] [[commands.field]] id = "debug" label = "Diagnostic output" type = "boolean" option = ["-d"] sources = ["man"] [[commands.field]] id = "interactive" label = "Interactive prompt" type = "boolean" option = ["-i"] sources = ["man"] [[commands.field]] id = "version" label = "Print version" type = "boolean" option = ["-v"] sources = ["man"] [[commands.task]] id = "run" label = "Run an Expect script" fields = ["script", "args", "debug"] required = ["script"] [[commands.task]] id = "inline" label = "Run a Tcl command" fields = ["cmd", "debug"] required = ["cmd"] [[commands.group]] id = "basic" label = "Basic" fields = ["script", "args", "cmd"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["debug", "interactive", "version"]