The problem first: The subshell of mc has a different prompt compared to the parent shell and my tcsh environment. All the other settings/variables/aliases are available in mc's subshell, only the prompt is not "passed" correctly it seems. I have no idea why that happens. Man page says:
An extra added feature 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.
Background: I am using mc.4.8.23 which I have installed on my own locally (because no root permission). Did basically those two steps:
./configure --prefix=<absolute path>/eda_tools/mc/mc-4.8.23/install --bindir=<absolute path>/eda_tools/mc/mc-4.8.23/bin --with-screen=ncurses
make install
Rest of mc works fine.
What I have tried so far:
Does someone has an idea?
The prompt for tcsh is hard coded in the source file src/subshell/common.c
in function init_subshell_precmd
. To keep your prompt recompile mc with this patch applied:
--- src/subshell/common.c.org 2019-06-16 19:49:31.041841616 +0200
+++ src/subshell/common.c 2020-01-12 14:17:03.928956667 +0100
@@ -886,7 +886,6 @@
case SHELL_TCSH:
g_snprintf (precmd, buff_size,
"set echo_style=both; "
- "set prompt='%%n@%%m:%%~%%# '; "
"alias precmd 'echo $cwd:q >>%s; kill -STOP $$'\n", tcsh_fi
break;