-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functions called in opposite order in midnight commander subshell #140
Comments
More specifically, $ declare -p PROMPT_COMMAND
declare -- PROMPT_COMMAND=$'__bp_precmd_invoke_cmd\n__bp_interactive_mode\npwd>&11;kill -STOP $$' The substring PROMPT_COMMAND=$'__bp_precmd_invoke_cmd\npwd>&11;kill -STOP $$\n__bp_interactive_mode' I'm not sure if there is a solution at the user side. |
Thanks, this info is enough for me. After patching --- common.c 2023-03-06 13:14:44.536493089 +0100
+++ common.c.patched 2023-03-06 13:13:51.448906309 +0100
@@ -825,7 +825,7 @@
{
case SHELL_BASH:
g_snprintf (precmd, buff_size,
- " PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND\n}'pwd>&%d;kill -STOP $$'\n"
+ " PROMPT_COMMAND='__bp_precmd_invoke_cmd\npwd>&%d;kill -STOP $$\n__bp_interactive_mode'\n"
"PS1='\\u@\\h:\\w\\$ '\n", subshell_pipe[WRITE]);
break; |
I have defined simple functions for test and added to .bashrc. They print command to run and it's return code
In bash shell it's working ok:
But in midnight commander subshell functions are called in opposite order
What's wrong? Thanks for help
The text was updated successfully, but these errors were encountered: