tmux Scripting, Formats, and Automation/List panes with path and command

Inspect pane metadata.

Section: Listing and formats

List panes with path and command

bash
bash
tmux list-panes -a -F "#{session_name}:#{window_index}.#{pane_index} #{pane_current_path} #{pane_current_command}"
Explanation

Useful when scripting workspace reports or dashboards.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Listing and formats
List windows with a custom format
Print a compact machine-friendly window summary.
OpenIn sheetbashsame section
Print a format string
Evaluate a format without changing the UI.
OpenIn sheetbashsame section
Conditionally run a command
Branch based on shell command success.
OpenIn sheetbashsame section
Run an external shell command
Execute shell logic from tmux.
OpenIn sheetbashsame section
Build a session in the background
Create a detached session before laying out windows.
OpenIn sheetbash1 tag match
Send a command into a pane
Programmatically run startup commands.
OpenIn sheetbash1 tag match