[SERVER-14134] Setting mongodb editor path in mongorc on windows Created: 19/Nov/13  Updated: 10/May/22

Status: Backlog
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Community Support Automation Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Unresolved Votes: 0
Labels: Windows, community-team, move-sa, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: Windows
Participants:

 Description   

http://stackoverflow.com/questions/20026266
by: MigoFast

I'm trying to set the path to sublime text editor for mongodb in the .mongorc.js on windows 8 so I add this line to .mongorc.js ...
EDITOR = "C:
Program Files
Sublime Text 3\sublime_text.exe";

which when I start mongo.exe from the command prompt and then type:
> edit blah

it returns:
'C\Program' is not recognized as an internal or external command

so I try
EDITOR = "C:\\Program\u0020Files\\Sublime\u0020Text\u00203
sublime_text.exe";

and even
EDITOR = "C:\\Program%20Files\\Sublime%20Text%203
sublime_text.exe";

and I get
The system cannot find the path specified.



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Comment by Ben Creasy [ 23/Jul/15 ]

Seems like perhaps this should be closed.

Comment by Asya Kamsky [ 02/Jun/14 ]

Actually, it works fine, you just need just the right escaping.

See if this works for you:

> EDITOR="\"C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe\""
"C:\Program Files\Windows NT\Accessories\wordpad.exe"
> edit a

It worked for me.

Generated at Thu Feb 08 03:33:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.