Commit graph libervia-backend/frontends/src/jp/cmd_shell.py
Author SHA1 Message Date
Goffi
23416b5d12 jp (arg_tools): args is not modified anymore in get_use_args + fixed args returned + parser_args are returned separatly (return is now a tuple) 2017-07-08 22:49:55 +02:00
Goffi
4331a03562 jp (arg_tools): moved get_cmd_choices, get_use_args and escape to a new arg_tools module, so they can be used in other commands than shell 2017-07-08 21:45:14 +02:00
Goffi
62c17395bd jp (shell): use of subprocess instead of running commands in the same process:
when a command is calling host.quit() in a D-Bus callback, GLib mainloop is exiting and quit the whole process without (apparently?) any way to block it. Couldn't find a good way to avoid that, so subprocess are now used as a workaround, instead of launching commands in the same process. When we'll get rid of python-dbus, there may be an other way.

Execuring external commands is now possible through the shell/! command.
2017-07-07 22:33:55 +02:00
Goffi
04b274a87b jp (shell): added "whoami" command to print currently used profile 2017-07-06 20:35:21 +02:00
Goffi
cee44aadbf jp (shell): don't print header if a command is specified in help 2017-07-06 20:31:31 +02:00
Goffi
6672bfc57b jp (shell): shell command (REPL mode), first draft:
This command launch jp in REPL mode, allowing do normal jp commands with some facilities.
Command can be selected with "cmd" (e.g. "cmd blog").
An argument can be fixed with "use" (e.g. "use output fancy").
Command is launched with "do", or directly with its name if it doesn't conflict with a shell command.
Arguments completion is still TODO (only shell commands are completed so far).
2017-07-06 20:28:25 +02:00