From 0d6d1d0d5c1fa45602acd03008198ea03d3e9952 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Mon, 2 Sep 2013 20:24:59 +0300 Subject: [PATCH] revert changes related to BASH shell prompt Signed-off-by: Slava Zanko --- doc/man/mc.1.in | 6 +++++- src/subshell.c | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/man/mc.1.in b/doc/man/mc.1.in index b45cc51c0..2e79e33e9 100644 --- a/doc/man/mc.1.in +++ b/doc/man/mc.1.in @@ -2485,10 +2485,14 @@ time with the sequence C\-o and jump back to the Midnight Commander, if you interrupt an application, you will not be able to run other external commands until you quit the application you interrupted. .PP -A special subshell feature is that Midnight Commander displays a dynamic prompt +A special subshell feature (except Bash shell) is that Midnight Commander displays a dynamic prompt like "user@host:current_path> " (with known problems for fish which displays the prompt in full-screen mode (Ctrl-o), but not when the MC panels are visible). .PP +An extra added feature for Bash shell of using the subshell is that the prompt +displayed by the Midnight Commander is the same prompt that you are +currently using in your shell. +.PP The .\"LINK2" OPTIONS diff --git a/src/subshell.c b/src/subshell.c index 8052d3293..eaab1470e 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -838,8 +838,7 @@ init_subshell_precmd (char *precmd, size_t buff_size) { case BASH: g_snprintf (precmd, buff_size, - " PROMPT_COMMAND='pwd>&%d; kill -STOP $$'; " - "PS1='\\u@\\h:\\w\\$ '\n", subshell_pipe[WRITE]); + " PROMPT_COMMAND='pwd>&%d; kill -STOP $$';\n", subshell_pipe[WRITE]); break; case ASH_BUSYBOX: