diff --git a/HELP.md b/HELP.md index cfb5dd8d..3cf457a2 100644 --- a/HELP.md +++ b/HELP.md @@ -95,6 +95,7 @@ Cloud Commander supports command line parameters: | `--sync-console-path` | sync console path | `--terminal` | enable terminal | `--terminal-path` | set terminal path +| `--terminal-command` | set command to run in terminal (shell by default) | `--vim` | enable vim hot keys | `--columns` | set visible columns | `--export` | enable export of config through a server @@ -120,6 +121,7 @@ Cloud Commander supports command line parameters: | `--no-sync-console-path` | do not sync console path | `--no-contact` | disable contact | `--no-terminal` | disable terminal +| `--no-terminal-command` | set default shell to run in terminal | `--no-vim` | disable vim hot keys | `--no-columns` | set default visible columns | `--no-export` | disable export config through a server @@ -397,6 +399,7 @@ Here is description of options: "syncConsolePath" : false /* do not sync console path */ "terminal" : false, /* disable terminal */ "terminalPath" : '', /* path of a terminal */ + "terminalCommand" : '', /* set command to run in terminal */ "vim" : false, /* disable vim hot keys */ "columns" : "name-size-date-owner-mode", /* set visible columns */ "export" : false, /* enable export of config through a server */ diff --git a/app.json b/app.json index fa1a368f..8d64dc44 100644 --- a/app.json +++ b/app.json @@ -52,6 +52,11 @@ "value": "gritty", "required": false }, + "CLOUDCMD_TERMINAL_COMMAND": { + "description": "set command to run in terminal (shell by default)", + "value": "", + "required": false + }, "CLOUDCMD_CONFIG_DIALOG": { "description": "show config dialog", "value": "false", diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index 94f65239..52b8726a 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -34,6 +34,7 @@ const args = require('minimist')(argv.slice(2), { 'root', 'prefix', 'terminal-path', + 'terminal-command', 'columns', 'import-url', 'import-token', @@ -95,6 +96,7 @@ const args = require('minimist')(argv.slice(2), { 'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')), 'config-dialog': choose(env.bool('config_dialog'), config('configDialog')), 'terminal-path': env('terminal_path') || config('terminalPath'), + 'terminal-command': env('terminal_command') || config('terminalCommand'), 'one-file-panel': choose(env.bool('one_file_panel'), config('oneFilePanel')), 'confirm-copy': choose(env.bool('confirm_copy'), config('confirmCopy')), 'confirm-move': choose(env.bool('confirm_move'), config('confirmMove')), @@ -143,6 +145,7 @@ function main() { config('contact', args.contact); config('terminal', args.terminal); config('terminalPath', args['terminal-path']); + config('terminalCommand', args['terminal-command']); config('editor', args.editor); config('prefix', args.prefix); config('root', args.root); diff --git a/json/config.json b/json/config.json index 3b741d6e..eea645c1 100644 --- a/json/config.json +++ b/json/config.json @@ -27,6 +27,7 @@ "syncConsolePath": false, "terminal": false, "terminalPath": "", + "terminalCommand": "", "showConfig": false, "showFileName": false, "vim": false, diff --git a/json/help.json b/json/help.json index 3dcd7ada..68b7df3a 100644 --- a/json/help.json +++ b/json/help.json @@ -27,6 +27,7 @@ "--contact ": "enable contact", "--terminal ": "enable terminal", "--terminal-path ": "set terminal path", + "--terminal-command ": "set command to run in terminal (shell by default)", "--vim ": "enable vim hot keys", "--columns ": "set visible columns", "--export ": "enable export of config through a server", @@ -53,6 +54,7 @@ "--no-sync-console-path ": "do not sync console path", "--no-contact ": "disable contact", "--no-terminal ": "disable terminal", + "--no-terminal-command ": "set default shell to run in terminal", "--no-vim ": "disable vim hot keys", "--no-columns ": "set default visible columns", "--no-export ": "disable export config through a server", diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index 0b8ef8b7..a00958b0 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -50,6 +50,7 @@ programs in browser from any computer, mobile or tablet device. --sync-console-path sync console path --terminal enable terminal --terminal-path set terminal path + --terminal-command set command to run in terminal (shell by default) --vim enable vim hot keys --columns set visible columns --export enable export of config through a server @@ -75,6 +76,7 @@ programs in browser from any computer, mobile or tablet device. --no-console disable console --no-sync-console-path do not sync console path --no-terminal disable terminal + --no-terminal-command set default shell to run in terminal --no-vim disable vim hot keys --no-columns set visible default columns --no-export disable export of config through a server diff --git a/server/cloudcmd.js b/server/cloudcmd.js index 7dfcd2b0..046ff1a4 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -149,6 +149,7 @@ function listen(prefix, socket) { config('terminal') && terminal().listen(socket, { auth, prefix: prefix + '/gritty', + command: config('terminalCommand'), }); distribute.export(socket);