martanne/dvtm

Bracketed paste support

divVerent opened this issue · 0 comments

Some terminals such as rxvt-unicode have bracketed paste support which is a very convenient feature with some shells such as zsh; when pasting command text that contains newlines, zsh does not immediately execute but leaves it (with the newlines) in the editing mode so that one can e.g. remove the newlines when they've been in there accidentally (e.g. due to copypasting line-wrapped commands).

What does this have to do with dvtm? dvtm needs to:

  • Remember for each pane whether it should have bracketed paste currently enabled or not.
  • Forward this state appropriately to the terminal that is running dvtm (or maybe even always enable bracketed mode to the outside terminal).
  • Accept the escape sequences bracketing pastes, and translate and forward it to the current pane when pasting (when going with the always-enabled mode suggested above, dvtm will have to drop the brackets when the pane currently is not in bracketed mode).

FYI tmux currently has this support.