|
|
@ -1,11 +1,22 @@ |
|
|
|
--- a/src/subshell/common.c
|
|
|
|
+++ b/src/subshell/common.c
|
|
|
|
@@ -849,7 +849,7 @@ init_subshell_precmd (char *precmd, size
|
|
|
|
"else " |
|
|
|
"[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; " |
|
|
|
"fi; " |
|
|
|
@@ -843,16 +843,9 @@ init_subshell_precmd (char *precmd, size
|
|
|
|
* "PS1='$($PRECMD)$ '\n", |
|
|
|
*/ |
|
|
|
g_snprintf (precmd, buff_size, |
|
|
|
- "precmd() { "
|
|
|
|
- "if [ ! \"${PWD##$HOME}\" ]; then "
|
|
|
|
- "MC_PWD=\"~\"; "
|
|
|
|
- "else "
|
|
|
|
- "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
|
|
|
|
- "fi; "
|
|
|
|
- "echo \"$USER@$(hostname -s):$MC_PWD\"; "
|
|
|
|
+ "echo \"$USER@$HOSTNAME:$MC_PWD\"; "
|
|
|
|
"pwd>&%d; " |
|
|
|
"kill -STOP $$; " |
|
|
|
"}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]); |
|
|
|
- "pwd>&%d; "
|
|
|
|
- "kill -STOP $$; "
|
|
|
|
- "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
|
|
|
|
+ "precmd() { pwd>&%d; kill -STOP $$; }; "
|
|
|
|
+ "PRECMD=precmd; "
|
|
|
|
+ "PS1='$(eval $PRECMD)\\u@\\h:\\w\\$ '\n", subshell_pipe[WRITE]);
|
|
|
|
break; |
|
|
|
|
|
|
|
case SHELL_ZSH: |