(editor: string)
| 13 | import {parse} from 'shell-quote'; |
| 14 | |
| 15 | function isTerminalEditor(editor: string): boolean { |
| 16 | switch (editor) { |
| 17 | case 'vim': |
| 18 | case 'emacs': |
| 19 | case 'nano': |
| 20 | return true; |
| 21 | default: |
| 22 | return false; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // Map from full process name to binary that starts the process |
| 27 | // We can't just re-use full process name, because it will spawn a new instance |