wezterm-send.nvim
April 13, 2025 ยท View on GitHub
A Neovim plugin for easily sending commands to WezTerm panes.
Installation
- lazy
return { "zsh-sage/wezterm-send.nvim", dependencies = { 'willothy/wezterm.nvim', config = true }, }
Configuration
- Default options:
return { "zsh-sage/wezterm-send.nvim", dependencies = { 'willothy/wezterm.nvim', config = true }, opts = { -- Automatically unzoom the WezTerm pane if it's zoomed auto_unzoom = true, -- Automatically activate/focus the WezTerm pane before sending the command auto_activate_pane = false, -- Directory where the toggle_terminal.wez JSON file is stored wezterm_config_dir = "~/.config/wezterm/", }, }
Usage
This plugin is designed to be used alongside the toggle_terminal.wez WezTerm plugin, which helps manage a dedicated terminal pane.
-
Available user commands:
Command Description WeztermExecPaneId <pane_id> <command>Executes <command>in the pane with the specified<pane_id>.WeztermExecJson <command>Executes <command>in the pane specified by the JSON file generated by toggle_terminal.wez.WeztermSendPaneId <pane_id> <command>Sends <command>to the pane with the specified<pane_id>without executing it immediately (appends to the prompt).WeztermSendJson <command>Sends <command>to the pane specified by the JSON file from toggle_terminal.wez without executing it immediately (appends to the prompt). -
You can determine the target pane ID by running the following command within that WezTerm pane:
echo $WEZTERM_PANE