We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa99e91 commit 92acedeCopy full SHA for 92acede
src/repl.ts
@@ -1,13 +1,17 @@
1
import { getProcess } from './getProcess';
2
3
export const send = (command: string) => {
4
- const proc = getProcess();
5
- proc.stdin.write(command);
+ const lines = command.split('\n');
+ const proc = getProcess();
6
+ proc.stdin.write(':{\n');
7
+ lines.forEach((line) => {
8
+ proc.stdin.write(line);
9
proc.stdin.write('\n');
10
+ });
11
+ proc.stdin.write(':}\n');
12
};
13
14
export const quit = () => {
- proc.kill();
-}
-
15
16
+ proc.kill();
17
+};
0 commit comments