TylerBrock / mongo-hacker

MongoDB Shell Enhancements for Hackers
tylerbrock.github.io/mongo-hacker
MIT License
1.79k stars 235 forks source link

Edit function has ASCII color codes #199

Closed roguh closed 5 years ago

roguh commented 5 years ago

I saw https://github.com/TylerBrock/mongo-hacker/issues/13, but I'm still getting color codes around functions I edit.

Mongo shell:

mongos> function test() { return }
mongos> edit test
2018-11-29T14:29:23.279-0800 E QUERY    [js] SyntaxError: illegal character @tojs:1:7
error executing assignment: test = function test() { return }

My editor sees:

 ^[[35mfunction test() { return }^[[m

I have to strip color codes before editing if I want mongo to accept my edits. Any help would be appreciated.

jemag commented 5 years ago

I have the same problem here. Using vim as $EDITOR