HomeTutorials › Grid & Bulk Ops
Grid & Bulk Ops

Batch Commands (##cmd)

#032 0:12 Part of the Rysh video series

Run the same command across every pane in a scope at once.

Batch Commands (##cmd) — 0:12 walkthrough

What you'll see

  1. Build a few panes (##new grid 3).
  2. ##cmd stack pwd -- run a command in every pane of the stack.
  3. Show the scope range: pane / pg / stack / lane / tab / ws.
  4. Use selectors --tab / --lane / --pg / --pane to target precisely.

Commands shown

rysh
##new grid 3
##cmd stack pwd
##cmd lane echo building
##cmd tab git status

Keys used

EnterEscape

Transcript

0:00Run the same command across every pane in a scope at once.

0:03Start rysh and create a few panes so the batch has something to fan out across.

0:09The cmd command takes a scope and a shell command. Cmd stack pwd runs pwd in every pane of the stack -- one line in, one line per pane out.

0:20Scopes range from a single pane up to the whole workspace: pane, pg, stack, lane, tab, and ws. Cmd lane echoes a build into every pane of the lane.

0:30Need to target somewhere you're not focused? Add selectors like --tab, --lane, --pg, or --pane to aim the batch precisely.

0:40One command, fanned out across your whole layout.

Key takeaway
##cmd <scope> <command> fans one shell command out across every pane in the chosen scope.