Answer the question
In order to leave comments, you need to log in
How to convince mc not to change command prompt?
The devil pulled me to update mc to 4.8.18. Before that it was 4/8/15. He respected the settings in .cshrc, in particular prompt. 4.8.18 scores on prompt and stupidly drives its value there. Is there a way to fix this behavior without editing the sources and rolling back to 4.8.15?
Answer the question
In order to leave comments, you need to log in
Judging by the fact that no one answered, everyone is either as usual, or everyone is satisfied with this behavior. In general, I did a little analysis. Starting from version 4.8.16, mc has done a great job with subshell. But they fixed it only for bash - that is, the settings of the PS1 variable from .bashrc are read and prompt is set as it should. But for tcsh, they didn’t find anything better, how to enter a stupid replacement for prompt with what they came up with themselves and so that it doesn’t change, so far you have to patch the source code:
--- src/subshell/common.c 2017-03-05 00:51:38.000000000 +0700
+++ src/subshell/common-new.c 2017-03-10 18:57:21.592259025 +0700
@@ -864,7 +864,6 @@
case SHELL_TCSH:
g_snprintf (precmd, buff_size,
"set echo_style=both; "
- "set prompt='%%[email protected]%%m:%%~%%# '; "
"alias precmd 'echo $cwd:q >>%s; kill -STOP $$'\n", tcsh_fifo);
break;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question