pass pane-id to wezterm cli

This commit is contained in:
Yukai Huang 2024-02-15 18:22:10 +08:00
parent b838d58e1a
commit 97a50a2352
No known key found for this signature in database
GPG Key ID: D4D3B2F0E99D4914

View File

@ -20,7 +20,7 @@ wezterm-terminal-vertical <program> [<arguments>]: create a new terminal as a we
The current pane is split into two, top and bottom The current pane is split into two, top and bottom
The program passed as argument will be executed in the new terminal' \ The program passed as argument will be executed in the new terminal' \
%{ %{
wezterm-terminal-impl split-pane --cwd "%val{client_env_PWD}" --bottom -- %arg{@} wezterm-terminal-impl split-pane --cwd "%val{client_env_PWD}" --bottom --pane-id "%val{client_env_WEZTERM_PANE}" -- %arg{@}
} }
complete-command wezterm-terminal-vertical shell complete-command wezterm-terminal-vertical shell
@ -29,7 +29,7 @@ wezterm-terminal-horizontal <program> [<arguments>]: create a new terminal as a
The current pane is split into two, left and right The current pane is split into two, left and right
The program passed as argument will be executed in the new terminal' \ The program passed as argument will be executed in the new terminal' \
%{ %{
wezterm-terminal-impl split-pane --cwd "%val{client_env_PWD}" --right -- %arg{@} wezterm-terminal-impl split-pane --cwd "%val{client_env_PWD}" --right --pane-id "%val{client_env_WEZTERM_PANE}" -- %arg{@}
} }
complete-command wezterm-terminal-horizontal shell complete-command wezterm-terminal-horizontal shell
@ -37,7 +37,7 @@ define-command wezterm-terminal-tab -params 1.. -docstring '
wezterm-terminal-tab <program> [<arguments>]: create a new terminal as a wezterm tab wezterm-terminal-tab <program> [<arguments>]: create a new terminal as a wezterm tab
The program passed as argument will be executed in the new terminal' \ The program passed as argument will be executed in the new terminal' \
%{ %{
wezterm-terminal-impl spawn --cwd "%val{client_env_PWD}" -- %arg{@} wezterm-terminal-impl spawn --cwd "%val{client_env_PWD}" --pane-id "%val{client_env_WEZTERM_PANE}" -- %arg{@}
} }
complete-command wezterm-terminal-tab shell complete-command wezterm-terminal-tab shell
@ -45,7 +45,7 @@ define-command wezterm-terminal-window -params 1.. -docstring '
wezterm-terminal-window <program> [<arguments>]: create a new terminal as a wezterm window wezterm-terminal-window <program> [<arguments>]: create a new terminal as a wezterm window
The program passed as argument will be executed in the new terminal' \ The program passed as argument will be executed in the new terminal' \
%{ %{
wezterm-terminal-impl spawn --cwd "%val{client_env_PWD}" --new-window -- %arg{@} wezterm-terminal-impl spawn --cwd "%val{client_env_PWD}" --new-window --pane-id "%val{client_env_WEZTERM_PANE}" -- %arg{@}
} }
complete-command wezterm-terminal-window shell complete-command wezterm-terminal-window shell