jsir 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cmd/ooa.js +12 -0
- package/package.json +1 -1
package/cmd/ooa.js
CHANGED
|
@@ -346,6 +346,15 @@ function _nextLine(callback, preStr, hidden, resolve) {
|
|
|
346
346
|
input: process.stdin,
|
|
347
347
|
output: process.stdout
|
|
348
348
|
})
|
|
349
|
+
_rl.on("SIGINT", async () => {
|
|
350
|
+
if (_noAppendNextLine) {
|
|
351
|
+
process.exit(0);
|
|
352
|
+
} else {
|
|
353
|
+
_haveWrapperInput = true;
|
|
354
|
+
_rl.clearLine(0)
|
|
355
|
+
nextLine();
|
|
356
|
+
}
|
|
357
|
+
});
|
|
349
358
|
}
|
|
350
359
|
_haveStartRead = true
|
|
351
360
|
_haveWrapperInput = false
|
|
@@ -866,6 +875,9 @@ async function dealKeyword(str, strs, fstr, ostr) {
|
|
|
866
875
|
await fileLine(trim(ostr.join(' ')))
|
|
867
876
|
} else if (fstr === '%') {
|
|
868
877
|
listCmd(true)
|
|
878
|
+
} else if (fstr === 'q') {
|
|
879
|
+
console.log("Bye!")
|
|
880
|
+
process.exit(0)
|
|
869
881
|
} else {
|
|
870
882
|
await save(strs)
|
|
871
883
|
}
|