Module: Ace::Tmux::CLI

Extended by:
Support::Cli::RegistryDsl
Defined in:
lib/ace/tmux/cli.rb,
lib/ace/tmux/cli/commands/list.rb,
lib/ace/tmux/cli/commands/send.rb,
lib/ace/tmux/cli/commands/wait.rb,
lib/ace/tmux/cli/commands/start.rb,
lib/ace/tmux/cli/commands/attach.rb,
lib/ace/tmux/cli/commands/detach.rb,
lib/ace/tmux/cli/commands/window.rb,
lib/ace/tmux/cli/commands/capture.rb,
lib/ace/tmux/cli/commands/list_presets.rb

Overview

ace-support-cli based CLI registry for ace-tmux

Defined Under Namespace

Modules: Commands

Constant Summary collapse

PROGRAM_NAME =
"ace-tmux"
REGISTERED_COMMANDS =

Application commands with descriptions (for help output)

[
  ["start", "Start tmux session from preset"],
  ["window", "Add window to existing session"],
  ["list", "List live tmux sessions, windows, or panes"],
  ["--list-presets", "List available tmux presets"],
  ["send", "Send submitted commands, raw text, or named keys to a pane"],
  ["capture", "Capture recent output from a pane"],
  ["wait", "Wait for a bounded tmux condition"],
  ["attach", "Attach to a tmux session"],
  ["detach", "Detach clients from a tmux session"]
].freeze
HELP_EXAMPLES =
[
  "ace-tmux start dev                    # Launch dev session preset",
  "ace-tmux window cc --root ~/project   # Add window to session",
  "ace-tmux --list-presets windows       # Available window presets",
  "ace-tmux list                         # Panes in the current window",
  "ace-tmux list --windows               # Windows in the current session",
  "ace-tmux send --pane %1 --cmd 'bundle exec rake test'      # Send command",
  "ace-tmux send --pane .1 --msg 'echo ready' --key Enter     # Current-window pane shortcut",
  "ace-tmux wait --session dev --for window-active --window work-fs # Wait for window",
  "ace-tmux capture --pane %1 --lines 40 # Capture pane output",
  "ace-tmux detach --session dev         # Detach session clients"
].freeze

Class Method Summary collapse

Class Method Details

.start(args) ⇒ Integer

Start the CLI

Parameters:

  • args (Array<String>)

    Command-line arguments

Returns:

  • (Integer)

    Exit code (0 for success, non-zero for failure)



54
55
56
# File 'lib/ace/tmux/cli.rb', line 54

def self.start(args)
  Ace::Support::Cli::Runner.new(self).call(args: args)
end