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:
- putting a test prompt and a test alias into tcshrc within ~/.config/mc & ~/.mc & ~/.local/share/mc. None of those locations seem to be evaluated at mc startup. I can neither see a changed prompt, nor the test alias.
- Have temporarily changed the prompt within .cshrc to a very simple one. Did not help.
- changing the prompt on-the-fly within the mc's subshell does temporarily work. So it seems, that the prompt string itself is OK and understood.
Does someone has an idea?
The prompt for tcsh is hard coded in the source file
src/subshell/common.c
in functioninit_subshell_precmd
. To keep your prompt recompile mc with this patch applied: