Pasting from Word Doc To Findings To Terminal app [Bugreport for OS365 to terminal - Findings not technically involved]]

What I did: write my code in a “text” editor. It was Microsoft Word. Then copy and pasted the text from the word document to Findings. Then pasted the Findings text directly to the Mac Terminal app.

What happened: The Terminal app did not run the code and said the files were not found.

What I expected: for the code to run.

Things that might be helpful to know (Findings version, OS and model, etc):
Recent findings.

So here’s why my development cycle is like this. I have to use a windows computer at work as my primary computer. I then copy and paste my commands into an Office 365 word document so that I can have the same doc opened on a Windows and Mac computer. I then can archive and maintain my code base in Findings. Once everything looks great I use the Mac to run the protocol based code. However, it appears that the Terminal app on the Mac doesn’t like the direct copy and paste text from the MS word pasted from Findings.

A bug is a strong word here. Just thought I would put this out there.

1 Like

Hi Peter,

Can you share an example of such Terminal commands? If the error message says the files are not there, it might be because there are files on your Windows computer referenced by the terminal commands that are not present on your Mac.

Thanks for your patience,

Charles

No worries, I can get the commands to function, but just thought I would documents this strange situation.
The commands are all relatively standard terminal commands.
“ls file.txt”
“ls _only/.fasta | wc -l” // I am trying to count the number of .fasta files present across multiple *_only folders.

It is not the commands themselves as far as I can tell. For instance if I copy and paste the command in the terminal window from the OS365 Word document; the command fails. However, if I then retype as is the same command on in terminal window it runs fine.

Oddly enough I am connected to the same server that I access via the terminal app. I have also checked multiple times that everything is there to be certain.

It appears that copy and pasting from OS365 Word to Findings creates a white highlight effect around the code, and if I remove this by retyping the exact code. I am able to copy and paste from Findings to the Terminal app just fine.

Thanks for the additional details! You mention the white highlight effect: that may indeed be an issue… For this, I would recommend you use the command ‘Paste and Match Style’ instead of just ‘Paste’ when copying from Word: this will paste only the text, without any formatting.

Also, just in case: make sure the quotes are not made into curly quotes when using Word…

One last question: do you have also an issue with the terminal commands pasted from Word into Terminal?

Have a nice week,

Charles

the Paste and match style is a great idea! I’ll try that and see how it goes.

Yes the two issues I have are:
Word -> terminal
Word -> Findings -> terminal

what works:
Terminal -> Findings -> terminal
So if I copy and paste into terminal then copy and paste that into findings and back into Terminal. Everything functions correctly!

OK, so it looks like it’s really Word doing something fishy… :wink:

I’d try to copy and paste part of the commands and completing manually to see which parts are making a mess.

Or use HexFiend (paste into a text file in TextEdit, set to plain text, then open the resulting file in HexFiend) to find which bytes are messed up by Word.

Charles

It is always involved in something fishy. So the copy and paste with text matching (cmd + shift + v) works great, and I’ll do that for now. Updated the bugreport title to better reflect who is a fault here :slight_smile: Thanks for you help with this.

Peter

1 Like