Reputation: 1909
I've added the line to my .mongorc.js:
var EDITOR = "C:\\Windows\\notepad.exe";
When I run edit q
from mongo shell it opens notepad with the following content:
Same thing happens with vim. The editing works just OK, i.e. if I remove the line and write what I need, it's passed to shell properly.
Any ideas on how to get rid of that line?
Upvotes: 2
Views: 920
Reputation: 151132
As for the undefined
part, the reason is that you have no content in what you are trying to edit.
If you follow the section as described in the FAQ:
Define a function myFunction
function myFunction() {}
Then edit with your editor:
edit myFunction
Everything will work as expected. So the problem was your q
thingy was not defined, hence the output.
The other characters are likely a system code page issue. I'm not sure if interaction with the shell expects ANSI or whether UTF-8 is okay. But anything else or UTF-16 might cause the issue. Hard to tell without knowing what language setting you have, etc.
Upvotes: 1