Files
iris-context/commands/sys/tmux.go
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

107 lines
6.3 KiB
Go

package sys
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "tmux",
Description: "Format output",
Subcommands: []spec.Subcommand{
{Name: "a", Description: "Attach to last session"},
{Name: "working-directory", Description: "The session's working directory"},
{Name: "bind", Description: "Bind a key to a command"},
{Name: "key", Description: "The key to bind"},
{Name: "command", Description: "The command to bind to the key"},
{Name: "arguments", Description: "Arguments for the command"},
{Name: "breakp", Description: "Break a pane from an exiting into a new window"},
{Name: "capturep", Description: "Capture the contents of a pane to a buffer"},
{Name: "choose-buffer", Description: "Put a pane into buffer choice mode"},
{Name: "choose-client", Description: "Put a pane into buffer client mode"},
{Name: "choose-tree", Description: "Put a pane into buffer tree mode"},
{Name: "clearhist", Description: "Remove and clear history for a pane"},
{Name: "clock-mode", Description: "Enter clock mode"},
{Name: "command-prompt", Description: "Open the tmux command prompt in a client"},
{Name: "template", Description: "If specified, used as a command"},
{Name: "confirm", Description: "Run a command but ask for confirmation before"},
{Name: "copy-mode", Description: "Enter copy mode"},
{Name: "deleteb", Description: "Delete a paste buffer"},
{Name: "detach", Description: "Detach a client from the server"},
{Name: "shell-command", Description: "The shell-command to run"},
{Name: "menu", Description: "Display menu on target-client"},
{Name: "name", Description: "The name of the menu"},
{Name: "display", Description: "Display a message in the status line"},
{Name: "message", Description: "The message to display"},
{Name: "displayp", Description: "Display an indicator for each visible pane"},
{Name: "duration", Description: "The duration to close the indicator after in milliseconds"},
{Name: "findw", Description: "Search for a pattern in windows"},
{Name: "match-string", Description: "A string to search for"},
{Name: "has", Description: "Check and report if a session exists on the server"},
{Name: "if", Description: "Execute a tmux command if a shell-command succeeded"},
{Name: "joinp", Description: "Split a pane and move an existing one into the new space"},
{Name: "size", Description: "The size of the new space"},
{Name: "killp", Description: "Destroy a given pane"},
{Name: "kill-server", Description: "Kill clients, session and server"},
{Name: "kill-ses", Description: "Kill/delete sessions"},
{Name: "killw", Description: "Destroy a given window"},
{Name: "lastp", Description: "Select the previously selected pane"},
{Name: "last", Description: "Select the previously selected window"},
{Name: "linkw", Description: "Link a window to another"},
{Name: "lsb", Description: "List paste buffers of a session"},
{Name: "lsc", Description: "List clients attached to a server"},
{Name: "lscm", Description: "List supported sub-commands"},
{Name: "lsk", Description: "List all key-bindings"},
{Name: "lsp", Description: "List panes of a window"},
{Name: "ls", Description: "List sessions managed by a server"},
{Name: "lsw", Description: "List windows of a session"},
{Name: "loadb", Description: "Load a file into a paste buffer"},
{Name: "path", Description: "Load from this path"},
{Name: "lockc", Description: "Lock a client"},
{Name: "lock", Description: "Lock all clients attached to the server"},
},
Options: []spec.Option{
{Name: "-F", Description: "Format output"},
{Name: "-f", Description: "Set client flags"},
{Name: "-d", Description: "Detach all others clients to the session"},
{Name: "-x", Description: "Send SIGHUP to the parent process and detach the client"},
{Name: "-c", Description: "Set the session's working directory"},
{Name: "-E", Description: "Don't use update-environment option"},
{Name: "-t", Description: "Attach to a session with the given name"},
{Name: "-n", Description: "Alias for -T root"},
{Name: "-r", Description: "Indicate that this key may repeat"},
{Name: "-N", Description: "Attach a note to the key"},
{Name: "-T", Description: "The key table to use"},
{Name: "-a", Description: "Move the window to the next index after"},
{Name: "-b", Description: "Move the window to the next index before"},
{Name: "-P", Description: "Print information about the new window"},
{Name: "-s", Description: "The source pane"},
{Name: "-e", Description: "Include escape sequences for text and background attributes"},
{Name: "-p", Description: "Redirect output to stdout"},
{Name: "-C", Description: "Escape non-printable characters as octal"},
{Name: "-J", Description: "Preserve trailing spaces and join any wrapped lines"},
{Name: "-S", Description: "Starting line number"},
{Name: "-Z", Description: "Zoom the pane"},
{Name: "-O", Description: "Specify the sort order"},
{Name: "-G", Description: "Include all sessions in any session group in the tree"},
{Name: "-w", Description: "Start with windows collapsed"},
{Name: "-l", Description: "The prompt only accept one key press"},
{Name: "-i", Description: "Execute the command every time the prompt input changes"},
{Name: "-k", Description: "Like -l but the key press is translated to a key name"},
{Name: "-W", Description: "Tell that the prompt is for a window"},
{Name: "-I", Description: "Comma-separated list of the initial text for each prompt"},
{Name: "-H", Description: "Hide the position indicator"},
{Name: "-M", Description: "Begin a mouse drag"},
{Name: "-q", Description: "Cancel copy mode and any other modes"},
{Name: "-u", Description: "Scroll one page up"},
{Name: "-y", Description: "Give the y position of the menu"},
{Name: "-v", Description: "Print verbose logging as the format is parsed"},
{Name: "-A", Description: "Behave like attach-session if session-name already exist"},
{Name: "-D", Description: "Behave like -d if -A is set"},
{Name: "-X", Description: "Behave like -x if -A is set"},
{Name: "-o", Description: "Only open a new pipe if no previous pipe exists"},
{Name: "-L", Description: "Allow the visible portion of a window to be changed"},
},
})
}