id = "screen" name = "GNU Screen" homepage = "https://www.gnu.org/software/screen/" description = "A full-screen window manager that multiplexes a physical terminal between several processes." executables = ["screen"] platforms = ["macos", "linux"] [dotfiles] # screen(1) FILES lists "$SCREENRC" then "$HOME/.screenrc", "Read in after # /usr/local/etc/screenrc"; the body says the same — "The user specific # screenrc file is searched in $SCREENRC, then $HOME/.screenrc." The global # file is under /usr/local/etc and is not a dotfile. paths = ["~/.screenrc"] # Same page: "The socket directory defaults either to $HOME/.screen or simply # to /tmp/screens". Those are live per-session sockets plus the .termcap screen # writes there — machine state, and useless anywhere else. exclude = ["~/.screen/"] # No whole-file secret: .screenrc is a keybinding and layout file. The one # credential it can carry is lifted out below. secret = [] # screen(1), `password [crypted_pw]`: "Present a crypted password in your # '.screenrc' file and screen will ask for it, whenever someone attempts to # resume a detached session." It is a crypt(3) hash of the user's password, so # it never travels as plaintext config. [[dotfiles.secret_paths]] file = "~/.screenrc" match = { prefix = ["password"] } # `shell` names the absolute path of the program screen starts in a new window # — /bin/bash on one box, /opt/homebrew/bin/fish on the next — and `chdir` is # an absolute starting directory on this machine. Everything else in the file # (bindings, hardstatus, defscrollback, altscreen) is preference that should # travel. The trailing space on "shell " keeps it off `shelltitle`, which is # such a preference. # # Both are kept for rebuilding this machine and handed to no other. `chdir` is # the user's own choice of where a window opens. `shell` looks like a platform # path, but what it records is which program *this box* has installed, not what # every machine of its OS and architecture has: send /opt/homebrew/bin/fish to # a same-class Mac without fish and the result is not a wrong value, it is a # screenrc that cannot open a window. [[dotfiles.machine_lines]] file = "~/.screenrc" match = { prefix = ["shell ", "chdir"] } scope = "backup" [commands] format = 1 label = "GNU Screen" description = "Start or list screen sessions. Reattaching and detached start are separate sub-forms." quality = "ai-draft" base = "fig:screen" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/screen.ts" license = "MIT" [[commands.field]] id = "name" label = "Session name" type = "string" option = ["-S"] sources = ["fig"] [[commands.field]] id = "title" label = "Window title" type = "string" option = ["-t"] sources = ["fig"] [[commands.field]] id = "log" label = "Log output" type = "boolean" option = ["-L"] sources = ["fig"] [[commands.field]] id = "utf8" label = "UTF-8 mode" type = "boolean" option = ["-U"] sources = ["fig"] [[commands.field]] id = "history" label = "Scrollback lines" type = "integer" option = ["-h"] sources = ["fig"] [[commands.field]] id = "config" label = "Config file" type = "path" option = ["-c"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "shell" label = "Shell" type = "string" option = ["-s"] sources = ["fig"] [[commands.field]] id = "list" label = "List sessions" type = "boolean" option = ["-ls"] sources = ["fig"] [[commands.field]] id = "cmd" label = "Command" type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "args" label = "Command arguments" type = "string" position = 1 multiple = true sources = ["fig"] [[commands.task]] id = "new" label = "New named session" fields = ["name", "title", "utf8", "cmd", "args"] required = ["name"] [[commands.task]] id = "list" label = "List sessions" fields = ["list"] required = ["list"] set = { list = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["name", "title", "utf8", "cmd", "args", "list"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["log", "history", "config", "shell"] [[commands.subcommand]] path = ["-r"] label = "Reattach session" description = "Resume a detached screen session." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/screen.ts" license = "MIT" [[commands.subcommand.field]] id = "id" label = "Session" type = "string" position = 0 description = "pid, pid.tty.host or a session name; empty resumes the only one." sources = ["fig"] [[commands.subcommand.task]] id = "resume" label = "Resume" fields = ["id"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["id"] [[commands.subcommand]] path = ["-dmS"] label = "Start detached session" description = "Start a screen session in detached mode." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/screen.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Session name" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.task]] id = "start" label = "Start" fields = ["name"] required = ["name"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name"]