Skip to content

Commit

Permalink
Ticket #2027: don't overwrite the PROMPT_COMMAND bash variable.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
aborodin committed Feb 16, 2015
1 parent d1e60b6 commit 4361e49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/subshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4361e49

Please sign in to comment.