Copy the command output between the prompts #2343
-
Hi all, I've recently switched to WezTerm and I'm totally enjoying using it. Thank you for the awesome product and great community around it. Now I'm trying enrich my WezTerm experience with the custom feature to copy the text between the last prompt to the current prompt. This is pretty useful when I write an operation logs, such as bug report and runbook documentations. Though I have searched the way to fetch buffered text data from pane, I only could find I would like to get any ideas on how to get text between the prompts. The best case is to fetch the text between I was wondering if it's possible for Lua API to:
but I couldn't find the way to operate cursor in CopyMode. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hmm, I haven't tried to automate this or do it completely without the mouse so far. I use https://wezfurlong.org/wezterm/config/lua/keyassignment/SelectTextAtMouseCursor.html to grab the semantic zone when I triple click: local wezterm = require 'wezterm'
return {
mouse_bindings = {
{
event = { Down = { streak = 3, button = 'Left' } },
action = wezterm.action.SelectTextAtMouseCursor 'SemanticZone',
mods = 'NONE',
},
},
} I think it would be a reasonable request to expand copy mode to support something like |
Beta Was this translation helpful? Give feedback.
Hmm, I haven't tried to automate this or do it completely without the mouse so far. I use https://wezfurlong.org/wezterm/config/lua/keyassignment/SelectTextAtMouseCursor.html to grab the semantic zone when I triple click:
I think it would be a reasonable request to expand copy mode to support something like
act.CopyMode { SetSelectionMode = 'SemanticZone' }
as well asact.CopyMode 'MoveForwardSemanticZone
andact.CopyMode 'MoveBackwardSemanticZone'
and/orMov…