diff -Nur mc-4.8.20.old/po/ru.po mc-4.8.20/po/ru.po --- mc-4.8.20.old/po/ru.po 2017-12-11 09:30:02.279019204 +0400 +++ mc-4.8.20/po/ru.po 2017-12-11 10:28:52.633788885 +0400 @@ -680,6 +680,9 @@ msgid "Disables subshell support" msgstr "Отключить поддержку встроенной командной оболочки" +msgid "Force subshell execution" +msgstr "Принудительное выполнение во встроенной командной оболочке" + msgid "Log ftp dialog to specified file" msgstr "Записывать диалог с FTP в заданный файл" diff -Nur mc-4.8.20.old/src/args.c mc-4.8.20/src/args.c --- mc-4.8.20.old/src/args.c 2017-12-11 09:30:02.297019051 +0400 +++ mc-4.8.20/src/args.c 2017-12-11 10:28:52.635788868 +0400 @@ -43,6 +43,7 @@ #include "src/args.h" /*** external variables **************************************************************************/ +extern int force_subshell_execution; /*** global variables ****************************************************************************/ @@ -154,6 +155,13 @@ N_("Disables subshell support"), NULL }, + + { + "forceexec", 'r', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, + &force_subshell_execution, + N_("Force subshell execution"), + NULL + }, #endif /* debug options */ diff -Nur mc-4.8.20.old/src/execute.c mc-4.8.20/src/execute.c --- mc-4.8.20.old/src/execute.c 2017-12-11 09:30:02.301019017 +0400 +++ mc-4.8.20/src/execute.c 2017-12-11 10:31:22.850491471 +0400 @@ -75,6 +75,8 @@ /* --------------------------------------------------------------------------------------------- */ +int force_subshell_execution = 0; + static void edition_post_exec (void) { @@ -431,7 +433,7 @@ #ifdef ENABLE_SUBSHELL if (mc_global.tty.use_subshell) { - if (subshell_state == INACTIVE) + if (subshell_state == INACTIVE || force_subshell_execution) do_execute (mc_global.shell->path, cmd ? cmd : command, flags | EXECUTE_AS_SHELL); else message (D_ERROR, MSG_ERROR, "%s", _("The shell is already running a command")); diff -Nur mc-4.8.20.old/src/execute.h mc-4.8.20/src/execute.h --- mc-4.8.20.old/src/execute.h 2016-03-21 15:56:31.000000000 +0400 +++ mc-4.8.20/src/execute.h 2017-12-11 10:28:52.638788842 +0400 @@ -28,6 +28,9 @@ /*** declarations of public functions ************************************************************/ +/* If true message "The shell is already running a command" never */ +extern int force_subshell_execution; + /* Execute functions that use the shell to execute */ void shell_execute (const char *command, int flags);