mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
* command.c (enter): Check subshell state early and return if
inactive before clearing the command line. * main.c (force_subshell_execution): Remove magic, unusable, undocumented command line option "-r".
This commit is contained in:
parent
022fce89cb
commit
915136719d
@ -1,5 +1,10 @@
|
||||
2003-03-22 Adam Byrtek <alpha@debian.org>
|
||||
|
||||
* command.c (enter): Check subshell state early and return if
|
||||
inactive before clearing the command line.
|
||||
* main.c (force_subshell_execution): Remove magic, unusable,
|
||||
undocumented command line option "-r".
|
||||
|
||||
* subshell.c: Remove dead code (SYNC_PTY_SIDES).
|
||||
(init_subshell_child): Remove dead code (initfile for TCSH).
|
||||
(init_subshell): Use ZSH_VERSION environment variable to detect
|
||||
|
@ -172,7 +172,7 @@ void do_cd_command (char *cmd)
|
||||
|
||||
/* Returns 1 if the we could handle the enter, 0 if not */
|
||||
static int
|
||||
enter (WInput * cmdline)
|
||||
enter (WInput *cmdline)
|
||||
{
|
||||
Dlg_head *old_dlg;
|
||||
|
||||
@ -199,6 +199,16 @@ enter (WInput * cmdline)
|
||||
|
||||
return MSG_NOT_HANDLED;
|
||||
}
|
||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||
/* Check this early before we clean command line
|
||||
* (will be checked again by shell_execute) */
|
||||
if (use_subshell && subshell_state != INACTIVE) {
|
||||
message (1, MSG_ERROR,
|
||||
_(" The shell is already running a command "));
|
||||
return MSG_NOT_HANDLED;
|
||||
}
|
||||
#endif
|
||||
|
||||
command = g_malloc (strlen (cmd) + 1);
|
||||
command[0] = 0;
|
||||
for (i = j = 0; i < strlen (cmd); i++) {
|
||||
|
@ -179,9 +179,6 @@ int navigate_with_arrows = 0;
|
||||
/* If true use +, -, | for line drawing */
|
||||
int force_ugly_line_drawing = 0;
|
||||
|
||||
/* If true message "The shell is already running a command" never */
|
||||
int force_subshell_execution = 0;
|
||||
|
||||
/* If true program softkeys (HP terminals only) on startup and after every
|
||||
command ran in the subshell to the description found in the termcap/terminfo
|
||||
database */
|
||||
@ -582,7 +579,7 @@ shell_execute (char *command, int flags)
|
||||
{
|
||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||
if (use_subshell)
|
||||
if (subshell_state == INACTIVE || force_subshell_execution)
|
||||
if (subshell_state == INACTIVE)
|
||||
do_execute (shell, command, flags | EXECUTE_AS_SHELL);
|
||||
else
|
||||
message (1, MSG_ERROR,
|
||||
@ -2259,8 +2256,6 @@ static const struct poptOption argument_table[] = {
|
||||
#ifdef HAVE_SUBSHELL_SUPPORT
|
||||
{"nosubshell", 'u', POPT_ARG_NONE, NULL, 'u',
|
||||
N_("Disables subshell support")},
|
||||
{"forceexec", 'r', POPT_ARG_NONE, &force_subshell_execution, 0,
|
||||
N_("Force subshell execution")},
|
||||
#endif
|
||||
{"printwd", 'P', POPT_ARG_STRING, &last_wd_file, 0,
|
||||
N_("Print last working directory to specified file")},
|
||||
|
Loading…
Reference in New Issue
Block a user