-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.1.6
-
Component/s: Embedded Shell
-
None
-
Environment:mac OS 11.6.2
mongosh 1.1.6
-
2
-
Not Needed
-
Iteration Xochimilco, Iteration Yonkers
Problem Statement/Rationale
What is going wrong? What action would you like the Engineering team to take?
The editor fails to edit the buffer when the editor is set to 'vi'
```
$ edit
Opening an editor...
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `vi edit-ObjectId("61e5db91025954908da142fd").js'
```
Steps to Reproduce
How could an engineer replicate the issue you’re reporting?
- set editor, i.e. `config.set( "editor", "vi" )`
- have a valid query in the buffer
- attempt to edit query in buffer, i.e. `edit`
I see the same outcome when setting the editor to 'vim'.
NOTE : both 'vi' and 'vim on available on host
{{$ which vi
}}/usr/bin/vi
{{$ which vim
}}/usr/bin/vim
```
Expected Results
What do you expect to happen?
'vi' is launched with contents of the buffer
Actual Results
What do you observe is happening?
An invalid filename is produced
Additional Notes
Any additional information that may be useful to include.