# LibTmux\Get-TmuxPane

- **Package:** LibTmux
- **Language:** PowerShell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-powershell/blob/06233d3c99b40a5bce966c9e1d358f346ff4de55/src/LibTmux.PowerShell/GetTmuxPaneCommand.cs#L7
- **Page:** https://libtmux.org/en/powershell/latest/reference/libtmux-get-tmuxpane/

```
Server (default):
Get-TmuxPane
    [-Server] <LibTmux.Server>
    [-Id <System.String>]
    [<CommonParameters>]

Session:
Get-TmuxPane
    [-Session] <LibTmux.Session>
    [-Id <System.String>]
    [<CommonParameters>]

Window:
Get-TmuxPane
    [-Window] <LibTmux.Window>
    [-Id <System.String>]
    [<CommonParameters>]
```

Read panes from a server, session or window.

Acquire panes from the native owning object. Id is an ordinal literal selector. Linked windows can expose multiple contextual placements of one physical pane. Use native [`Where-Object`](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/where-object?view=powershell-7.4) over the returned captured properties for local selection.

### Notes

[`CurrentCommand`](/en/csharp/latest/reference/libtmux-pane-currentcommand/) and [`CurrentPath`](/en/csharp/latest/reference/libtmux-pane-currentpath/) read captured data without I/O. Zero results emit nothing; one emits one object; many emit separate objects. Use @() for a stable array.

## Command details

- **Command type:** [`cmdlet`](/en/powershell/latest/reference/glossary/#cmdlet)
- **Default parameter set:** Server
- **Positional binding:** Enabled.
- **Pipeline inputs:** `LibTmux.Server`: Native pipeline type for this command.; `LibTmux.Session`: Native pipeline type for this command.; `LibTmux.Window`: Native pipeline type for this command.
- **Outputs:** `LibTmux.Pane`

Related APIs:

- [Task guide](https://github.com/libtmux/libtmux-powershell/blob/fa5e60c48b312eb0d957d02aad9edcfc50cff359/docs/read.md)

## Examples

Example 1

List panes on the existing server identified by $SocketPath.

[Source example](https://github.com/libtmux/libtmux-powershell/blob/fa5e60c48b312eb0d957d02aad9edcfc50cff359/docs/reference/LibTmux/Get-TmuxPane.md).

```powershell
LibTmux\New-TmuxServer -SocketPath $SocketPath | LibTmux\Get-TmuxPane
```

## Parameters

- `Server` (`LibTmux.Server`): The server whose panes are read. (for `Server`)
  Required. Position 0. Accepts pipeline input by value. [`ValidateNotNull()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnullattribute?view=powershellsdk-7.4.0).
- `Id` (`System.String`): An ordinal, literal pane identifier selector.
  Optional. Named parameter. Does not accept pipeline input. [`ArgumentCompleter("LibTmux.PowerShell.PaneSelectorCompleter")`](https://learn.microsoft.com/dotnet/api/system.management.automation.argumentcompleterattribute?view=powershellsdk-7.4.0). [`ValidateNotNullOrEmpty()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnulloremptyattribute?view=powershellsdk-7.4.0).
- `Verbose` (`System.Management.Automation.SwitchParameter`): Display verbose messages produced by this command.
  Optional. Named parameter. Switch parameter. Common parameter. Does not accept pipeline input. Aliases: `vb`.
- `Debug` (`System.Management.Automation.SwitchParameter`): Display debug messages produced by this command.
  Optional. Named parameter. Switch parameter. Common parameter. Does not accept pipeline input. Aliases: `db`.
- `ErrorAction` (`System.Management.Automation.ActionPreference`): Choose how this command responds to non-terminating errors.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ea`.
- `WarningAction` (`System.Management.Automation.ActionPreference`): Choose how this command responds to warning messages.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `wa`.
- `InformationAction` (`System.Management.Automation.ActionPreference`): Choose how this command handles information messages.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `infa`.
- `ProgressAction` (`System.Management.Automation.ActionPreference`): Choose how this command handles progress updates.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `proga`.
- `ErrorVariable` (`System.String`): Store the command's error records in the named variable.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ev`.
- `WarningVariable` (`System.String`): Store the command's warning records in the named variable.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `wv`.
- `InformationVariable` (`System.String`): Store the command's information records in the named variable.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `iv`.
- `OutVariable` (`System.String`): Save output in the named variable while passing it down the pipeline.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ov`.
- `OutBuffer` (`System.Int32`): Buffer output before passing it to the next pipeline command.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ob`.
- `PipelineVariable` (`System.String`): Make the most recent output object available through a named variable within the pipeline.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `pv`.
- `Session` (`LibTmux.Session`): The session whose panes are read. (for `Session`)
  Required. Position 0. Accepts pipeline input by value. [`ValidateNotNull()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnullattribute?view=powershellsdk-7.4.0).
- `Window` (`LibTmux.Window`): The window whose panes are read. (for `Window`)
  Required. Position 0. Accepts pipeline input by value. [`ValidateNotNull()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnullattribute?view=powershellsdk-7.4.0).

## Returns

`LibTmux.Pane`: Native pipeline type for this command.

## tmux command

The tmux commands behind `Get-TmuxPane`.

- [`list-panes`](/en/tmux/latest/manual/list-panes/) `-a` server scope, [`cmd_list_panes_server`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_server/) (source: `Calls LibTmux.Server.CaptureSnapshotAsync: src/LibTmux/Snapshots/ServerSnapshot.cs:120`)
- [`list-panes`](/en/tmux/latest/manual/list-panes/) `-s` session scope, [`cmd_list_panes_session`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_session/) (source: `Calls LibTmux.Session.GetPanesAsync: src/LibTmux/Session.Relations.cs:167`)
- [`list-panes`](/en/tmux/latest/manual/list-panes/) `-t` window scope, [`cmd_list_panes_window`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_window/) (source: `Calls LibTmux.Window.GetPanesAsync: src/LibTmux/Window.Relations.cs:121`)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_list_panes_entry`](/en/tmux/latest/reference/c-variable-cmd_list_panes_entry/) (attribute)
- [`cmd_list_panes_server`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_server/) (function)
- [`cmd_list_panes_session`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_session/) (function)
- [`cmd_list_panes_window`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_window/) (function)

## Guides

Pages that discuss `Get-TmuxPane`.

### Concepts

- [Captured state and I/O](/en/powershell/latest/concepts/captured-state/)

### Guides

- [Send input to a pane](/en/powershell/latest/guides/input/)
- [Arrange panes and resize windows](/en/powershell/latest/guides/layout/)
- [Read tmux objects](/en/powershell/latest/guides/read/)

## In other ports

A tmux pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane`](/en/py/latest/reference/libtmux-pane/) (class) |
| Ruby | [`LibTmux::Pane`](/en/ruby/latest/reference/libtmux-pane-14z6/) (class) |
| Lua | [`libtmux.Pane`](/en/lua/latest/reference/libtmux-pane/) (class) |
| Julia | [`LibTmux.PaneSnapshot`](/en/julia/latest/reference/libtmux-panesnapshot/) (struct). `PaneSnapshot` holds captured pane data. Actions use its `PaneRef`; `PaneOccurrence` adds a window placement in a session. |
| Elixir | [`LibTmux.Pane`](/en/elixir/latest/reference/libtmux-pane/) (struct). `Pane` is an immutable physical pane observation. It does not send keys or capture text. |
| TypeScript | [`pane.Pane`](/en/ts/latest/reference/pane-pane/) (class) |
| Rust | [`pane.Pane`](/en/rs/latest/reference/pane-pane/) (struct) |
| Go | [`tmux.Pane`](/en/go/latest/reference/tmux-pane/) (struct) |
| Java | [`io.github.libtmux.Pane`](/en/java/latest/reference/io-github-libtmux-pane-pane/) (class) |
| Kotlin | [`io.github.libtmux.kotlin.Pane`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-pane/) (class) |
| Scala | [`io.github.libtmux.scaladsl.Pane`](/en/scala/latest/reference/io-github-libtmux-scaladsl-pane/) (typealias) |
| C# | [`LibTmux.Pane`](/en/csharp/latest/reference/libtmux-pane/) (class) |
| F# | [`LibTmux.FSharp.Pane`](/en/fsharp/latest/reference/libtmux-fsharp-pane/) (module). This F# module reads captured fields and starts explicit operations on the shared .NET `LibTmux.Pane` type. |
| C++ | [`libtmux::Pane`](/en/cxx/latest/reference/libtmux-pane/) (class) |
| Swift | [`Pane`](/en/swift/latest/reference/pane/) (struct) |

List a window's panes

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.panes`](/en/py/latest/reference/libtmux-window-panes/) (property) |
| Ruby | [`LibTmux::Window#list_panes`](/en/ruby/latest/reference/libtmux-window-list_panes/) (method) |
| Julia | [`LibTmux.panes`](/en/julia/latest/reference/libtmux-panes/) (function). `panes` with a captured `WindowSnapshot` reads panes in that window; missing coverage is an error. |
| TypeScript | [`window.Window.panes`](/en/ts/latest/reference/window-window-panes/) (method) |
| Rust | [`window.Window.panes`](/en/rs/latest/reference/window-window-panes/) (method) |
| Go | [`tmux.Window.Panes`](/en/go/latest/reference/tmux-window-panes/) (method) |
| Java | [`io.github.libtmux.Window.panes`](/en/java/latest/reference/io-github-libtmux-window-window-panes/) (method) |
| Kotlin | [`io.github.libtmux.kotlin.Window.panes`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-window-panes/) (property) |
| Scala | [`io.github.libtmux.scaladsl.Window.panes`](/en/scala/latest/reference/io-github-libtmux-scaladsl-window-panes/) (method) |
| C# | [`LibTmux.Window.Panes`](/en/csharp/latest/reference/libtmux-window-panes/) (property) |
| F# | [`LibTmux.FSharp.Window.panes`](/en/fsharp/latest/reference/libtmux-fsharp-window-panes/) (function). Builds a deferred pane query from one `LibTmux.Window` and its server. `Query.list` acquires panes scoped to that window ID. |
| C++ | [`libtmux::Window::panes`](/en/cxx/latest/reference/libtmux-window-panes/) (method) |
| Swift | [`Snapshot.panes(of:)`](/en/swift/latest/reference/snapshot-panes(of-)/) (method) |

No equivalent is recorded in Lua or Elixir.

List a session's panes

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session.panes`](/en/py/latest/reference/libtmux-session-panes/) (property) |
| Ruby | [`LibTmux::Session#list_panes`](/en/ruby/latest/reference/libtmux-session-list_panes/) (method) |
| Julia | Traverse `windows(session)` and `panes(window)` in the captured snapshot. `panes(snapshot)` has server-wide scope. |
| TypeScript | [`session.Session.panes`](/en/ts/latest/reference/session-session-panes/) (method) |
| Rust | [`session.Session.panes`](/en/rs/latest/reference/session-session-panes/) (method) |
| Go | [`tmux.Session.Panes`](/en/go/latest/reference/tmux-session-panes/) (method) |
| Java | no direct accessor; traverse Session.windows and Window.panes |
| C# | [`LibTmux.Session.Panes`](/en/csharp/latest/reference/libtmux-session-panes/) (property) |
| F# | [`LibTmux.FSharp.Session.panes`](/en/fsharp/latest/reference/libtmux-fsharp-session-panes/) (function). Builds a deferred pane query from one `LibTmux.Session` and its server. `Query.list` acquires panes across that session’s windows. |
| C++ | [`libtmux::Session::panes`](/en/cxx/latest/reference/libtmux-session-panes/) (method) |
| Swift | [`Snapshot.panes(of:)`](/en/swift/latest/reference/snapshot-panes(of-)/) (method) |

No equivalent is recorded in Lua, Elixir, Kotlin or Scala.

List the server's panes

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.panes`](/en/py/latest/reference/libtmux-server-panes/) (property) |
| Ruby | [`LibTmux::Server#list_panes`](/en/ruby/latest/reference/libtmux-server-list_panes/) (method) |
| Lua | [`libtmux.Snapshot.panes`](/en/lua/latest/reference/libtmux-snapshot-panes/) (attribute) |
| Julia | [`LibTmux.panes`](/en/julia/latest/reference/libtmux-panes/) (function). `panes` with a `Snapshot` reads every captured physical pane. Use `paneoccurrences` for session placements. |
| Elixir | [`LibTmux.Snapshot.panes/1`](/en/elixir/latest/reference/libtmux-snapshot-panes-1/) (function). Returns a `Selection` of every captured physical pane without contacting tmux. |
| TypeScript | [`server.Server.panes`](/en/ts/latest/reference/server-server-panes/) (method) |
| Rust | [`server.Server.panes`](/en/rs/latest/reference/server-server-panes/) (method) |
| Go | [`tmux.Server.Panes`](/en/go/latest/reference/tmux-server-panes/) (method) |
| Java | [`io.github.libtmux.Server.panes`](/en/java/latest/reference/io-github-libtmux-server-server-panes/) (method) |
| Kotlin | [`io.github.libtmux.kotlin.Server.panes`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-server-panes/) (method) |
| Scala | [`io.github.libtmux.scaladsl.Server.panes`](/en/scala/latest/reference/io-github-libtmux-scaladsl-server-panes/) (method) |
| C# | [`LibTmux.Server.Panes`](/en/csharp/latest/reference/libtmux-server-panes/) (property) |
| F# | [`LibTmux.FSharp.Server.panes`](/en/fsharp/latest/reference/libtmux-fsharp-server-panes/) (function). Builds a deferred pane query on the shared .NET `LibTmux.Server`. `Query.list` acquires panes across that server. |
| C++ | [`libtmux::Server::panes`](/en/cxx/latest/reference/libtmux-server-panes/) (method) |
| Swift | [`Server.panes()`](/en/swift/latest/reference/server-panes()/) (method) |
