How op copy-paste multi line from/to terminal (no linebreaks)?


#1

I try to copy multiple lines from my editor into the terminal. This fails, since the newlines are removed and everything is written into a single line.
Trying to use the CommandSplitter plugin and replace all newlines with colons doesn't help, since the terminal window doesn't seem to use the CommandSplitter plugin.

Also the other direction doesn't work as expected: I run M503 and try to copy the output into an editor, but the result is only one line and I manually have to reconstruct the newlines (before Recv:).

Is there any trick or workaround to handle newlines correct?

I work on Linux with Emacs as my editor and use the copy&paste via mouse buttons (left one copy, middle button paste), and also tried Ctrl-C, Ctrl-V with some application that support this, but I loose the newlines there also...

Octoprint is 1.3.10 with several plugins on Octopi 0.15.1.


#2

I've just done a multi-line copy from my test rig's Terminal tab to here. Cmd-C & Cmd-V since I'm on a Mac. On Linux, you'd expect that to be something else. Ctl-C often in the UNIX world means something special, for what it's worth. Try to figure out the keyboard way for your particular flavor of Linux and see if that's any different. (I've verified that it also works using only the mouse on the Mac.)

Changing monitoring state from "Offline" to "Opening serial port"
Connected to: VIRTUAL(read_timeout=10.0,write_timeout=10.0,options={'enabled': True}), starting monitor
Changing monitoring state from "Opening serial port" to "Connecting"
Recv: start
Recv: Marlin: Virtual Marlin!
Send: N0 M110 N0*125
Recv: �
Recv: SD card ok
Send: N0 M110 N0*125
Recv: ok
Changing monitoring state from "Connecting" to "Operational"
Send: N0 M110 N0*125
Recv: ok
Recv: ok
S

Regarding entering multiple lines into the Terminal... colons actually mean something so you can't use them as something already. Perhaps you meant semicolons which are used to mark comments to the end of the line.

There's probably a way of using snippets.


#3

You are right. The copy from browser/octoprint seems to be a firefox triggered issue. When I try the same with chrome, this works as expected.

Anyway, the opposite direction (pasting into octoprint) still kills all linefeeds, independently from the browser.


#4

See if you can figure out how to make and then call a snippet.


#5

Since I usually want to past different content, this isn't completely, what I'm looking for, but it may be a workaround (temporarily create a snippet, execute it, and remove it afterwards)...