diff --git a/.gitmodules b/.gitmodules index b4a5a6c1..de5dc32b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "zmodemjs"] - path = demo/zmodemjs + path = src/addons/zmodem/zmodemjs url = https://github.com/FGasper/zmodemjs.git diff --git a/demo/app.js b/demo/app.js index 87c4a6ef..0b68f409 100644 --- a/demo/app.js +++ b/demo/app.js @@ -29,10 +29,17 @@ app.get('/js/*.js', function(req, res){ res.sendFile(__dirname + req.url); }); +var shell_args = { + bash: ['--login'], + 'cmd.exe': [], +}; + +var shell_name = process.platform === 'win32' ? 'cmd.exe' : 'bash'; + app.post('/terminals', function (req, res) { var cols = parseInt(req.query.cols), rows = parseInt(req.query.rows), - term = pty.spawn(process.platform === 'win32' ? 'cmd.exe' : 'bash', [], { + term = pty.spawn(shell_name, shell_args[shell_name], { encoding: null, name: 'xterm-color', cols: cols || 80, diff --git a/demo/index.html b/demo/index.html index 109a7bd3..ce3c23de 100644 --- a/demo/index.html +++ b/demo/index.html @@ -16,7 +16,7 @@ - +