We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5afa537 commit 6f04818Copy full SHA for 6f04818
com/isoterminal/ISOTerminal.js
@@ -34,8 +34,18 @@ ISOTerminal.addEventListener = (event,cb) => {
34
ISOTerminal.listener[event].push(cb)
35
}
36
37
-ISOTerminal.prototype.exec = function(shellscript){
38
- this.send(`printf "\n\r"; ${shellscript}\n`,1)
+ISOTerminal.prototype.exec = function(opts){
+ const shellscript = opts[0];
39
+ const cb = opts[1];
40
+ if( cb ){
41
+ window.cb = cb
42
+ this.send(`printf "\n\r"; ${shellscript} &> /mnt/exec; js '
43
+ document.querySelector("[isoterminal]").emit("read_file", ["exec", window.cb ])
44
+ ';
45
+ \n`,1)
46
+ }else{
47
+ this.send(`printf "\n\r"; ${shellscript} \n`,1)
48
+ }
49
50
51
ISOTerminal.prototype.hook = function(hookname,args){
0 commit comments