mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(cloudcmd) --terminal-command: command to run in terminal (shell by default)
This commit is contained in:
parent
8660c06097
commit
7d552b4089
7 changed files with 17 additions and 0 deletions
3
HELP.md
3
HELP.md
|
|
@ -95,6 +95,7 @@ Cloud Commander supports command line parameters:
|
||||||
| `--sync-console-path` | sync console path
|
| `--sync-console-path` | sync console path
|
||||||
| `--terminal` | enable terminal
|
| `--terminal` | enable terminal
|
||||||
| `--terminal-path` | set terminal path
|
| `--terminal-path` | set terminal path
|
||||||
|
| `--terminal-command` | set command to run in terminal (shell by default)
|
||||||
| `--vim` | enable vim hot keys
|
| `--vim` | enable vim hot keys
|
||||||
| `--columns` | set visible columns
|
| `--columns` | set visible columns
|
||||||
| `--export` | enable export of config through a server
|
| `--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-sync-console-path` | do not sync console path
|
||||||
| `--no-contact` | disable contact
|
| `--no-contact` | disable contact
|
||||||
| `--no-terminal` | disable terminal
|
| `--no-terminal` | disable terminal
|
||||||
|
| `--no-terminal-command` | set default shell to run in terminal
|
||||||
| `--no-vim` | disable vim hot keys
|
| `--no-vim` | disable vim hot keys
|
||||||
| `--no-columns` | set default visible columns
|
| `--no-columns` | set default visible columns
|
||||||
| `--no-export` | disable export config through a server
|
| `--no-export` | disable export config through a server
|
||||||
|
|
@ -397,6 +399,7 @@ Here is description of options:
|
||||||
"syncConsolePath" : false /* do not sync console path */
|
"syncConsolePath" : false /* do not sync console path */
|
||||||
"terminal" : false, /* disable terminal */
|
"terminal" : false, /* disable terminal */
|
||||||
"terminalPath" : '', /* path of a terminal */
|
"terminalPath" : '', /* path of a terminal */
|
||||||
|
"terminalCommand" : '', /* set command to run in terminal */
|
||||||
"vim" : false, /* disable vim hot keys */
|
"vim" : false, /* disable vim hot keys */
|
||||||
"columns" : "name-size-date-owner-mode", /* set visible columns */
|
"columns" : "name-size-date-owner-mode", /* set visible columns */
|
||||||
"export" : false, /* enable export of config through a server */
|
"export" : false, /* enable export of config through a server */
|
||||||
|
|
|
||||||
5
app.json
5
app.json
|
|
@ -52,6 +52,11 @@
|
||||||
"value": "gritty",
|
"value": "gritty",
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
|
"CLOUDCMD_TERMINAL_COMMAND": {
|
||||||
|
"description": "set command to run in terminal (shell by default)",
|
||||||
|
"value": "",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
"CLOUDCMD_CONFIG_DIALOG": {
|
"CLOUDCMD_CONFIG_DIALOG": {
|
||||||
"description": "show config dialog",
|
"description": "show config dialog",
|
||||||
"value": "false",
|
"value": "false",
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ const args = require('minimist')(argv.slice(2), {
|
||||||
'root',
|
'root',
|
||||||
'prefix',
|
'prefix',
|
||||||
'terminal-path',
|
'terminal-path',
|
||||||
|
'terminal-command',
|
||||||
'columns',
|
'columns',
|
||||||
'import-url',
|
'import-url',
|
||||||
'import-token',
|
'import-token',
|
||||||
|
|
@ -95,6 +96,7 @@ const args = require('minimist')(argv.slice(2), {
|
||||||
'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')),
|
'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')),
|
||||||
'config-dialog': choose(env.bool('config_dialog'), config('configDialog')),
|
'config-dialog': choose(env.bool('config_dialog'), config('configDialog')),
|
||||||
'terminal-path': env('terminal_path') || config('terminalPath'),
|
'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')),
|
'one-file-panel': choose(env.bool('one_file_panel'), config('oneFilePanel')),
|
||||||
'confirm-copy': choose(env.bool('confirm_copy'), config('confirmCopy')),
|
'confirm-copy': choose(env.bool('confirm_copy'), config('confirmCopy')),
|
||||||
'confirm-move': choose(env.bool('confirm_move'), config('confirmMove')),
|
'confirm-move': choose(env.bool('confirm_move'), config('confirmMove')),
|
||||||
|
|
@ -143,6 +145,7 @@ function main() {
|
||||||
config('contact', args.contact);
|
config('contact', args.contact);
|
||||||
config('terminal', args.terminal);
|
config('terminal', args.terminal);
|
||||||
config('terminalPath', args['terminal-path']);
|
config('terminalPath', args['terminal-path']);
|
||||||
|
config('terminalCommand', args['terminal-command']);
|
||||||
config('editor', args.editor);
|
config('editor', args.editor);
|
||||||
config('prefix', args.prefix);
|
config('prefix', args.prefix);
|
||||||
config('root', args.root);
|
config('root', args.root);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
"syncConsolePath": false,
|
"syncConsolePath": false,
|
||||||
"terminal": false,
|
"terminal": false,
|
||||||
"terminalPath": "",
|
"terminalPath": "",
|
||||||
|
"terminalCommand": "",
|
||||||
"showConfig": false,
|
"showConfig": false,
|
||||||
"showFileName": false,
|
"showFileName": false,
|
||||||
"vim": false,
|
"vim": false,
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
"--contact ": "enable contact",
|
"--contact ": "enable contact",
|
||||||
"--terminal ": "enable terminal",
|
"--terminal ": "enable terminal",
|
||||||
"--terminal-path ": "set terminal path",
|
"--terminal-path ": "set terminal path",
|
||||||
|
"--terminal-command ": "set command to run in terminal (shell by default)",
|
||||||
"--vim ": "enable vim hot keys",
|
"--vim ": "enable vim hot keys",
|
||||||
"--columns ": "set visible columns",
|
"--columns ": "set visible columns",
|
||||||
"--export ": "enable export of config through a server",
|
"--export ": "enable export of config through a server",
|
||||||
|
|
@ -53,6 +54,7 @@
|
||||||
"--no-sync-console-path ": "do not sync console path",
|
"--no-sync-console-path ": "do not sync console path",
|
||||||
"--no-contact ": "disable contact",
|
"--no-contact ": "disable contact",
|
||||||
"--no-terminal ": "disable terminal",
|
"--no-terminal ": "disable terminal",
|
||||||
|
"--no-terminal-command ": "set default shell to run in terminal",
|
||||||
"--no-vim ": "disable vim hot keys",
|
"--no-vim ": "disable vim hot keys",
|
||||||
"--no-columns ": "set default visible columns",
|
"--no-columns ": "set default visible columns",
|
||||||
"--no-export ": "disable export config through a server",
|
"--no-export ": "disable export config through a server",
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ programs in browser from any computer, mobile or tablet device.
|
||||||
--sync-console-path sync console path
|
--sync-console-path sync console path
|
||||||
--terminal enable terminal
|
--terminal enable terminal
|
||||||
--terminal-path set terminal path
|
--terminal-path set terminal path
|
||||||
|
--terminal-command set command to run in terminal (shell by default)
|
||||||
--vim enable vim hot keys
|
--vim enable vim hot keys
|
||||||
--columns set visible columns
|
--columns set visible columns
|
||||||
--export enable export of config through a server
|
--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-console disable console
|
||||||
--no-sync-console-path do not sync console path
|
--no-sync-console-path do not sync console path
|
||||||
--no-terminal disable terminal
|
--no-terminal disable terminal
|
||||||
|
--no-terminal-command set default shell to run in terminal
|
||||||
--no-vim disable vim hot keys
|
--no-vim disable vim hot keys
|
||||||
--no-columns set visible default columns
|
--no-columns set visible default columns
|
||||||
--no-export disable export of config through a server
|
--no-export disable export of config through a server
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,7 @@ function listen(prefix, socket) {
|
||||||
config('terminal') && terminal().listen(socket, {
|
config('terminal') && terminal().listen(socket, {
|
||||||
auth,
|
auth,
|
||||||
prefix: prefix + '/gritty',
|
prefix: prefix + '/gritty',
|
||||||
|
command: config('terminalCommand'),
|
||||||
});
|
});
|
||||||
|
|
||||||
distribute.export(socket);
|
distribute.export(socket);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue