1

I'm using Tmux & Zsh (WSL) and am very frustrated with all the white-spaces that comes with when copy content from a file while using nano.

nano .zshrc

Copied From.

When using Shift+Right Mouse Button or Shift CTRL+C unwanted trailing white-spaces comes along in the content.

Content pasted to sublime.

Is there a solution?

4
  • If I'm seeing that correctly it looks like all your data is being put onto a single line and it's just word wrapping with what appears to be vscode. Is that correct?
    – jesse_b
    Jul 27, 2019 at 13:37
  • @Jesse_b Yes, single line with a crazy amount of white-spaces
    – Zoric
    Jul 27, 2019 at 15:01
  • I think the whitespace is almost irrelevant though, or at least not an accurate way to describe your problem. Your problem is mostly that all the newlines are being stripped.
    – jesse_b
    Jul 27, 2019 at 15:02
  • True, Any suggestions?
    – Zoric
    Jul 27, 2019 at 17:48

2 Answers 2

1

I found that horribly irritating too, and I disabled it with

unset zle_bracketed_paste

After that, you'll have to rely on the terminal emulator to handle all the copy-pasting.

You can read about zle_bracketed_paste in the zshparam(1) manpage.

Hopefully someone will answer you with the whole theory behind it.

2
  • Where did u place unset zle_bracketed_paste ?
    – Zoric
    Jul 27, 2019 at 20:01
  • In ~/.zshrc. Your problem may be different, caused by the terminal emulator. What terminal emulator are you using?
    – user313992
    Jul 28, 2019 at 7:35
0

For me it was set indicator (in ~/.nanorc or /etc/nanorc), too bad as I liked the scrollbar quite a lot :(

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .