Ticket #2027: don't overwrite the PROMPT_COMMAND bash variable.

Prepend value of system-wide PROMPT_COMMAND variable to the mc's one.

Thanks wjaguar for the idea and Serhiy Storchaka and Oswald Buddenhagen
for the patch itself.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2015-02-09 13:52:03 +03:00
parent d1e60b6feb
commit 4361e49a36

View File

@ -874,7 +874,8 @@ init_subshell (void)
{
case BASH:
g_snprintf (precmd, sizeof (precmd),
" PROMPT_COMMAND='pwd>&%d;kill -STOP $$'\n", subshell_pipe[WRITE]);
" PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'pwd>&%d;kill -STOP $$'\n",
subshell_pipe[WRITE]);
break;
case ZSH: